remove non-standard --with-release-suffix configure options and fix the standard autoconf options --program-prefix and --program-suffix

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8998 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-03-10 22:54:02 +00:00
commit 5ea5667e18
6 changed files with 13 additions and 18 deletions

View file

@ -32,7 +32,7 @@ INCLUDES =
LIBS =
INTERFACE =
SWIGOPT =
SWIG = swig@release_suffix@
SWIG = swig
LIBM = @LIBM@
LIBC = @LIBC@

View file

@ -13,7 +13,8 @@ srcdir = @srcdir@
SHELL = /bin/sh
SWIG_LIB = @swig_lib@
BIN_DIR = @bindir@
TARGET = swig@release_suffix@@EXEEXT@
TARGET_NOEXE= swig
TARGET = $(TARGET_NOEXE)@EXEEXT@
SOURCE = Source
swig: libfiles source
@ -355,6 +356,8 @@ INSTALL = @abs_srcdir@/Tools/config/install-sh -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL} -m 755
MKINSTDIRS = @abs_srcdir@/Tools/config/install-sh -m 0755 -d
# Use standard autoconf approach to transform executable name using --program-prefix and --program-suffix
transform = @program_transform_name@
install: install-main install-lib
@echo "Installation complete"
@ -362,8 +365,8 @@ install: install-main install-lib
install-main:
@echo "Installing SWIG executable"
@$(MKINSTDIRS) $(DESTDIR)$(BIN_DIR)
@echo "Installing $(BIN_DIR)/$(TARGET)"
@$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BIN_DIR)/$(TARGET)
@echo "Installing $(DESTDIR)$(BIN_DIR)/`echo $(TARGET_NOEXE) | sed '$(transform)'`@EXEEXT@"
@$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BIN_DIR)/`echo $(TARGET_NOEXE) | sed '$(transform)'`@EXEEXT@
lib-languages = gcj typemaps tcl perl5 python guile java mzscheme ruby php4 ocaml \
pike chicken csharp modula3 allegrocl clisp lua cffi uffi
@ -409,8 +412,8 @@ uninstall: uninstall-main uninstall-lib
@echo "Uninstall complete"
uninstall-main:
@echo "Uninstalling $(DESTDIR)$(BIN_DIR)/$(TARGET)"
rm -f $(DESTDIR)$(BIN_DIR)/$(TARGET)
@echo "Uninstalling SWIG executable $(DESTDIR)$(BIN_DIR)/`echo $(TARGET_NOEXE) | sed '$(transform)'`@EXEEXT@"
rm -f $(DESTDIR)$(BIN_DIR)/`echo $(TARGET_NOEXE) | sed '$(transform)'`@EXEEXT@
uninstall-lib:
@echo "Uninstalling the SWIG library"

View file

@ -98,7 +98,7 @@ CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
# This occurs on each invocation of make and is a step towards providing support for multiple
# build directories.
all-local: eswig@EXEEXT@
cp eswig@EXEEXT@ ../swig@release_suffix@@EXEEXT@
cp eswig@EXEEXT@ ../swig@EXEEXT@
clean-local:
rm -f ../swig@release_suffix@@EXEEXT@
rm -f ../swig@EXEEXT@

View file

@ -1913,14 +1913,6 @@ AC_ARG_WITH(swiglibdir,[ --with-swiglibdir=DIR Put SWIG system-independent li
AC_SUBST(swig_lib)
AC_DEFINE_DIR(SWIG_LIB, swig_lib, [Directory for SWIG system-independent libraries])
# Configure RELEASESUFFIX (for setups having both SWIG 1.1 and 1.3 on a system...)
AC_ARG_WITH(release-suffix,
[ --with-release-suffix=SUFFIX Attach SUFFIX to the binary. ],
[release_suffix="$withval"], [release_suffix=""])
AC_SUBST(release_suffix)
AC_DEFINE_UNQUOTED(RELEASE_SUFFIX, "$release_suffix", [Executable release suffix for co-existence with older versions])
AC_CONFIG_FILES([ \
Makefile \
swig.spec \

2
debian/rules vendored
View file

@ -12,7 +12,7 @@ configure: configure-stamp
configure-stamp:
dh_testdir
./autogen-debian.sh
./configure --prefix=/usr --mandir=/usr/share/man --with-swiglibdir=/usr/share/swig1.3 --with-release-suffix=-1.3
./configure --prefix=/usr --mandir=/usr/share/man --with-swiglibdir=/usr/share/swig1.3 --program-suffix=-1.3
touch configure-stamp
build: configure-stamp build-stamp

View file

@ -4,4 +4,4 @@ srcdir=`cd $builddir && cd @srcdir@ && pwd`
SWIG_LIB=$srcdir/Lib
#SWIG_LIB=`cygpath -w $srcdir/Lib` # For native Windows version of SWIG
export SWIG_LIB
exec $builddir/swig@release_suffix@ $*
exec $builddir/swig $*