From 425e21363e262d3db3c8b2f160f23ed7e15efecc Mon Sep 17 00:00:00 2001 From: wolf Date: Fri, 3 Mar 2000 13:18:49 +0000 Subject: [PATCH] Small clean-ups of Makefiles. Let Makefiles obtain their data themselves, rather than their being passed that. git-svn-id: https://svn.dealii.org/trunk@2545 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/configure | 150 +++++++++++---------- deal.II/configure.in | 61 +++++---- deal.II/doc/Makefile.in | 7 +- deal.II/doc/auto/{Makefile => Makefile.in} | 5 + 4 files changed, 127 insertions(+), 96 deletions(-) rename deal.II/doc/auto/{Makefile => Makefile.in} (98%) diff --git a/deal.II/configure b/deal.II/configure index 4725ffe5fd..01a69e0e4a 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -15,12 +15,12 @@ ac_help="$ac_help --enable-multithreading Set compiler flags to allow for multithreaded programs" ac_help="$ac_help --with-multithreading=DIR use DIR as path to the ACE library" -ac_help="$ac_help - --with-kdoc=DIR use kdoc installed in DIR" ac_help="$ac_help --enable-shared Set compiler flags to generate shared libraries" ac_help="$ac_help --enable-multigrid Include multigrid code in library" +ac_help="$ac_help + --with-kdoc=DIR use kdoc installed in DIR" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -524,27 +524,6 @@ else fi -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } -fi -ac_config_guess=$ac_aux_dir/config.guess -ac_config_sub=$ac_aux_dir/config.sub -ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. - -subdirs="tests" - DEAL2_DIR=`pwd` @@ -554,7 +533,7 @@ DEAL2_DIR=`pwd` # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:558: checking for $ac_word" >&5 +echo "configure:537: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -584,7 +563,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:588: checking for $ac_word" >&5 +echo "configure:567: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -635,7 +614,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:639: checking for $ac_word" >&5 +echo "configure:618: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -667,7 +646,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:671: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:650: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -678,12 +657,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 682 "configure" +#line 661 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -709,12 +688,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:713: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:692: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:718: checking whether we are using GNU C" >&5 +echo "configure:697: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -723,7 +702,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -742,7 +721,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:746: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:725: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -781,7 +760,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:785: checking for $ac_word" >&5 +echo "configure:764: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -813,7 +792,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:817: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:796: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -824,12 +803,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 828 "configure" +#line 807 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -855,12 +834,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:859: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:838: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:864: checking whether we are using GNU C++" >&5 +echo "configure:843: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -869,7 +848,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -888,7 +867,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:892: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:871: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -951,7 +930,7 @@ OS=`uname` # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:955: checking for $ac_word" >&5 +echo "configure:934: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1006,7 +985,7 @@ fi if test $withmultithreading != no ; then echo $ac_n "checking for ACE""... $ac_c" 1>&6 -echo "configure:1010: checking for ACE" >&5 +echo "configure:989: checking for ACE" >&5 if test -d $withmultithreading ; then echo "$ac_t""found" 1>&6 else @@ -1016,26 +995,6 @@ echo "configure:1010: checking for ACE" >&5 fi -# Check whether --with-kdoc or --without-kdoc was given. -if test "${with_kdoc+set}" = set; then - withval="$with_kdoc" - kdocdir=$withval -else - kdocdir=doc/auto/scripts/kdoc -fi - -if test -r $kdocdir/kdoc ; then - echo "$ac_t""found" 1>&6 -else - echo "$ac_t""not found" 1>&6 - { echo "configure: error: Invalid kdoc path" 1>&2; exit 1; } -fi -if test -r $kdocdir/Version ; then - kdocversion=`cat $kdocdir/Version` ; -else - kdocversion=1; -fi - # Check whether --enable-shared or --disable-shared was given. @@ -1075,6 +1034,61 @@ fi + +# Check whether --with-kdoc or --without-kdoc was given. +if test "${with_kdoc+set}" = set; then + withval="$with_kdoc" + kdocdir=$withval +else + kdocdir=doc/auto/scripts/kdoc +fi + +if test -r $kdocdir/kdoc ; then + echo "$ac_t""found" 1>&6 +else + echo "$ac_t""not found" 1>&6 + { echo "configure: error: Invalid kdoc path" 1>&2; exit 1; } +fi +if test -r $kdocdir/Version ; then + kdocversion=`cat $kdocdir/Version` ; +else + kdocversion=1; +fi + + + + + + + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + +subdirs="tests" + + + + + + + trap '' 1 2 15 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 @@ -1141,7 +1155,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "common/Make.global_options doc/Makefile doc/auto/kdoc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "common/Make.global_options doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/deal.II/configure.in b/deal.II/configure.in index 990bba97e3..008b4aefff 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -16,9 +16,6 @@ define([AC_CACHE_LOAD], )dnl define([AC_CACHE_SAVE], )dnl AC_INIT(base) -dnl Configure the `tests' directory, if that is installed. -AC_CONFIG_SUBDIRS(tests) - dnl Set the path to the deal.II libraries to `pwd` DEAL2_DIR=`pwd` @@ -97,25 +94,7 @@ if test $withmultithreading != no ; then fi AC_SUBST(withmultithreading) -dnl Find the kdoc directory for documentation. The old one is in -dnl doc/auto/scripts, but you might want a newer version. -AC_ARG_WITH(kdoc, -[ --with-kdoc=DIR use kdoc installed in DIR], - kdocdir=$withval, - kdocdir=doc/auto/scripts/kdoc) -if test -r $kdocdir/kdoc ; then - AC_MSG_RESULT(found) -else - AC_MSG_RESULT(not found) - AC_MSG_ERROR(Invalid kdoc path) -fi -if test -r $kdocdir/Version ; then - kdocversion=`cat $kdocdir/Version` ; -else - kdocversion=1; -fi -AC_SUBST(kdocdir) -AC_SUBST(kdocversion) + dnl Test whether shared libraries support is requested. Note: dnl default is 'yes', if not on AIX @@ -150,5 +129,41 @@ fi AC_SUBST(enablemultigrid) + +dnl Find the kdoc directory for documentation. The old one is in +dnl doc/auto/scripts, but you might want a newer version. +AC_ARG_WITH(kdoc, +[ --with-kdoc=DIR use kdoc installed in DIR], + kdocdir=$withval, + kdocdir=doc/auto/scripts/kdoc) +if test -r $kdocdir/kdoc ; then + AC_MSG_RESULT(found) +else + AC_MSG_RESULT(not found) + AC_MSG_ERROR(Invalid kdoc path) +fi +if test -r $kdocdir/Version ; then + kdocversion=`cat $kdocdir/Version` ; +else + kdocversion=1; +fi +AC_SUBST(kdocdir) +AC_SUBST(kdocversion) + + + + + +dnl ----------------------------------------------- +dnl Configure other packages + +dnl Configure the `tests' directory, if that is installed. +AC_CONFIG_SUBDIRS(tests) + + + + + + dnl Write output to the global options file -AC_OUTPUT(common/Make.global_options doc/Makefile doc/auto/kdoc/Makefile) +AC_OUTPUT(common/Make.global_options doc/Makefile doc/auto/Makefile doc/auto/kdoc/Makefile) diff --git a/deal.II/doc/Makefile.in b/deal.II/doc/Makefile.in index 81bbf73149..d5cfedd676 100644 --- a/deal.II/doc/Makefile.in +++ b/deal.II/doc/Makefile.in @@ -4,13 +4,10 @@ # Configured variables D = @DEAL2_DIR@ -multigrid= @enablemultigrid@ -kdocdir = $(HOME)/tmp/kdoc include $D/common/Make.global_options -KDOCFLAGS=-I$(kdocdir) $(kdocdir)/kdoc -a -p -L $D/doc/auto/kdoc # generic targets default: autogen-doc tutorial development glossary validate-xrefs @@ -20,11 +17,11 @@ all: default autogen-doc-all # specific targets autogen-doc: - cd auto ; $(MAKE) multigrid=$(multigrid) 'KDOCFLAGS=$(KDOCFLAGS)' + cd auto ; $(MAKE) autogen-doc-all: - cd auto ; $(MAKE) all multigrid=$(multigrid) 'KDOCFLAGS=$(KDOCFLAGS)' + cd auto ; $(MAKE) all tutorial: diff --git a/deal.II/doc/auto/Makefile b/deal.II/doc/auto/Makefile.in similarity index 98% rename from deal.II/doc/auto/Makefile rename to deal.II/doc/auto/Makefile.in index a0bcaa4d03..5a4a2deea1 100644 --- a/deal.II/doc/auto/Makefile +++ b/deal.II/doc/auto/Makefile.in @@ -1,5 +1,10 @@ # Makefile,v 1.8 1999/04/15 17:36:14 wolf Exp + +# Let ./configure insert whether MG shall be documented +multigrid = @enablemultigrid@ + + # specify which are the include files that a specific documentation libary # depends upon kdoc.base = $(shell echo ../../base/include/base/*.h) -- 2.39.5