VERSION, Source/Include/swigver.h.in: New files.

Source/Include/swigver.h: Deleted from repo, now generated by
configure from swigver.h.in same directory.

configure.in: Source ./VERSION to get var definitions.
(PACKAGE, VERSION, SWIG_VERSION, SWIG_SPIN): New vars, @-substituted.
Also do `AC_OUTPUT' on Source/Include/swigver.h.

Makefile.in (dd): New var, the distribution directory.
(dist, dist-suggested): New targets.

Source/SWIG1.1/emit.cxx (emit_banner): Use `SWIG_VERSION' instead
of integers `SWIG_VERSION_MAJOR' and `SWIG_VERSION_MINOR' (which are
deleted).

Source/SWIG1.1/main.cxx (SWIG_main): Likewise.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@235 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Thien-Thi Nguyen 2000-02-12 02:21:22 +00:00
commit e0957d51e2
6 changed files with 150 additions and 82 deletions

View file

@ -173,3 +173,24 @@ install-lib:
install-runtime: install-runtime:
@cd Runtime; $(MAKE) install @cd Runtime; $(MAKE) install
############################################################################
# DIST and other maintenance
############################################################################
# distribution directory
dd = @PACKAGE@-@VERSION@
dist:
@echo 'Dave, what do you want to do w/ "make dist"?'
@echo 'See Makefile.in target "dist-suggested" for an idea.'
@echo ' --thi'
false
dist-suggested:
rm -rf $(dd) $(dd).tar.gz
cvs export -d $(dd) -r HEAD SWIG
tar cf - $(dd) | gzip --best > $(dd).tar.gz
rm -rf $(dd)
# Makefile ends here

View file

@ -0,0 +1,5 @@
/* SWIG version information */
#define SWIG_VERSION "@SWIG_VERSION@"
#define SWIG_SPIN "@SWIG_SPIN@"

View file

@ -32,7 +32,7 @@ void emit_banner(FILE *f) {
* FILE : %s\n\ * FILE : %s\n\
* \n\ * \n\
* This file was automatically generated by SWIG (http://www.swig.org).\n\ * This file was automatically generated by SWIG (http://www.swig.org).\n\
* Version %d.%d %s\n\ * Version %s %s\n\
* \n\ * \n\
* Portions Copyright (c) 1995-1999\n\ * Portions Copyright (c) 1995-1999\n\
* The University of Utah, The Regents of the University of California, and\n\ * The University of Utah, The Regents of the University of California, and\n\
@ -44,7 +44,7 @@ void emit_banner(FILE *f) {
* changes to this file unless you know what you are doing--modify the SWIG \n\ * changes to this file unless you know what you are doing--modify the SWIG \n\
* interface file instead. \n\ * interface file instead. \n\
*\n\ *\n\
*/\n\n", fn_runtime, SWIG_MAJOR_VERSION, SWIG_MINOR_VERSION, SWIG_SPIN); */\n\n", fn_runtime, SWIG_VERSION, SWIG_SPIN);
fprintf(f,"\n#define SWIGCODE\n"); fprintf(f,"\n#define SWIGCODE\n");

View file

@ -208,8 +208,8 @@ int SWIG_main(int argc, char *argv[], Language *l) {
Swig_arg_error(); Swig_arg_error();
} }
} else if (strcmp(argv[i],"-version") == 0) { } else if (strcmp(argv[i],"-version") == 0) {
fprintf(stderr,"\nSWIG Version %d.%d %s\n", SWIG_MAJOR_VERSION, fprintf(stderr,"\nSWIG Version %s %s\n",
SWIG_MINOR_VERSION, SWIG_SPIN); SWIG_VERSION, SWIG_SPIN);
fprintf(stderr,"Copyright (c) 1995-98\n"); fprintf(stderr,"Copyright (c) 1995-98\n");
fprintf(stderr,"University of Utah and the Regents of the University of California\n"); fprintf(stderr,"University of Utah and the Regents of the University of California\n");
fprintf(stderr,"\nCompiled with %s\n", SWIG_CC); fprintf(stderr,"\nCompiled with %s\n", SWIG_CC);

26
SWIG/VERSION Normal file
View file

@ -0,0 +1,26 @@
# This is a -*- shell-script -*- sourced by configure
# Commentary:
#
# This file is included in the distribution.
#
# The variable `devrelease_today' is the version suffix "u-DATE-TIME".
# This ensures a version w/ second resolution, great for developers, but
# unnecessary for release. The "u" is for "unstable". For release,
# remove (or comment out) the `devrelease_today' component of var
# `SWIG_MINOR_VERSION', do "make dist", and then add `devrelease_today'
# back again.
devrelease_today=u-`date +%Y%m%d-%H%M`
SWIG_MAJOR_VERSION=1
SWIG_MINOR_VERSION=3$devrelease_today
SWIG_VERSION=$SWIG_MAJOR_VERSION.$SWIG_MINOR_VERSION
SWIG_SPIN='(Alpha 1)'
# For autoconf.
VERSION=$SWIG_VERSION
PACKAGE=swig
# VERSION ends here

View file

@ -1,6 +1,11 @@
dnl Process this file with autoconf to produce a configure script. dnl Process this file with autoconf to produce a configure script.
AC_INIT(Source/Swig/swig.h) AC_INIT(Source/Swig/swig.h)
AC_PREREQ(2.0) AC_PREREQ(2.0)
. $srcdir/VERSION
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_SUBST(SWIG_VERSION)
AC_SUBST(SWIG_SPIN)
# Set name for machine-dependent library files # Set name for machine-dependent library files
AC_SUBST(MACHDEP) AC_SUBST(MACHDEP)
@ -483,8 +488,19 @@ cd Tools; ./ltconfig --enable-dlopen ltmain.sh; cd ..
AC_CONFIG_SUBDIRS(Source/SWILL Source/DOH) AC_CONFIG_SUBDIRS(Source/SWILL Source/DOH)
AC_OUTPUT(Makefile Source/Swig/Makefile AC_OUTPUT(
Source/Preprocessor/Makefile Source/SWIG1.1/Makefile Examples/Makefile
Source/Modules1.1/Makefile Source/LParse/Makefile Makefile
Source/Experiment/Makefile Source/Swim/Makefile Examples/Makefile Source/Include/swigconfig.h Runtime/Makefile
Source/Expat/Makefile Source/Xmlparse/Makefile Runtime/Makefile) Source/Expat/Makefile
Source/Experiment/Makefile
Source/Include/swigconfig.h
Source/Include/swigver.h
Source/LParse/Makefile
Source/Modules1.1/Makefile
Source/Preprocessor/Makefile
Source/SWIG1.1/Makefile
Source/Swig/Makefile
Source/Swim/Makefile
Source/Xmlparse/Makefile
)