From 6a0b4545189926492f657b201e3ed1b9de1dd897 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Fri, 24 Mar 2000 19:45:38 +0000 Subject: [PATCH] - ginac.h includes version.h (created by configure script), which contains library version defines --- Makefile.in | 2 +- NEWS | 3 +++ check/Makefile.in | 2 +- cint/Makefile.in | 2 +- configure | 2 ++ configure.in | 1 + doc/Makefile.in | 2 +- doc/reference/Makefile.in | 2 +- doc/tutorial/Makefile.in | 2 +- ginac/Makefile.in | 14 ++++++++------ ginac/ginac.h | 2 ++ ginac/version.h.in | 31 +++++++++++++++++++++++++++++++ ginsh/Makefile.in | 2 +- tools/Makefile.in | 2 +- 14 files changed, 55 insertions(+), 14 deletions(-) create mode 100644 ginac/version.h.in diff --git a/Makefile.in b/Makefile.in index 1ab83913..fd63e6e6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -359,7 +359,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/NEWS b/NEWS index 47dfa00e..699284cc 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,9 @@ This file records noteworthy changes. - gamma() -> Gamma() - EulerGamma -> gamma - beta() -> Beta() +* #include'ing ginac.h defines the preprocessor symbols GINACLIB_MAJOR_VERSION, + GINACLIB_MINOR_VERSION, and GINACLIB_MICRO_VERSION with the respective GiNaC + library version numbers. 0.5.4 (15 March 2000) * Some algorithms in class matrix (notably determinant) were replaced by diff --git a/check/Makefile.in b/check/Makefile.in index 80a3d076..777124a7 100644 --- a/check/Makefile.in +++ b/check/Makefile.in @@ -278,7 +278,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/cint/Makefile.in b/cint/Makefile.in index a494a339..859afebb 100644 --- a/cint/Makefile.in +++ b/cint/Makefile.in @@ -340,7 +340,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/configure b/configure index ca421d09..ecd447e9 100755 --- a/configure +++ b/configure @@ -3236,6 +3236,7 @@ Makefile GiNaC.spec ginac-config ginac/Makefile +ginac/version.h check/Makefile ginsh/Makefile tools/Makefile @@ -3384,6 +3385,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile GiNaC.spec ginac-config ginac/Makefile +ginac/version.h check/Makefile ginsh/Makefile tools/Makefile diff --git a/configure.in b/configure.in index 432ca153..7d5aa722 100644 --- a/configure.in +++ b/configure.in @@ -193,6 +193,7 @@ Makefile GiNaC.spec ginac-config ginac/Makefile +ginac/version.h check/Makefile ginsh/Makefile tools/Makefile diff --git a/doc/Makefile.in b/doc/Makefile.in index f7d7934f..90b3a168 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -273,7 +273,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/doc/reference/Makefile.in b/doc/reference/Makefile.in index 021b10ea..7addcef5 100644 --- a/doc/reference/Makefile.in +++ b/doc/reference/Makefile.in @@ -169,7 +169,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/doc/tutorial/Makefile.in b/doc/tutorial/Makefile.in index ddb71492..b90fdead 100644 --- a/doc/tutorial/Makefile.in +++ b/doc/tutorial/Makefile.in @@ -326,7 +326,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/ginac/Makefile.in b/ginac/Makefile.in index e4eca61e..d3eabe5c 100644 --- a/ginac/Makefile.in +++ b/ginac/Makefile.in @@ -114,7 +114,7 @@ ginacinclude_HEADERS = ginac.h add.h archive.h basic.h clifford.h color.h colo EXTRA_DIST = container.pl function.pl structure.pl mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = version.h LTLIBRARIES = $(lib_LTLIBRARIES) @@ -142,7 +142,7 @@ CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ HEADERS = $(ginacinclude_HEADERS) -DIST_COMMON = Makefile.am Makefile.in +DIST_COMMON = Makefile.am Makefile.in version.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) @@ -172,6 +172,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status +version.h: $(top_builddir)/config.status version.h.in + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-libLTLIBRARIES: @@ -294,7 +296,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -433,13 +435,13 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Files which are generated by perl scripts $(srcdir)/function.h $(srcdir)/function.cpp: $(srcdir)/function.pl - cd $(srcdir) && perl function.pl + cd $(srcdir) && perl -w function.pl $(srcdir)/lst.h $(srcdir)/lst.cpp: $(srcdir)/container.pl - cd $(srcdir) && perl container.pl lst + cd $(srcdir) && perl -w container.pl lst $(srcdir)/exprseq.h $(srcdir)/exprseq.cpp: $(srcdir)/container.pl - cd $(srcdir) && perl container.pl exprseq + cd $(srcdir) && perl -w container.pl exprseq # Force build of headers before compilation $(srcdir)/add.cpp: $(srcdir)/function.h $(srcdir)/lst.h $(srcdir)/exprseq.h diff --git a/ginac/ginac.h b/ginac/ginac.h index 491b0566..cd7202b8 100644 --- a/ginac/ginac.h +++ b/ginac/ginac.h @@ -23,6 +23,8 @@ #ifndef __GINAC_H__ #define __GINAC_H__ +#include "version.h" + #include "basic.h" #include "ex.h" diff --git a/ginac/version.h.in b/ginac/version.h.in new file mode 100644 index 00000000..81b8ecc6 --- /dev/null +++ b/ginac/version.h.in @@ -0,0 +1,31 @@ +/** @file version.h + * + * GiNaC library version information. */ + +/* + * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __GINAC_VERSION_H__ +#define __GINAC_VERSION_H__ + +/* Major, minor, and micro version number of the GiNaC library. */ +#define GINACLIB_MAJOR_VERSION @GINACLIB_MAJOR_VERSION@ +#define GINACLIB_MINOR_VERSION @GINACLIB_MINOR_VERSION@ +#define GINACLIB_MICRO_VERSION @GINACLIB_MICRO_VERSION@ + +#endif // ndef __GINAC_VERSION_H__ diff --git a/ginsh/Makefile.in b/ginsh/Makefile.in index 5bd33c8e..09bea8f9 100644 --- a/ginsh/Makefile.in +++ b/ginsh/Makefile.in @@ -316,7 +316,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/tools/Makefile.in b/tools/Makefile.in index 0f42a2cd..c04d6dda 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -299,7 +299,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$d/$$file $(distdir)/$$file; \ + cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ -- 2.44.0