The R Project SVN R

Rev

Rev 5078 | Rev 5202 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

#
# ${R_HOME}/src/scripts/Makefile

VPATH = @srcdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@

top_builddir = ../..
subdir = src/scripts

include $(top_builddir)/Makeconf

distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
DISTFILES = $(shell cd $(srcdir) && ls | sed '/CVS/d')

SRC_SCRIPTS = BATCH Rd2dvi check filename help help.links \
    massage-Examples pager
OBJ_SCRIPTS = COMPILE INSTALL REMOVE Rd2contents Rd2txt Rdconv Rdindex \
    Rman2Rd SHLIB Sd2Rd build-help fwf2table help.pretty html2dos 

all: Makefile R

Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
    cd $(top_builddir) && \
      CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
      $(SHELL) ./config.status

R:
    @$(MKINSTALLDIRS) $(top_builddir)/bin
    @cat R.sh | \
      (cd $(top_builddir); sed "s@R_HOME_DIR*@`pwd`@" > bin/R)
    @chmod +x $(top_builddir)/bin/R
    @for f in $(SRC_SCRIPTS); do \
      $(INSTALL) $(srcdir)/$$f $(top_builddir)/bin; \
    done
    @for f in $(OBJ_SCRIPTS); do \
      $(INSTALL) $$f $(top_builddir)/bin; \
    done

mostlyclean: clean
clean:
distclean:
    @rm -f Makefile R.sh $(OBJ_SCRIPTS)
maintainer-clean: distclean

distdir: $(DISTFILES)
    @for f in $(DISTFILES); do \
      test -f $(distdir)/$${f} \
        || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
        || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
    done