CCache: take care of program prefix/suffix on configure
This commit is contained in:
parent
f12d14d1be
commit
a706aa146c
4 changed files with 42 additions and 24 deletions
|
|
@ -8,6 +8,7 @@ bindir=@bindir@
|
||||||
mandir=@mandir@
|
mandir=@mandir@
|
||||||
INSTALLCMD=@INSTALL@
|
INSTALLCMD=@INSTALL@
|
||||||
PACKAGE_NAME=@PACKAGE_NAME@
|
PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
|
MYNAME=@MYNAME@
|
||||||
# Soft link test can be skipped on systems that don't support soft linking
|
# Soft link test can be skipped on systems that don't support soft linking
|
||||||
NOSOFTLINKSTEST=
|
NOSOFTLINKSTEST=
|
||||||
|
|
||||||
|
|
@ -25,46 +26,46 @@ OBJS= ccache.o mdfour.o hash.o execute.o util.o args.o stats.o \
|
||||||
cleanup.o snprintf.o unify.o
|
cleanup.o snprintf.o unify.o
|
||||||
HEADERS = ccache.h mdfour.h
|
HEADERS = ccache.h mdfour.h
|
||||||
|
|
||||||
all: $(PACKAGE_NAME)$(EXEEXT)
|
all: $(MYNAME)$(EXEEXT)
|
||||||
|
|
||||||
# Regenerate Makefile if Makefile.in or config.status have changed.
|
# Regenerate Makefile if Makefile.in or config.status have changed.
|
||||||
Makefile: $(srcdir)/Makefile.in ./config.status
|
Makefile: $(srcdir)/Makefile.in ./config.status
|
||||||
$(SHELL) ./config.status
|
$(SHELL) ./config.status
|
||||||
|
|
||||||
# Note that HTML documentation is actually generated and used from the main SWIG documentation Makefile
|
# Note that HTML documentation is actually generated and used from the main SWIG documentation Makefile
|
||||||
docs: $(srcdir)/$(PACKAGE_NAME).1 $(srcdir)/web/ccache-man.html
|
docs: $(srcdir)/$(MYNAME).1 $(srcdir)/web/$(MYNAME)-man.html
|
||||||
|
|
||||||
$(PACKAGE_NAME)$(EXEEXT): $(OBJS) $(HEADERS)
|
$(MYNAME)$(EXEEXT): $(OBJS) $(HEADERS)
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||||
|
|
||||||
$(srcdir)/$(PACKAGE_NAME).1: $(srcdir)/ccache.yo
|
$(srcdir)/$(MYNAME).1: $(srcdir)/ccache.yo
|
||||||
-yodl2man -o $(srcdir)/$(PACKAGE_NAME).1 $(srcdir)/ccache.yo
|
-yodl2man -o $(srcdir)/$(MYNAME).1 $(srcdir)/ccache.yo
|
||||||
|
|
||||||
$(srcdir)/web/ccache-man.html: $(srcdir)/ccache.yo
|
$(srcdir)/web/$(MYNAME)-man.html: $(srcdir)/ccache.yo
|
||||||
yodl2html -o $(srcdir)/web/ccache-man.html $(srcdir)/ccache.yo
|
yodl2html -o $(srcdir)/web/$(MYNMAE)-man.html $(srcdir)/ccache.yo
|
||||||
|
|
||||||
install: $(PACKAGE_NAME)$(EXEEXT)
|
install: $(MYNAME)$(EXEEXT)
|
||||||
@echo "Installing $(PACKAGE_NAME)"
|
@echo "Installing $(MYNAME)"
|
||||||
@echo "Installing $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT)"
|
@echo "Installing $(DESTDIR)${bindir}/$(MYNAME)$(EXEEXT)"
|
||||||
${INSTALLCMD} -d $(DESTDIR)${bindir}
|
${INSTALLCMD} -d $(DESTDIR)${bindir}
|
||||||
${INSTALLCMD} -m 755 $(PACKAGE_NAME)$(EXEEXT) $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT)
|
${INSTALLCMD} -m 755 $(MYNAME)$(EXEEXT) $(DESTDIR)${bindir}/$(MYNAME)$(EXEEXT)
|
||||||
|
|
||||||
install-docs: $(srcdir)/$(PACKAGE_NAME).1
|
install-docs: $(srcdir)/$(MYNAME).1
|
||||||
@echo "Installing $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1"
|
@echo "Installing $(DESTDIR)${mandir}/man1/$(MYNAME).1"
|
||||||
${INSTALLCMD} -d $(DESTDIR)${mandir}/man1
|
${INSTALLCMD} -d $(DESTDIR)${mandir}/man1
|
||||||
${INSTALLCMD} -m 644 $(srcdir)/$(PACKAGE_NAME).1 $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1
|
${INSTALLCMD} -m 644 $(srcdir)/$(MYNAME).1 $(DESTDIR)${mandir}/man1/$(MYNAME).1
|
||||||
|
|
||||||
uninstall: $(PACKAGE_NAME)$(EXEEXT)
|
uninstall: $(MYNAME)$(EXEEXT)
|
||||||
rm -f $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT)
|
rm -f $(DESTDIR)${bindir}/$(MYNAME)$(EXEEXT)
|
||||||
|
|
||||||
uninstall-docs: $(srcdir)/$(PACKAGE_NAME).1
|
uninstall-docs: $(srcdir)/$(MYNAME).1
|
||||||
rm -f $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1
|
rm -f $(DESTDIR)${mandir}/man1/$(MYNAME).1
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
/bin/rm -f $(OBJS) *~ $(PACKAGE_NAME)$(EXEEXT)
|
/bin/rm -f $(OBJS) *~ $(MYNAME)$(EXEEXT)
|
||||||
|
|
||||||
test: test.sh
|
test: test.sh
|
||||||
SWIG_LIB='$(SWIG_LIB)' PATH=../..:$$PATH SWIG='$(SWIG)' CC='$(CC)' NOSOFTLINKSTEST='$(NOSOFTLINKSTEST)' $(srcdir)/test.sh
|
SWIG_LIB='$(SWIG_LIB)' PATH=../..:$$PATH SWIG='$(SWIG)' CC='$(CC)' NOSOFTLINKSTEST='$(NOSOFTLINKSTEST)' CCACHE='../$(MYNAME)' $(srcdir)/test.sh
|
||||||
|
|
||||||
check: test
|
check: test
|
||||||
|
|
||||||
|
|
@ -73,7 +74,7 @@ distclean: clean
|
||||||
/bin/rm -rf autom4te.cache
|
/bin/rm -rf autom4te.cache
|
||||||
|
|
||||||
maintainer-clean: distclean
|
maintainer-clean: distclean
|
||||||
/bin/rm -f $(srcdir)/$(PACKAGE_NAME).1 $(srcdir)/web/ccache-man.html
|
/bin/rm -f $(srcdir)/$(MYNAME).1 $(srcdir)/web/$(MYNAME)-man.html
|
||||||
|
|
||||||
|
|
||||||
# FIXME: To fix this, test.sh needs to be able to take ccache from the
|
# FIXME: To fix this, test.sh needs to be able to take ccache from the
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,6 @@
|
||||||
#define STATUS_FATAL 4
|
#define STATUS_FATAL 4
|
||||||
#define STATUS_NOCACHE 5
|
#define STATUS_NOCACHE 5
|
||||||
|
|
||||||
#define MYNAME PACKAGE_NAME
|
|
||||||
|
|
||||||
#define LIMIT_MULTIPLE 0.8
|
#define LIMIT_MULTIPLE 0.8
|
||||||
|
|
||||||
/* default maximum cache size */
|
/* default maximum cache size */
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,20 @@ AC_PROG_CPP
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
AC_ARG_PROGRAM # for program_transform_name
|
AC_ARG_PROGRAM # for program_transform_name
|
||||||
|
|
||||||
|
AC_SUBST(MYNAME)
|
||||||
|
if test "x$program_prefix" != "xNONE" -a "x$program_prefix" != "x"
|
||||||
|
then
|
||||||
|
MYNAME="$program_prefix$PACKAGE_NAME"
|
||||||
|
else
|
||||||
|
MYNAME="$PACKAGE_NAME"
|
||||||
|
fi
|
||||||
|
if test "x$program_suffix" != "xNONE" -a "x$program_suffix" != "x"
|
||||||
|
then
|
||||||
|
MYNAME="$MYNAME$program_suffix"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(MYNAME, "$MYNAME", [Define my program name])
|
||||||
|
|
||||||
AC_DEFINE([_GNU_SOURCE], 1,
|
AC_DEFINE([_GNU_SOURCE], 1,
|
||||||
[Define _GNU_SOURCE so that we get all necessary prototypes])
|
[Define _GNU_SOURCE so that we get all necessary prototypes])
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,12 @@ fi
|
||||||
PATH="`echo $PATH | \
|
PATH="`echo $PATH | \
|
||||||
sed -e 's!:/usr\(/local\)*/lib\([0-9]\)*/ccache\(/\)*!!g'`"
|
sed -e 's!:/usr\(/local\)*/lib\([0-9]\)*/ccache\(/\)*!!g'`"
|
||||||
|
|
||||||
CCACHE=../ccache-swig
|
if test -n "$CCACHE"; then
|
||||||
|
CCACHE="$CCACHE"
|
||||||
|
else
|
||||||
|
CCACHE=../ccache-swig
|
||||||
|
fi
|
||||||
|
|
||||||
TESTDIR=test.$$
|
TESTDIR=test.$$
|
||||||
|
|
||||||
test_failed() {
|
test_failed() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue