Rev 51899 | Rev 52392 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
## first time through MkRules will not exist.ifeq ($(wildcard MkRules?local),MkRules.local)include MkRules.localelseinclude MkRules.distendifinclude MkRules.rulesinclude ../../share/make/vars.mkMK = $(MAKE) --no-print-directoryall:@$(MK) MkRules Rpwd.exe@if test -f ../../SVN-REVISION ; then \cp ../../SVN-REVISION ../../SVN-REVISION.bak ; \fi@$(MK) rbuild@$(MK) -C ../library -f Makefile.win all WIN=$(WIN)@$(MK) -C ../library -f Makefile.win docs@$(MK) htmldocs docfiles@$(MK) -C ../../po -f Makefile.winrpackages:@$(MK) -C ../library -f Makefile.win all WIN=$(WIN)@$(MK) -C ../library -f Makefile.win docsifeq ($(wildcard MkRules?local),MkRules.local)MkRules: MkRules.local MkRules.rulescat MkRules.local MkRules.rules > MkRuleselseMkRules: MkRules.dist MkRules.rulescat MkRules.dist MkRules.rules > MkRulesendif## must be absolute and space-free.## NB: will not be set correctly first time through.RHOME = $(shell ./Rpwd.exe ../..)OPTFLAGS=-O3 -Wall -pedanticFOPTFLAGS=-O3ifdef DEBUGOPTFLAGS+=$(G_FLAG)FOPTFLAGS+=$(G_FLAG)DLLFLAGS=elseDLLFLAGS=-sendif# used when compiling src/main: needed for memory.c, regex.cOPTFLAGS_M=$(OPTFLAGS)R-DLLFLAGS=-mwindowsifdef USE_ICULIBEXTRAS+= -licuin38 -licuuc38endifR-DLLLIBS =-L. $(FLIBS) -lRblas -L../../$(IMPDIR) -lRzlib -lRgraphapp -lRiconv -lcomctl32 -lversion $(LIBEXTRAS)dllversion-RESFLAGS =-I../includeSOURCES = \console.c dataentry.c dynload.c edit.c editor.c embeddedR.c extra.c \opt.c pager.c preferences.c psignal.c rhome.c rt_complete.c \rui.c run.c shext.c sys-win32.c system.c dos_wglob.cOBJS = $(SOURCES:.c=.o)ifeq ($(strip $(WIN)),32)OBJS += e_pow.oendifMAINLIBS = ../main/libmain.a ../appl/libappl.a ../nmath/libnmath.aEXTRALIBS = getline/gl.a ../extra/xdr/libxdr.a \../extra/pcre/libpcre.a ../extra/bzip2/libbz2.a \../extra/intl/libintl.a ../extra/trio/libtrio.a ../extra/tzone/libtz.a \../extra/tre/libtre.a ../extra/xz/liblzma.a# flags to ensure that Doug Lea's malloc is used:ifdef LEA_MALLOCextra-CFLAGS+=-DLEA_MALLOCOBJS-EXTRA=malloc.oOPTFLAGS_M+=-DLEA_MALLOCendif.PHONY: clean veryclean rlibs fixfiles front-ends rmodulesCPPFLAGS = -I../include -I. -I../extra -DHAVE_CONFIG_H -DR_DLL_BUILDCFLAGS = $(OPTFLAGS)FFLAGS = $(FOPTFLAGS)extra-CPPFLAGS = -I../library/grDevices/srcRpwd.exe: front-ends/Rpwd.exe$(CP) $< $@front-ends/Rpwd.exe:$(MK) -C front-ends Rpwd## watch out: R.dll and Rblas.dll depend on each other.rbuild:@$(MK) fixfiles@$(MK) -C ../include -f Makefile.win@$(MK) -C ../scripts -f Makefile.winifdef USE_IMPLIBS@$(MK) libRiconv.dll.aendif@$(MK) libRblas.dll.a@$(MK) ../../$(BINDIR)/R.dllifdef USE_IMPLIBS@$(MK) implibsendif@$(MK) Rblas@$(MK) front-ends COPYRIGHTS rmodules fixed/fixdescrlibs:$(MK) -C ../extra/intl OPTFLAGS='$(OPTFLAGS)' -f Makefile.win$(MK) -C ../appl RHOME=$(RHOME) OPTFLAGS='$(OPTFLAGS)' FOPTFLAGS='$(FOPTFLAGS)' -f Makefile.win$(MK) -C ../nmath OPTFLAGS='$(OPTFLAGS)' -f Makefile.win$(MK) -C ../main RHOME=$(RHOME) OPTFLAGS='$(OPTFLAGS_M)' FFLAGS='$(FOPTFLAGS)' -f Makefile.win$(MK) -C ./getline OPTFLAGS='$(OPTFLAGS)'@for ex in graphapp pcre bzip2 zlib xdr tre trio tzone win_iconv xz; do \$(MK) -C ../extra/$${ex} OPTFLAGS='$(OPTFLAGS)' -f Makefile.win || exit 1; \donermodules:@$(MKDIR) -p ../../modules$(R_ARCH)$(MK) -C ../modules -f Makefile.win \RHOME=$(RHOME) OPTFLAGS='$(OPTFLAGS)' FOPTFLAGS='$(FOPTFLAGS)'COPYRIGHTS: ../../doc/COPYRIGHTS COPYRIGHTS.wincat $^ > $@fixfiles:@$(MKDIR) -p ../../$(BINDIR) ../../bin@$(MK) -C ./fixedfixed/fixdesc:@sh fixed/GETDESC $(R_PKGS_BASE)dllversion.o: ../include/Rversion.hR.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o@$(ECHO) EXPORTS > R.def@$(NM) $^ | $(SED) -n 's/^.* [BCDRT] _/ /p' | $(SORT) | uniq > R0.def@comm -23 R0.def Rdll.hide >> R.def$(DLL) -shared $(DLLFLAGS) $($*-DLLFLAGS) -o $@ R.def $^ $($*-DLLLIBS) $(DLLLIBS)@$(RM) R.def R0.defR.exp: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o@$(ECHO) LIBRARY R.dll > R.exp@$(ECHO) EXPORTS >> R.exp@$(NM) $^ | $(SED) -n 's/^.* [BCDRT] _/ /p' | $(SORT) | uniq > R0.def@comm -23 R0.def Rdll.hide >> R.exp@$(RM) R0.defRdll: makeMakedeps libRblas.dll.a ../../$(BINDIR)/R.dll../../$(BINDIR)/R.dll: FORCE@$(MK) fixfiles@$(MK) -C ../include -f Makefile.win@$(MK) rlibs@$(MK) makeMakedeps@$(MK) R.dll@$(MKDIR) -p ../../$(BINDIR)$(CP) R.dll ../../$(BINDIR)FORCE:implibs: libR.dll.a libRblas.dll.a@$(MKDIR) -p ../../lib@$(CP) $^ ../../liblibR.dll.a: R.exp$(DLLTOOL) $(DLLTOOLFLAGS) $(R-DLLTOOLFLAGS) --dllname R.dll \--input-def $< --output-lib $@libRiconv.dll.a: unicode/iconv.def$(DLLTOOL) $(DLLTOOLFLAGS) $(R-DLLTOOLFLAGS) --dllname Riconv.dll \--input-def $< --output-lib $@front-ends:$(MK) -C front-ends../extra/zlib/libz.a:$(MK) -C ../extra/zlib -f Makefile.win../extra/pcre/libpcre.a:$(MK) -C ../extra/pcre -f Makefile.win../extra/tre/libtre.a:$(MK) -C ../extra/tre -f Makefile.win../extra/bzip2/libbz2.a:$(MK) -C ../extra/bzip2 -f Makefile.win libbz2.a../extra/trio/libtrio.a:$(MK) -C ../extra/trio -f Makefile.win../extra/xz/liblzma.a:$(MK) -C ../extra/xz -f Makefile.winhtmldocs:@$(ECHO)@$(ECHO) "------ Making HTML documentation ------"@$(MK) -C ../../doc/manual -f Makefile.win html# ===== BLAS ======Rblas:@$(MK) -C ../extra/blas -f Makefile.win \RHOME=$(RHOME) FFLAGS='$(FOPTFLAGS)'Rblas-clean:@$(MK) -C ../extra/blas -f Makefile.win cleanlibRblas.dll.a: ../extra/blas/Rblas.def@$(DLLTOOL) $(DLLTOOLFLAGS) --dllname Rblas.dll \--input-def $< --output-lib $@# ===== cleaning ======## used in installer/MakefilePKGDIR=../librarypkgclean-%:@(cd $(PKGDIR)/$*/src; rm -f *.d *.o *.dll *_res.rc Makedeps)EXTRA_DIRS = blas bzip2 graphapp intl pcre tre trio tzone xdr xz win_iconv zlibclean: cleanwin@$(MAKE) -C ../library -f Makefile.win clean$(RM) -f ../*/*.o ../*/*.a *.a ../*/*.d ../*/Makedeps fixed/fixdesc@for d in $(EXTRA_DIRS); do \$(MAKE) -C ../extra/$${d} -f Makefile.win clean; \done-$(MK) -C ../../doc/manual -f Makefile.win distclean-$(MK) -C ../nmath/standalone -f Makefile.win distclean-$(MK) -C ../modules -f Makefile.win clean-$(MK) -C ../../tests -f Makefile.win clean-$(MK) -C ../library/Recommended -f Makefile.win clean$(RM) -f ../library/methods/all.Rdistclean: clean@for d in $(EXTRA_DIRS); do \$(MAKE) -C ../extra/$${d} -f Makefile.win distclean; \done@$(MAKE) -C ../../tests -f Makefile.win distclean RHOME=$(RHOME)$(RM) -r ../../$(BINDIR) ../../include ../../lib ../../library ../../modules$(RM) ../include/config.h ../include/iconv.h ../include/psignal.h \../include/Rconfig.h ../include/Rversion.h ../include/Rmath.h \../include/libintl.h$(RM) ../library/*/src/*.o ../library/*/src/*.a$(RM) ../library/*/src/*.d ../library/*/src/Makedeps$(RM) ../library/*/src/*.dll$(RM) -r ../library/*/check$(RM) ../library/*/tests/*.ps$(RM) ../library/tcltk/src/tcl$(TCL_VERSION).def \../library/tcltk//src/tk$(TCL_VERSION).def$(RM) R.exp COPYRIGHTS$(RM) ../../doc/html/index.html \../../doc/html/packages.html ../../doc/html/rwin.html \../../doc/html/rw-FAQ.html$(RM) ../../etc/Makeconf ../../etc/Rconsole ../../etc/Rdevga \../../etc/Rprofile.site ../../etc/rgb.txt ../../etc/Rcmd_environ \../../tests/*.Rout ../../tests/*.Rout.fail$(RM) -r ../../etc/i386 ../../etc/x64 # do both sub-archs$(RM) -r ../../share/zoneinfo$(MAKE) -C fixed distclean$(MAKE) -C ../include -f Makefile.win distclean-$(MAKE) -C installer distclean@for pkg in $(R_PKGS_BASE); do \$(RM) ../library/$${pkg}/DESCRIPTION; \done$(RM) ../../SVN-REVISION.bak$(RM) rw-FAQ fixed/html/rw-FAQ.html$(MAKE) -C cran clean$(RM) -r .vignettes # it gets left behind if there is an error$(RM) -r ../../share/locale$(RM) ../../doc/CHANGES*$(RM) MkRules Rpwd.exe # do this last of allveryclean: distclean$(RM) ../../doc/FAQ ../../doc/RESOURCES ../../doc/html/resources.html \../../SVN-REVISION # not in SVN sourcescleanwin:$(RM) *.o *.dll *.a *~ \#*\# .RData .Rhistory Makedeps *.d$(MAKE) -C ../extra/graphapp -f Makefile.win clean$(MAKE) -C fixed clean$(MAKE) -C getline clean$(MAKE) -C front-ends clean$(MAKE) -C bitmap clean-$(MAKE) -C installer clean# ===== testing ======check check-devel check-all check-recommended:@$(MK) -C ../../tests -f Makefile.win RHOME=$(RHOME) $@# ===== documentation ======pdfdocs manuals:@$(MK) -C $(RHOME)/doc/manual -f Makefile.win clean@$(MK) -C $(RHOME)/doc/manual -f Makefile.winREXE = $(RHOME)/$(BINDIR)/rterm.exe --vanilla --slavevignettes:@for pkg in $(R_PKGS_BASE); do \if test -d "../library/$${pkg}/inst/doc"; then \echo "building/updating vignettes for package '$${pkg}' ..."; \(echo "tools:::.install_package_vignettes(\"../library/$${pkg}\", \"../../library/$${pkg}\")") | R_DEFAULT_PACKAGES="utils,tools" $(REXE) > /dev/null; \fi; \done@rm -rf .vignettes## ===================== Maintainer targets ========================RVER-PAT = $(shell version=`cut -d' ' -f1 ../../VERSION | sed -n 1p`; if test "`cut -f2 -d' ' ../../VERSION`" = "Patched"; then version=`echo $${version} | sed 's/\.[0-9]*$$//'`; echo "$${version}-patched"; else echo "$${version}"; fi)CRANREC = cran.r-project.org::CRAN/src/contrib/$(RVER-PAT)/Recommended## Use -c here to avoid re-downloading the same versions of files## A recent rsync seems to need -prsync-recommended:@(cd ../library; \rsync --timeout=60 -rcvpC --delete \--exclude=Makefile.in --exclude=Makefile.win --exclude=.cvsignore \--include=*.tar.gz --exclude=*.tgz --exclude=*.ts \--exclude=".svn" $(CRANREC) . )@$(RM) ../library/Recommended/*.tgz@(cd ../library/Recommended; for i in ${R_PKGS_RECOMMENDED}; do cp -p $${i}*.tar.gz $${i}.tgz ; done)link-recommended:@$(RM) ../library/Recommended/*.tgz@(cd ../library/Recommended; for i in ${R_PKGS_RECOMMENDED} ; do cp -p $${i}*.tar.gz $${i}.tgz ; done)recommended:@$(ECHO) "--- Making recommended packages"@$(MK) -C ../library/Recommended -f Makefile.win RHOME=$(RHOME)docfiles:@$(MK) -f Makefile.docsbitmapdll:@$(MAKE) -C bitmapEXTRA_PKGS=rinstaller:@$(MAKE) -C installer EXTRA_PKGS='$(EXTRA_PKGS)'@$(MAKE) -C installer cleancrandir:ifeq ($(strip $(WIN)),64)$(MAKE) -C cran allendifdistribution:@$(MK) all@$(MK) bitmapdll@$(MK) recommended@$(MK) vignettes@$(MK) manuals@$(MK) rinstaller@$(MK) crandir@$(RM) -f $(RHOME)/SVN-REVISION.bak## ============= End of maintainer targets ========================# Dependencies : blas00.c malloc.c don't have anyCSOURCES=$(SOURCES)DEPS=$(CSOURCES:.c=.d)makeMakedeps: $(DEPS)@$(RM) Makedeps@cat $(DEPS) >> Makedeps-include Makedeps