The R Project SVN R

Rev

Rev 9615 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

include ../MkRules

all: profiles fixh fixr fixbin fixetc

profiles: ../../../library/base/R/Rprofile

../../../library/base/R/Rprofile:  ../../library/profile/Common.R \
../../library/profile/Rprofile.gnw
    @$(ECHO) -------- Building $@ from $^--------
    mkdir -p ../../../library/base/R
    $(CAT)  $^ > $@


SED0='/^\#/d'
SED01='/Rsockfork/d'
SED1='s/F77_SUBROUTINE(\(.*\))/void * \1_();/'
SED2='s/C_FUNCTION(\(.*\))/void * \1();/'
SED3='s/F77_SUBROUTINE(\(.*\))/ { "\1_",    \1_},/'
SED4='s/C_FUNCTION(\(.*\))/{ "\1",  \1 },/'

../../include/FFDecl.h: ../../appl/ROUTINES
    $(SED) -e $(SED0) -e $(SED01) -e $(SED1) -e $(SED2) ../../appl/ROUTINES > ../../include/FFDecl.h
../../include/FFTab.h: ../../appl/ROUTINES
    $(SED) -e $(SED0) -e $(SED01) -e $(SED3) -e $(SED4) ../../appl/ROUTINES > ../../include/FFTab.h


fixh: h/config.h ../../include/FFDecl.h ../../include/FFTab.h \
  ../../include/Rconfig.h ../../include/Rversion.h
    $(CP) -p ./h/config.h ./h/psignal.h ../../include
    $(ECHO) done > fixh

../../include/Rconfig.h: h/config.h
    $(SED) -e 1d ../../../tools/GETCONFIG > GC
    (cd h; sh ../GC > ../../../include/Rconfig.h)
    $(RM) GC

../../include/Rversion.h: ../../../date-stamp ../../../VERSION
    $(SED) -e 1d ../../../tools/GETVERSION > ../../../tools/GV
    sh ../../../tools/GV > $@
    $(RM) ../../../tools/GV

../../../bin/massage-Examples.sh: ../../scripts/massage-Examples
    $(SED) -e 1d  -e 's/"contr.poly")/"contr.poly"), pager="console"'/ $< > $@

../../../bin/check: ../../scripts/check.in
    $(CP) $< $@

../../../bin/build: ../../scripts/build.in
    $(CP) $< $@

fixbin: ../../../bin/massage-Examples.sh ../../../bin/build \
     ../../../bin/check  cp2bin
    $(ECHO) done > fixbin

cp2bin: $(filter-out ./bin/CVS, $(wildcard ./bin/*))
    zip -q bins $^
    unzip -oaq bins -d  ../../..
    $(RM) bins.zip

fixr: $(wildcard ./r/*.html) ../../../doc/html/search/SearchEngine.html
    $(CP) -p ./r/*.html ../../../doc/html
    $(ECHO) done > fixr

fixetc: $(filter-out ./etc/CVS, $(wildcard ./etc/*))
    $(CP) -p $^ ../../../etc
    $(ECHO) done > fixetc

clean:
    $(RM) *~ */*~ fixr fixh fixbin fixetc

../../../doc/html/search/SearchEngine.html:../../../doc/KEYWORDS.db
    (cd ../../../doc; \
    cat html/search/SearchEngine-head.html > html/search/SearchEngine.html; \
    perl ../tools/keywords2html.pl KEYWORDS.db >> html/search/SearchEngine.html; \
    cat html/search/SearchEngine-foot.html >> html/search/SearchEngine.html)