diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2008-12-08 20:40:20 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2008-12-08 20:40:20 +0000 |
commit | cdf3c638b09a4e2bb0fcb29c9a638886a5918f64 (patch) | |
tree | 04b98cb0990f1d5c8add20cb4bfe885f0bd6b262 | |
parent | 62bb75dfc2ac7fb23dec4c8bf10a48a859f90bf8 (diff) | |
download | swig-cdf3c638b09a4e2bb0fcb29c9a638886a5918f64.tar.gz |
Add ccache uninstall target. Fix ccache install/uninstall to take account of --program-prefix --program-suffix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r-- | CCache/Makefile.in | 11 | ||||
-rw-r--r-- | CCache/configure.in | 1 | ||||
-rw-r--r-- | Makefile.in | 5 |
3 files changed, 14 insertions, 3 deletions
diff --git a/CCache/Makefile.in b/CCache/Makefile.in index 6373247e2..0b5290060 100644 --- a/CCache/Makefile.in +++ b/CCache/Makefile.in @@ -15,6 +15,9 @@ SWIG=swig SWIG_LIB=../../Lib EXEEXT=@EXEEXT@ +# Use standard autoconf approach to transform executable name using --program-prefix and --program-suffix +transform = @program_transform_name@ + LIBS= @LIBS@ OBJS= ccache.o mdfour.o hash.o execute.o util.o args.o stats.o \ cleanup.o snprintf.o unify.o @@ -36,9 +39,13 @@ web/$(PACKAGE_NAME)-man.html: ccache.yo install: $(PACKAGE_NAME)$(EXEEXT) $(PACKAGE_NAME).1 ${INSTALLCMD} -d $(DESTDIR)${bindir} - ${INSTALLCMD} -m 755 $(PACKAGE_NAME)$(EXEEXT) $(DESTDIR)${bindir} + ${INSTALLCMD} -m 755 $(PACKAGE_NAME)$(EXEEXT) $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT) ${INSTALLCMD} -d $(DESTDIR)${mandir}/man1 - ${INSTALLCMD} -m 644 ${srcdir}/$(PACKAGE_NAME).1 $(DESTDIR)${mandir}/man1/ + ${INSTALLCMD} -m 644 ${srcdir}/$(PACKAGE_NAME).1 $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1 + +uninstall: $(PACKAGE_NAME)$(EXEEXT) $(PACKAGE_NAME).1 + rm -f $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT) + rm -f $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1 clean: /bin/rm -f $(OBJS) *~ $(PACKAGE_NAME)$(EXEEXT) diff --git a/CCache/configure.in b/CCache/configure.in index 23f2f72ef..dfbf86dbc 100644 --- a/CCache/configure.in +++ b/CCache/configure.in @@ -12,6 +12,7 @@ dnl Checks for programs. AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL +AC_ARG_PROGRAM # for program_transform_name AC_DEFINE([_GNU_SOURCE], 1, [Define _GNU_SOURCE so that we get all necessary prototypes]) diff --git a/Makefile.in b/Makefile.in index 5fa9e55ef..2550272bd 100644 --- a/Makefile.in +++ b/Makefile.in @@ -496,7 +496,7 @@ install-ccache: # TARGETS: uninstall & friends ##################################################################### -uninstall: uninstall-main uninstall-lib +uninstall: uninstall-main uninstall-lib uninstall-ccache @echo "Uninstall complete" uninstall-main: @@ -507,6 +507,9 @@ uninstall-lib: @echo "Uninstalling the SWIG library" rm -rf $(DESTDIR)$(SWIG_LIB)/ +uninstall-ccache: + test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) uninstall) + ############################################################################ # DIST and other maintenance ############################################################################ |