From: Richard Kreckel Date: Tue, 9 Nov 1999 17:12:41 +0000 (+0000) Subject: Target install should work now more or less. X-Git-Tag: release_0-5-0~196 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=17326773db4c30f9bef59343b4824c5acebe6712 Target install should work now more or less. --- diff --git a/Makefile.in b/Makefile.in index 8eae8513..b7db7d07 100644 --- a/Makefile.in +++ b/Makefile.in @@ -27,6 +27,7 @@ LIBGINACVER = @LibGiNaC_Ver@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ + all: lib ginsh echo "now type make install" @@ -39,13 +40,21 @@ src/.libs/libginac.a: lib: cd src; ${MAKE} all + +# Target for making the GiNaC interactive shell (ginsh): +ginsh: + if [ "${shared}" ]; then ${MAKE} sharedginsh; else ${MAKE} staticginsh; fi + +sharedginsh: src/libginac.la + cd ginsh; ${MAKE} sharedginsh + +staticginsh: src/.libs/libginac.a + cd ginsh; ${MAKE} staticginsh + + # 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 @@ -53,32 +62,31 @@ sharedcheck: src/libginac.la staticcheck: src/.libs/libginac.a cd check; ${MAKE} staticcheck -# Target for making the Ginac INteractive SHell ginsh: -ginsh: - cd ginsh; ${MAKE} all # 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: @ if [ "${shared}" ]; then \ ${MAKE} shlibinst; \ else \ ${MAKE} libinst; \ fi ${INSTALL} -d ${includedir} - ${INSTALL_DATA} include/* ${includedir}/ + ${INSTALL_DATA} include/*.h ${includedir}/ cd ginsh; ${MAKE} install cd doc; ${MAKE} install -shlibinst: libginac.la - ${INSTALL} -d ${libdir} - ${LIBTOOL} install libginac.la ${libdir}/libginac.la +shlibinst: src/libginac.la installdirs + ${LIBTOOL} install src/libginac.la ${libdir}/libginac.la ${LIBTOOL} -n --finish ${libdir} -libinst: .libs/libginac.a - ${INSTALL} -d ${libdir} - ${INSTALL_DATA} .libs/libginac.a ${libdir}/libginac.a +libinst: src/.libs/libginac.a installdirs + ${INSTALL_DATA} src/.libs/libginac.a ${libdir}/libginac.a + +installdirs: + ./mkinstalldirs ${libdir} ${includedir} + # Targets for cleaning up. (clean deletes files created by built, distclean # deletes files created by configuration, uninstall removes all files related @@ -100,6 +108,7 @@ uninstall: cd ginsh; ${MAKE} uninstall cd doc; ${MAKE} uninstall + # Convenient targets for those who wish to extend on the documentation: doc: cd doc; ${MAKE} all @@ -108,8 +117,9 @@ reference: tutorial: cd doc; ${MAKE} tutorial + # Special dummy targets: -.PHONY: clean distclean all install uninstall check ginsh doc +.PHONY: clean distclean all install installdirs uninstall check ginsh doc .SUFFIXES: .o .lo .cpp .SILENT: all check sharedcheck staticcheck doc reference tutorial diff --git a/configure.in b/configure.in index 06a7d981..d4b6d12a 100644 --- a/configure.in +++ b/configure.in @@ -12,7 +12,7 @@ AC_CONFIG_HEADER(config.h) dnl Set the Version Number at this place only: GiNaC_Major_Version=0 GiNaC_Minor_Version=0 -GiNaC_Micro_Version=30 +GiNaC_Micro_Version=40 dnl This composite variable can be inserted where it appears necessary: GiNaC_Version="${GiNaC_Major_Version}.${GiNaC_Minor_Version}.${GiNaC_Micro_Version}" dnl This composition is needed for libtool, if a shared lib shall be built: @@ -68,7 +68,7 @@ case "${shared}" in shared=""; ;; esac -dnl Check for helpers needed for building the GiNaC interactive shell: +dnl Check for helpers needed for building the GiNaC interactive shell (ginsh): AC_PROG_LEX AC_PROG_YACC AC_DECL_YYTEXT diff --git a/doc/Makefile b/doc/Makefile index 66acd0f5..d731fae6 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 = /usr/local +prefix = /tmp 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 88516ac9..1fcdda4c 100644 --- a/ginsh/Makefile.in +++ b/ginsh/Makefile.in @@ -1,5 +1,4 @@ -# This is the prototype Makefile for ginsh. -SHELL = /bin/sh +# This is the prototype Makefile for the GiNaC interactive shell (ginsh). # Not every make knows what CXX is, so we inherit it together with some other # values from configure which checks it anyways: @@ -27,12 +26,18 @@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ -s -OBJECTS=y.tab.o @LEX_OUTPUT_ROOT@.o ../src/*.o +OBJECTS=y.tab.o @LEX_OUTPUT_ROOT@.o -all: depend ginsh +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." -ginsh: ${OBJECTS} - ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} -o ginsh +sharedginsh: depend ${OBJECTS} + ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} -Wl,--rpath -Wl,../src/.libs -L../src/.libs -lginac -o ginsh + +staticginsh: depend ${OBJECTS} + ${CXX} ${CXXFLAGS} ${LDFLAGS} ${OBJECTS} ${LIBS} ../src/.libs/libginac.a -o ginsh # Targets for installation in install directories. install: ginsh installdirs @@ -40,7 +45,7 @@ install: ginsh installdirs -${INSTALL_DATA} ginsh.1 ${man1dir}/ginsh.1 installdirs: - ${SHELL} mkinstalldirs ${bindir} ${man1dir} + ../mkinstalldirs ${bindir} ${man1dir} # Targets for cleaning up. (clean deletes files created by built, distclean # deletes files created by configuration, uninstall removes all files related