#-*- Makefile -*- # Makefile for packages, only. include MkRules RVER = @RVER@ HELP = YES WINHELP = NO # Use one of NO, CHM, BOTH (chm and winhelp) RHOME = $(shell ./Rpwd.exe ../..)# must be absolute path RLIB = $(RHOME)/library PKGDIR = $(RHOME)/src/library PKGD = $(shell ./Rpwd.exe $(PKGDIR))# must be absolute path FLIBS+=-lRblas libR.a: R.exp $(DLLTOOL) $(DLLTOOLFLAGS) $(R-DLLTOOLFLAGS) --dllname R.dll --def R.exp --output-lib libR.a libRblas.a: Rblas.def $(DLLTOOL) $(DLLTOOLFLAGS) $(R-DLLTOOLFLAGS) --dllname Rblas.dll \ --def Rblas.def --output-lib libRblas.a # ===== Packages ====== bundle-%: $(PERL) fixed/dobundle.pl $* $(PKGD) $(RLIB) pkg-%: $(MAKE) DLLNM=$($*-DLLNM) FLIBS="$(FLIBS)" \ -C $(PKGDIR)/$* PKG=$* RHOME=$(RHOME) RLIB=$(RLIB) RVER=$(RVER) \ -f $(RHOME)/src/gnuwin32/MakePkg ifeq ($(strip $(HELP)),YES) @$(MAKE) -C ./help RHOME=$(RHOME) PKGDIR=$(PKGD) RLIB=$(RLIB) $($*-HELP)help-$* @$(MAKE) -C ./help RHOME=$(RHOME) PKGDIR=$(PKGD) RLIB=$(RLIB) contents-$* ifeq ($(strip $(WINHELP)),CHM) @$(MAKE) -C ./help RHOME=$(RHOME) PKGDIR=$(PKGD) RLIB=$(RLIB) chm-$* endif ifeq ($(strip $(WINHELP)),BOTH) @$(MAKE) -C ./help RHOME=$(RHOME) PKGDIR=$(PKGD) RLIB=$(RLIB) winhlp-$* # also makes chm endif endif pkgclean-%: $(MAKE) DLLNM=$($*-DLLNM) RHOME=$(RHOME) \ -C $(PKGDIR)/$* PKG=$* -f $(RHOME)/src/gnuwin32/MakePkg clean pkgcheck-%: @$(ECHO) -------- Testing package $* -------- -@mkdir -p $(PKGDIR)/$*/check @$(MAKE) -C $(PKGDIR)/$*/check PKG=$* RHOME=$(RHOME) RLIB=$(RLIB) \ -f $(RHOME)/src/gnuwin32/check/PkgCheck @if test -d $(PKGDIR)/$*/tests ; then \ $(MAKE) -C $(PKGDIR)/$*/tests PKG=$* RHOME=$(RHOME) RLIB=$(RLIB) \ -f $(RHOME)/src/gnuwin32/check/PkgCheck tests;\ fi ziphelp-%: $(MAKE) -C ./help RHOME=$(RHOME) PKGDIR=$(PKGD) RLIB=$(RLIB) ziphelp-$* ziponly-%: $(MAKE) -C ./help RHOME=$(RHOME) PKGDIR=$(PKGD) RLIB=$(RLIB) ziponlyhelp-$* zipdata-%: @echo " zipping data" @(cd $(RLIB)/$*/data; \ if test -f Rdata.zip ; then \ unzip -qou Rdata; \ fi; \ $(RM) Rdata.zip filelist ; \ ls -1 > filelist; \ zip -rmq9X Rdata * -x filelist 00Index)