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
This commit is contained in:
William S Fulton 2008-12-08 20:40:20 +00:00
commit cdf3c638b0
3 changed files with 14 additions and 3 deletions

View file

@ -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)

View file

@ -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])

View file

@ -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
############################################################################