Makefile.in
changeset 2621 00853d565edf
parent 2620 d9c5b3b75864
child 2622 bc9f7c29311e
     1.1 --- a/Makefile.in	Fri Aug 19 22:53:48 2011 +0200
     1.2 +++ b/Makefile.in	Wed Aug 17 23:05:01 2011 +0200
     1.3 @@ -43,6 +43,7 @@
     1.4  LIBDIR := @@LIBDIR@@
     1.5  DOCDIR := @@DOCDIR@@
     1.6  MANDIR := @@MANDIR@@
     1.7 +PROG_PFX:=@@PROG_PFX@@
     1.8  DATE   := @@DATE@@
     1.9  LOCAL  := @@LOCAL@@
    1.10  
    1.11 @@ -66,7 +67,7 @@
    1.12  MAN_SECTION := 1
    1.13  MAN_SUBDIR := /man$(MAN_SECTION)
    1.14  
    1.15 -PROG_NAME := ct-ng
    1.16 +PROG_NAME := $(PROG_PFX)ct-ng
    1.17  
    1.18  ###############################################################################
    1.19  # Sanity checks
    1.20 @@ -141,17 +142,26 @@
    1.21  	@echo "  GZIP   '$@'"
    1.22  	@gzip -c9 $< >$@
    1.23  
    1.24 +define sed_it
    1.25 +	@echo "  SED    '$@'"
    1.26 +	@$(sed) -r -e 's,@@CT_BINDIR@@,$(BINDIR),g;'        \
    1.27 +	           -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;'        \
    1.28 +	           -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;'        \
    1.29 +	           -e 's,@@CT_MANDIR@@,$(MANDIR),g;'        \
    1.30 +	           -e 's,@@CT_PROG_PFX@@,$(PROG_PFX),g;'    \
    1.31 +	           -e 's,@@CT_PROG_NAME@@,$(PROG_NAME),g;'  \
    1.32 +	           -e 's,@@CT_VERSION@@,$(VERSION),g;'	    \
    1.33 +	           -e 's,@@CT_DATE@@,$(DATE),g;'            \
    1.34 +	           -e 's,@@CT_make@@,$(make),g;'            \
    1.35 +	           -e 's,@@CT_bash@@,$(bash),g;'            \
    1.36 +	           $< >$@
    1.37 +endef
    1.38 +
    1.39 +$(PROG_PFX)%: %.in Makefile
    1.40 +	$(call sed_it)
    1.41 +
    1.42  %: %.in Makefile
    1.43 -	@echo "  SED    '$@'"
    1.44 -	@$(sed) -r -e 's,@@CT_BINDIR@@,$(BINDIR),g;'    \
    1.45 -	           -e 's,@@CT_LIBDIR@@,$(LIBDIR),g;'    \
    1.46 -	           -e 's,@@CT_DOCDIR@@,$(DOCDIR),g;'    \
    1.47 -	           -e 's,@@CT_MANDIR@@,$(MANDIR),g;'    \
    1.48 -	           -e 's,@@CT_VERSION@@,$(VERSION),g;'	\
    1.49 -	           -e 's,@@CT_DATE@@,$(DATE),g;'        \
    1.50 -	           -e 's,@@CT_make@@,$(make),g;'        \
    1.51 -	           -e 's,@@CT_bash@@,$(bash),g;'        \
    1.52 -	           $@.in >$@
    1.53 +	$(call sed_it)
    1.54  
    1.55  # We create a script fragment that is parseable from inside a Makefile,
    1.56  # but also from inside a shell script, hence the reason why we don't