integrate ccache build
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10920 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c8b41eebf8
commit
a65e883912
7 changed files with 42 additions and 14 deletions
|
|
@ -7,6 +7,7 @@ exec_prefix=@exec_prefix@
|
|||
bindir=@bindir@
|
||||
mandir=@mandir@
|
||||
INSTALLCMD=@INSTALL@
|
||||
PACKAGE_NAME=@PACKAGE_NAME@
|
||||
|
||||
CC=@CC@
|
||||
CFLAGS=@CFLAGS@ -I.
|
||||
|
|
@ -17,11 +18,11 @@ OBJS= ccache.o mdfour.o hash.o execute.o util.o args.o stats.o \
|
|||
cleanup.o snprintf.o unify.o
|
||||
HEADERS = ccache.h mdfour.h
|
||||
|
||||
all: ccache$(EXEEXT)
|
||||
all: $(PACKAGE_NAME)$(EXEEXT)
|
||||
|
||||
docs: ccache.1 web/ccache-man.html
|
||||
|
||||
ccache$(EXEEXT): $(OBJS) $(HEADERS)
|
||||
$(PACKAGE_NAME)$(EXEEXT): $(OBJS) $(HEADERS)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
||||
|
||||
ccache.1: ccache.yo
|
||||
|
|
@ -31,14 +32,14 @@ web/ccache-man.html: ccache.yo
|
|||
mkdir -p man
|
||||
yodl2html -o web/ccache-man.html ccache.yo
|
||||
|
||||
install: ccache$(EXEEXT) ccache.1
|
||||
install: $(PACKAGE_NAME)$(EXEEXT) ccache.1
|
||||
${INSTALLCMD} -d $(DESTDIR)${bindir}
|
||||
${INSTALLCMD} -m 755 ccache$(EXEEXT) $(DESTDIR)${bindir}
|
||||
${INSTALLCMD} -m 755 $(PACKAGE_NAME)$(EXEEXT) $(DESTDIR)${bindir}
|
||||
${INSTALLCMD} -d $(DESTDIR)${mandir}/man1
|
||||
${INSTALLCMD} -m 644 ${srcdir}/ccache.1 $(DESTDIR)${mandir}/man1/
|
||||
|
||||
clean:
|
||||
/bin/rm -f $(OBJS) *~ ccache$(EXEEXT)
|
||||
/bin/rm -f $(OBJS) *~ $(PACKAGE_NAME)$(EXEEXT)
|
||||
|
||||
test: test.sh
|
||||
CC='$(CC)' ./test.sh
|
||||
|
|
@ -46,7 +47,7 @@ test: test.sh
|
|||
check: test
|
||||
|
||||
distclean: clean
|
||||
/bin/rm -f Makefile config.h config.sub config.log build-stamp config.status
|
||||
/bin/rm -f Makefile config.h config.sub config.log build-stamp config.status configure config.h
|
||||
|
||||
# FIXME: To fix this, test.sh needs to be able to take ccache from the
|
||||
# installed prefix, not from the source dir.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
#define CCACHE_VERSION "2.4"
|
||||
#include "ccache_swig_config.h"
|
||||
|
||||
#define CCACHE_VERSION SWIG_VERSION
|
||||
|
||||
#include "config.h"
|
||||
|
||||
|
|
@ -34,7 +36,7 @@
|
|||
#define STATUS_FATAL 4
|
||||
#define STATUS_NOCACHE 5
|
||||
|
||||
#define MYNAME "ccache-swig"
|
||||
#define MYNAME PACKAGE_NAME
|
||||
|
||||
#define LIMIT_MULTIPLE 0.8
|
||||
|
||||
|
|
|
|||
1
CCache/ccache_swig_config.h.in
Normal file
1
CCache/ccache_swig_config.h.in
Normal file
|
|
@ -0,0 +1 @@
|
|||
#define SWIG_VERSION "@PACKAGE_VERSION@"
|
||||
|
|
@ -1,7 +1,8 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT()
|
||||
AC_INIT([ccache-swig], [0.0]) # Get version from SWIG in ccache_swig_config.h.in
|
||||
AC_PREREQ(2.52)
|
||||
AC_CONFIG_SRCDIR([ccache.h])
|
||||
|
||||
AC_MSG_NOTICE([Configuring ccache])
|
||||
|
||||
|
|
|
|||
15
Makefile.in
15
Makefile.in
|
|
@ -14,16 +14,21 @@ datarootdir = @datarootdir@
|
|||
SHELL = /bin/sh
|
||||
SWIG_LIB = @swig_lib@
|
||||
BIN_DIR = @bindir@
|
||||
ENABLE_CCACHE = @ENABLE_CCACHE@
|
||||
TARGET_NOEXE= swig
|
||||
TARGET = $(TARGET_NOEXE)@EXEEXT@
|
||||
SOURCE = Source
|
||||
CCACHE = CCache
|
||||
DOCS = Doc/Manual
|
||||
|
||||
swig: libfiles source
|
||||
swig: libfiles source ccache
|
||||
|
||||
source:
|
||||
@cd $(SOURCE) && $(MAKE)
|
||||
|
||||
ccache:
|
||||
test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE))
|
||||
|
||||
libfiles: $(srcdir)/Lib/swigwarn.swg
|
||||
|
||||
# Files required just for the tarball
|
||||
|
|
@ -349,6 +354,9 @@ clean-docs:
|
|||
@echo cleaning Docs
|
||||
@test -d $(DOCS) || exit 0; cd $(DOCS) && $(MAKE) -s clean
|
||||
|
||||
clean-ccache:
|
||||
test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s clean)
|
||||
|
||||
maintainer-clean: clean-libfiles
|
||||
@cd $(SOURCE) && $(MAKE) maintainer-clean
|
||||
|
||||
|
|
@ -358,7 +366,7 @@ maintainer-clean: clean-libfiles
|
|||
|
||||
DISTCLEAN-DEAD = config.status config.log config.cache swig.spec Makefile mkmf.log libtool
|
||||
|
||||
distclean: distclean-objects clean-examples clean-gifplot distclean-test-suite clean-docs distclean-dead
|
||||
distclean: distclean-objects clean-examples clean-gifplot distclean-test-suite clean-docs distclean-dead distclean-ccache
|
||||
|
||||
distclean-objects: distclean-source
|
||||
|
||||
|
|
@ -371,6 +379,9 @@ distclean-test-suite:
|
|||
@echo distcleaning Examples/test-suite
|
||||
@$(MAKE) -k -s noskip-test-suite ACTION=distclean
|
||||
|
||||
distclean-ccache:
|
||||
test -z "$(ENABLE_CCACHE)" || (cd $(CCACHE) && $(MAKE) -s distclean)
|
||||
|
||||
noskip-test-suite: \
|
||||
noskip-tcl-test-suite \
|
||||
noskip-perl5-test-suite \
|
||||
|
|
|
|||
|
|
@ -13,3 +13,4 @@ ${ACLOCAL-aclocal} -I Tools/config
|
|||
${AUTOHEADER-autoheader}
|
||||
${AUTOMAKE-automake} --add-missing --copy --force-missing
|
||||
${AUTOCONF-autoconf}
|
||||
cd CCache && ${AUTORECONF-autoreconf}
|
||||
|
|
|
|||
17
configure.in
17
configure.in
|
|
@ -2131,7 +2131,6 @@ case $host in
|
|||
esac
|
||||
AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)])
|
||||
|
||||
|
||||
AC_CONFIG_FILES([ \
|
||||
Makefile \
|
||||
swig.spec \
|
||||
|
|
@ -2164,7 +2163,19 @@ AC_CONFIG_FILES([ \
|
|||
Lib/ocaml/swigp4.ml
|
||||
])
|
||||
AC_CONFIG_FILES([preinst-swig], [chmod +x preinst-swig])
|
||||
AC_CONFIG_FILES([CCache/ccache_swig_config.h])
|
||||
|
||||
# ccache
|
||||
AC_ARG_ENABLE([ccache], AS_HELP_STRING([--disable-ccache], [disable building and installation of ccache-swig executable (default enabled)]), [enable_ccache=$enableval], [enable_ccache=yes])
|
||||
AC_MSG_CHECKING([whether to enable ccache-swig])
|
||||
AC_MSG_RESULT([$enable_ccache])
|
||||
|
||||
if test "$enable_ccache" = yes; then
|
||||
AC_CONFIG_SUBDIRS(CCache)
|
||||
ENABLE_CCACHE=1
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_CCACHE)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
|
||||
dnl configure.in ends here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue