From c10054835b4c63a95b37703a952d663f280aa1ce Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Tue, 9 Nov 1999 18:51:11 +0000 Subject: [PATCH] Another restructuring: moved include/*.h -> include/GiNaC/*.h in order to allow compiling against GiNaC without having to make install first. --- Makefile.in | 33 +++++++++++++++++++++------------ check/Makefile.in | 2 +- check/differentiation.cpp | 2 +- check/expand_subs.cpp | 2 +- check/inifcns_consist.cpp | 2 +- check/lsolve_onedim.cpp | 2 +- check/main.cpp | 3 ++- check/matrix_checks.cpp | 2 +- check/normalization.cpp | 2 +- check/numeric_consist.cpp | 2 +- check/numeric_output.cpp | 2 +- check/paranoia_check.cpp | 2 +- check/poly_gcd.cpp | 2 +- check/powerlaws.cpp | 2 +- check/series_expansion.cpp | 2 +- configure | 4 ++-- configure.in | 2 +- doc/Makefile | 2 +- ginsh/Makefile.in | 7 ++++--- ginsh/ginsh.l | 2 +- ginsh/ginsh.y | 2 +- 21 files changed, 46 insertions(+), 35 deletions(-) diff --git a/Makefile.in b/Makefile.in index b7db7d07..bcf90630 100644 --- a/Makefile.in +++ b/Makefile.in @@ -28,7 +28,7 @@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ -all: lib ginsh +all: lib ginsh/ginsh echo "now type make install" src/libginac.la: @@ -41,9 +41,15 @@ lib: cd src; ${MAKE} all -# Target for making the GiNaC interactive shell (ginsh): -ginsh: - if [ "${shared}" ]; then ${MAKE} sharedginsh; else ${MAKE} staticginsh; fi +# Targets for making the GiNaC interactive shell (ginsh) +ginsh: ginsh/ginsh + +ginsh/ginsh: + if [ "${shared}" ]; then \ + ${MAKE} sharedginsh; \ + else \ + ${MAKE} staticginsh; \ + fi sharedginsh: src/libginac.la cd ginsh; ${MAKE} sharedginsh @@ -54,7 +60,11 @@ staticginsh: src/.libs/libginac.a # Target for running a test-suite across the library: check: - if [ "${shared}" ]; then ${MAKE} sharedcheck; else ${MAKE} staticcheck; fi + if [ "${shared}" ]; then \ + ${MAKE} sharedcheck; \ + else \ + ${MAKE} staticcheck; \ + fi sharedcheck: src/libginac.la cd check; ${MAKE} sharedcheck @@ -66,22 +76,21 @@ staticcheck: src/.libs/libginac.a # Targets for installation in install directories. The user-visible target # `install' determines which one to call (static lib only or both shared and # static lib). -install: +install: installdirs @ if [ "${shared}" ]; then \ - ${MAKE} shlibinst; \ + ${MAKE} sharedinst; \ else \ - ${MAKE} libinst; \ + ${MAKE} staticinst; \ fi - ${INSTALL} -d ${includedir} - ${INSTALL_DATA} include/*.h ${includedir}/ + ${INSTALL_DATA} include/GiNaC/*.h ${includedir}/ cd ginsh; ${MAKE} install cd doc; ${MAKE} install -shlibinst: src/libginac.la installdirs +sharedinst: src/libginac.la ${LIBTOOL} install src/libginac.la ${libdir}/libginac.la ${LIBTOOL} -n --finish ${libdir} -libinst: src/.libs/libginac.a installdirs +staticinst: src/.libs/libginac.a ${INSTALL_DATA} src/.libs/libginac.a ${libdir}/libginac.a installdirs: diff --git a/check/Makefile.in b/check/Makefile.in index 6572b14b..be0c4100 100644 --- a/check/Makefile.in +++ b/check/Makefile.in @@ -26,7 +26,7 @@ OBJECTS = paranoia_check.o numeric_output.o numeric_consist.o powerlaws.o \ all: echo "Please call it with 'make check' from top-level Makefile." echo "Alternatively, you can use this Makefile's targets {shared|static}check" - echo "depending on your personal preferences and which lib you built." + echo "depending on your personal preferences and which library you built." sharedcheck: ${OBJECTS} ../src/.libs/libginac.so ${CXX} ${LDFLAGS} ${OBJECTS} -Wl,--rpath -Wl,../src/.libs -L../src/.libs -lginac ${LIBS} -o main diff --git a/check/differentiation.cpp b/check/differentiation.cpp index e917bd79..6537eb3f 100644 --- a/check/differentiation.cpp +++ b/check/differentiation.cpp @@ -2,7 +2,7 @@ /* Tests for symbolic differentiation, including various functions. */ -#include "ginac.h" +#include static unsigned check_diff(const ex &e, const symbol &x, const ex &d, unsigned nth=1) diff --git a/check/expand_subs.cpp b/check/expand_subs.cpp index 083eae54..e29e1777 100644 --- a/check/expand_subs.cpp +++ b/check/expand_subs.cpp @@ -12,7 +12,7 @@ * substitute a0 by -a1 in e * after which e should return 0 (without expanding). */ -#include "ginac.h" +#include #define VECSIZE 100 diff --git a/check/inifcns_consist.cpp b/check/inifcns_consist.cpp index 35baf29c..8eaf15fc 100644 --- a/check/inifcns_consist.cpp +++ b/check/inifcns_consist.cpp @@ -3,7 +3,7 @@ /* This test routine applies assorted tests on initially known higher level * functions. */ -#include "ginac.h" +#include /* Simple tests on the sine trigonometric function. */ static unsigned inifcns_consist_sin(void) diff --git a/check/lsolve_onedim.cpp b/check/lsolve_onedim.cpp index d89722f2..f2dc8c06 100644 --- a/check/lsolve_onedim.cpp +++ b/check/lsolve_onedim.cpp @@ -3,7 +3,7 @@ /* This test routine does some simple checks on solving a polynomial for a * variable. */ -#include "ginac.h" +#include unsigned lsolve_onedim(void) { diff --git a/check/main.cpp b/check/main.cpp index 1440777a..787f9208 100644 --- a/check/main.cpp +++ b/check/main.cpp @@ -1,6 +1,7 @@ // check/main.cpp -#include "ginac.h" +#include +#include #include "check.h" int main() diff --git a/check/matrix_checks.cpp b/check/matrix_checks.cpp index 1bf8e0c8..4be5af73 100644 --- a/check/matrix_checks.cpp +++ b/check/matrix_checks.cpp @@ -2,8 +2,8 @@ /* Here we test manipulations on GiNaC's symbolic matrices. */ -#include "ginac.h" #include +#include static unsigned matrix_determinants(void) { diff --git a/check/normalization.cpp b/check/normalization.cpp index 83befd85..89809c1a 100644 --- a/check/normalization.cpp +++ b/check/normalization.cpp @@ -2,7 +2,7 @@ /* Rational function normalization test-suite. */ -#include "ginac.h" +#include static symbol x("x"), y("y"), z("z"); diff --git a/check/numeric_consist.cpp b/check/numeric_consist.cpp index d7a5b6b8..9f558295 100644 --- a/check/numeric_consist.cpp +++ b/check/numeric_consist.cpp @@ -3,8 +3,8 @@ /* This test routine creates some numbers and check the result of several * boolean tests on these numbers like is_integer() etc... */ -#include "ginac.h" #include +#include /* Simple and maybe somewhat pointless consistency tests of assorted tests and * conversions. */ diff --git a/check/numeric_output.cpp b/check/numeric_output.cpp index f010ab79..f35663ea 100644 --- a/check/numeric_output.cpp +++ b/check/numeric_output.cpp @@ -1,6 +1,6 @@ // check/numeric_output.cpp -#include "ginac.h" +#include unsigned numeric_output(void) { diff --git a/check/paranoia_check.cpp b/check/paranoia_check.cpp index bc66deaf..6504bd85 100644 --- a/check/paranoia_check.cpp +++ b/check/paranoia_check.cpp @@ -5,7 +5,7 @@ * a sick behaviour again. But since we are paranoic and we want to exclude * that behaviour for good... */ -#include "ginac.h" +#include // The very first pair of historic problems had its roots in power.cpp and was // finally resolved on April 27th. (Fixing the first on April 23rd actually diff --git a/check/poly_gcd.cpp b/check/poly_gcd.cpp index 6f81f6aa..ee8b63d4 100644 --- a/check/poly_gcd.cpp +++ b/check/poly_gcd.cpp @@ -3,7 +3,7 @@ /* Some test with polynomial GCD calculations. See also the checks for * rational function normalization in normalization.cpp. */ -#include "ginac.h" +#include const int MAX_VARIABLES = 5; diff --git a/check/powerlaws.cpp b/check/powerlaws.cpp index 9177dd70..3dc867df 100644 --- a/check/powerlaws.cpp +++ b/check/powerlaws.cpp @@ -3,7 +3,7 @@ /* Tests for power laws. You shouldn't try to draw much inspiration from * this code, it is a sanity check rather deeply rooted in GiNaC's classes. */ -#include "ginac.h" +#include static unsigned powerlaws1(void) { diff --git a/check/series_expansion.cpp b/check/series_expansion.cpp index ceb9016a..b5cc110c 100644 --- a/check/series_expansion.cpp +++ b/check/series_expansion.cpp @@ -2,7 +2,7 @@ /* Series expansion test (Laurent and Taylor series). */ -#include "ginac.h" +#include static symbol x("x"); diff --git a/configure b/configure index 2424819a..4f04a4ca 100755 --- a/configure +++ b/configure @@ -454,7 +454,7 @@ echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. -ac_unique_file=include/ginac.h +ac_unique_file=include/GiNaC/ginac.h # Find the source files, if location was not specified. if test -z "$srcdir"; then @@ -528,7 +528,7 @@ fi GiNaC_Major_Version=0 GiNaC_Minor_Version=0 -GiNaC_Micro_Version=30 +GiNaC_Micro_Version=40 GiNaC_Version="${GiNaC_Major_Version}.${GiNaC_Minor_Version}.${GiNaC_Micro_Version}" LibGiNaC_Ver="${GiNaC_Major_Version}:${GiNaC_Micro_Version}:${GiNaC_Minor_Version}" diff --git a/configure.in b/configure.in index d4b6d12a..069bb727 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ dnl See aclocal.m4 for additional self-made macros. dnl =========================================================================== dnl This file is used as a signal that everything is in place: -AC_INIT(include/ginac.h) +AC_INIT(include/GiNaC/ginac.h) dnl A convenient header file for some additional system-dependend output: AC_CONFIG_HEADER(config.h) diff --git a/doc/Makefile b/doc/Makefile index d731fae6..66acd0f5 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -5,7 +5,7 @@ # Substitution variables from configure skript: # Here come the usual install directories in GNU-configure fashion: -prefix = /tmp +prefix = /usr/local docdir = ${prefix}/share/doc/GiNaC srcdir = . # Dimitri van Heesch's Doxygen is needed for developer's resource: diff --git a/ginsh/Makefile.in b/ginsh/Makefile.in index 1fcdda4c..fefd5d5a 100644 --- a/ginsh/Makefile.in +++ b/ginsh/Makefile.in @@ -4,7 +4,7 @@ # values from configure which checks it anyways: CXX = @CXX@ CXXFLAGS = @CXXFLAGS@ -CPPFLAGS = @CPPFLAGS@ -I../ -I../include +CPPFLAGS = @CPPFLAGS@ -I.. -I../include DEFS = @DEFS@ LIBS = @LIBS@ @LEXLIB@ LDFLAGS = @LDFLAGS@ @@ -30,8 +30,8 @@ OBJECTS=y.tab.o @LEX_OUTPUT_ROOT@.o all: echo "Please call it with 'make ginsh' from top-level Makefile." - echo "Alternatively, you can use this Makefile's targets {shared|static} ginsh" - echo "depending on your personal preferences and which lib you built." + echo "Alternatively, you can use this Makefile's targets {shared|static}ginsh" + echo "depending on your personal preferences and which library you built." sharedginsh: depend ${OBJECTS} ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} -Wl,--rpath -Wl,../src/.libs -L../src/.libs -lginac -o ginsh @@ -72,6 +72,7 @@ depend: # Special dummy targets: .PHONY: clean distclean depend all install uninstall check doc .SUFFIXES: .o .c .h .y .l +.SILENT: all # Suffix rules: .c.o : diff --git a/ginsh/ginsh.l b/ginsh/ginsh.l index f46f9490..6f4fb212 100644 --- a/ginsh/ginsh.l +++ b/ginsh/ginsh.l @@ -22,7 +22,7 @@ extern "C" { } #include -#include +#include #include "ginsh.h" #include "y.tab.h" diff --git a/ginsh/ginsh.y b/ginsh/ginsh.y index 143eae56..e0d1de84 100644 --- a/ginsh/ginsh.y +++ b/ginsh/ginsh.y @@ -33,7 +33,7 @@ extern "C" { #include #include -#include +#include #include "ginsh.h" -- 2.44.0