[project @ 1998-02-26 10:17:30 by sof]
[ghc-hetmet.git] / mk / target.mk
index 5474bb8..e0ae32c 100644 (file)
@@ -407,6 +407,16 @@ endif
        @echo Done.
 endif
 
+# links to script programs: we sometimes install a script as
+# <name>-<version> with a link from <name> to the real script.
+
+ifneq "$(SCRIPT_LINK)" ""
+all :: $(SCRIPT_LINK)
+
+$(SCRIPT_LINK) : $(SCRIPT_PROG)
+       $(LN_S) $(SCRIPT_PROG) $(SCRIPT_LINK)
+endif
+
 
 ###########################################
 #
@@ -478,7 +488,7 @@ ifneq "$(BIN_DIST)" "1"
           echo '$$'"libexecdir='$(libexecdir)';"                    >> $$i.tmp ; \
           echo '$$'"datadir='$(datadir)';"                          >> $$i.tmp ; \
           cat  $$i                                                >> $$i.tmp ; \
-          echo $(INSTALL_PROGRAM) $(filter-out -s,$(INSTALL_OPTS)) $$i.tmp $(bindir)/$$i ;    \
+          echo $(INSTALL_PROGRAM) $(filter-out -s,$(INSTALL_BIN_OPTS)) $$i.tmp $(bindir)/$$i ;    \
           $(INSTALL_PROGRAM) $(filter-out -s,$(INSTALL_BIN_OPTS)) $$i.tmp $(bindir)/$$i ; \
           $(RM) $$i.tmp; \
        done
@@ -619,6 +629,14 @@ install-strip::
        @$(MAKE) EXTRA_INSTALL_OPTS='-s' install                                        
 endif
 
+#
+# install links to script drivers.
+#
+ifneq "$(SCRIPT_LINK)" ""
+install ::
+       $(LN_S) $(SCRIPT_PROG) $(bindir)/$(SCRIPT_LINK)
+endif
+
 ###########################################
 #
 #      Targets: dist binary-dist
@@ -784,18 +802,18 @@ check:: $(TESTS)
 #------------------------------------------------------------
 #                      Tags
 
-.PHONY: TAGS
+.PHONY: TAGS tags
 
-TAGS:: $(SOURCES)
+tags TAGS:: $(TAGS_HS_SRCS) $(TAGS_C_SRCS)
        @$(RM) TAGS
        @touch TAGS
-ifneq "$(HS_SRCS)" ""
+ifneq "$(TAGS_HS_SRCS)" ""
        $(HSTAGS) $(HSTAGS_OPTS) -- $(TAGS_HS_SRCS)
 endif
-ifneq "$(C_SRCS)" ""
+ifneq "$(TAGS_C_SRCS)" ""
        etags -a $(TAGS_C_SRCS)
 endif
-       @( DEREFFED=`ls -l Makefile | sed -e 's/.*-> \(.*\)/\1/g'` && $(RM) `dirname $$DEREFFED`/TAGS && $(CP) TAGS `dirname $$DEREFFED` ) || echo TAGS file generated, perhaps copy over to source tree?
+       @( DEREFFED=`ls -l Makefile | sed -e 's/.*-> \(.*\)/\1/g'` && $(RM) `dirname $$DEREFFED`/TAGS && $(CP) TAGS `dirname $$DEREFFED` ) 2>/dev/null || echo TAGS file generated, perhaps copy over to source tree?
 
 #------------------------------------------------------------
 #                      Makefile debugging
@@ -1041,9 +1059,9 @@ ifneq "$(WAYS)" ""
 ifeq "$(way)" ""
 
 # NB: the targets exclude 
-#      boot info TAGS
+#      boot info TAGS runtests
 # since these are way-independent
-all docs runtests TAGS clean veryclean maintainer-clean install ::
+all docs TAGS clean veryclean maintainer-clean install ::
        @echo "------------------------------------------------------------------------"
        @echo "===fptools== Recursively making \`$@' for ways: $(WAYS) ..."
        @echo "PWD = $(shell pwd)"