#-*- Makefile -*- # Makefile for packages, only. include MkRules HELP = YES WINHELP = NO # Use one of NO, CHM, BOTH (chm and winhelp) RHOME = $(shell perl pwd.pl ../..)# must be absolute path RLIB = $(RHOME)/library PKGDIR = $(RHOME)/src/library PKGD = $(shell perl pwd.pl $(PKGDIR))# must be absolute path ifdef DEBUG OPTFLAGS=-g -O2 -Wall DLLFLAGS= else OPTFLAGS=-O2 -Wall -pedantic DLLFLAGS=-s endif libR.a: R.exp $(DLLTOOL) $(DLLTOOLFLAGS) $(R-DLLTOOLFLAGS) --dllname R.dll --def R.exp --output-lib libR.a # ===== Packages ====== bundle-%: $(PERL) fixed/dobundle.pl $* $(PKGD) $(RLIB) pkg-%: $(MAKE) DLLNM=$($*-DLLNM) \ -C $(PKGDIR)/$* PKG=$* RHOME=$(RHOME) RLIB=$(RLIB) \ -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)