From 8e467da27405f1cc79cf3bf83f0b084e9b5e94c6 Mon Sep 17 00:00:00 2001 From: guido Date: Wed, 1 Mar 2000 22:02:44 +0000 Subject: [PATCH] Configuration for kdoc git-svn-id: https://svn.dealii.org/trunk@2542 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/configure | 69 +++++++++++++++------- deal.II/configure.in | 21 ++++++- deal.II/doc/Makefile.in | 11 ++-- deal.II/doc/auto/Makefile | 59 ++---------------- deal.II/doc/auto/kdoc/Makefile.in | 68 +++++++++++++++++++++ deal.II/doc/auto/kdoc/multigrid/.cvsignore | 1 + 6 files changed, 145 insertions(+), 84 deletions(-) create mode 100644 deal.II/doc/auto/kdoc/Makefile.in create mode 100644 deal.II/doc/auto/kdoc/multigrid/.cvsignore diff --git a/deal.II/configure b/deal.II/configure index 168840f14d..4725ffe5fd 100755 --- a/deal.II/configure +++ b/deal.II/configure @@ -15,6 +15,8 @@ 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 @@ -552,7 +554,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:556: checking for $ac_word" >&5 +echo "configure:558: 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 @@ -582,7 +584,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:586: checking for $ac_word" >&5 +echo "configure:588: 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 @@ -633,7 +635,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:637: checking for $ac_word" >&5 +echo "configure:639: 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 @@ -665,7 +667,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:669: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:671: 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. @@ -676,12 +678,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 680 "configure" +#line 682 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:687: \"$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 @@ -707,12 +709,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:711: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:713: 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:716: checking whether we are using GNU C" >&5 +echo "configure:718: 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 @@ -721,7 +723,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:725: \"$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:727: \"$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 @@ -740,7 +742,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:744: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:746: 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 @@ -779,7 +781,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:783: checking for $ac_word" >&5 +echo "configure:785: 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 @@ -811,7 +813,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:815: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:817: 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. @@ -822,12 +824,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 826 "configure" +#line 828 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:833: \"$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 @@ -853,12 +855,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:857: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:859: 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:862: checking whether we are using GNU C++" >&5 +echo "configure:864: 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 @@ -867,7 +869,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:871: \"$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:873: \"$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 @@ -886,7 +888,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:890: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:892: 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 @@ -949,7 +951,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:953: checking for $ac_word" >&5 +echo "configure:955: 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 @@ -1004,7 +1006,7 @@ fi if test $withmultithreading != no ; then echo $ac_n "checking for ACE""... $ac_c" 1>&6 -echo "configure:1008: checking for ACE" >&5 +echo "configure:1010: checking for ACE" >&5 if test -d $withmultithreading ; then echo "$ac_t""found" 1>&6 else @@ -1014,6 +1016,27 @@ echo "configure:1008: 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. if test "${enable_shared+set}" = set; then @@ -1118,7 +1141,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo "common/Make.global_options doc/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "common/Make.global_options doc/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 3c4c5ef9f5..990bba97e3 100644 --- a/deal.II/configure.in +++ b/deal.II/configure.in @@ -97,6 +97,25 @@ 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 @@ -132,4 +151,4 @@ AC_SUBST(enablemultigrid) dnl Write output to the global options file -AC_OUTPUT(common/Make.global_options doc/Makefile) +AC_OUTPUT(common/Make.global_options doc/Makefile doc/auto/kdoc/Makefile) diff --git a/deal.II/doc/Makefile.in b/deal.II/doc/Makefile.in index 4e68f56b2b..81bbf73149 100644 --- a/deal.II/doc/Makefile.in +++ b/deal.II/doc/Makefile.in @@ -3,14 +3,14 @@ ############################### # Configured variables -D = @top_srcdir@ +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 +20,11 @@ all: default autogen-doc-all # specific targets autogen-doc: - cd auto ; $(MAKE) multigrid=$(multigrid) + cd auto ; $(MAKE) multigrid=$(multigrid) 'KDOCFLAGS=$(KDOCFLAGS)' autogen-doc-all: - cd auto ; $(MAKE) all multigrid=$(multigrid) + cd auto ; $(MAKE) all multigrid=$(multigrid) 'KDOCFLAGS=$(KDOCFLAGS)' tutorial: @@ -54,4 +54,3 @@ clean: .PHONY: default all autogen-doc autogen-doc-all tutorial clean development validate-xrefs glossary - diff --git a/deal.II/doc/auto/Makefile b/deal.II/doc/auto/Makefile index 3e7ffe6b10..375c7da6fd 100644 --- a/deal.II/doc/auto/Makefile +++ b/deal.II/doc/auto/Makefile @@ -1,10 +1,5 @@ # Makefile,v 1.8 1999/04/15 17:36:14 wolf Exp - -########################################################################## -# Change this section only, if you want to add a documentation library # -########################################################################## -# # specify which are the include files that a specific documentation libary # depends upon kdoc.base = $(shell echo ../../base/include/base/*.h) @@ -22,30 +17,9 @@ endif # deal.II library into just one file kdoc.dealII = $(kdoc.grid) $(kdoc.dof) $(kdoc.numerics) -# specify the names of the resulting doc libraries -kdoc.library-files = kdoc/base.kdoc \ - kdoc/lac.kdoc \ - kdoc/basic.kdoc \ - kdoc/grid.kdoc \ - kdoc/dof.kdoc \ - kdoc/numerics.kdoc \ - kdoc/multigrid.kdoc - -########################################################################## -# End of changeable section # -########################################################################## - - # include global paths and variables include ../../common/Make.global_options -# make rule names to rerun the generation of a library -kdoc.library-files.rerun = $(kdoc.library-files:%.kdoc=%.kdoc.rerun) - - -KDOCFLAGS = -I../scripts/kdoc ../scripts/kdoc/kdoc -a -p -#KDOCFLAGS = /home/people/wolf/var/kdoc/kdoc2/bin/kdoc -a -p \ -# --html-logo=../../../pictures/deal.II_3.0_2.150.jpg ifeq ($(shell uname),SunOS) DOCPP = /home/people/wolf/Config/doc++/bin/doc++ #DOCPP = /home/people/kanschat/bin/doc++ @@ -75,37 +49,12 @@ cvslog: ## targets for kdoc generated HTML output ################################################################################# -# make the .kdoc files twice: once without and a second time with -# crossreferencing the other libraries -kdoc: $(kdoc.library-files) $(kdoc.library-files.rerun) +# Make in kdoc subdirectory +kdoc: + @cd kdoc ; $(MAKE) -# rule how to generate the documentation the first time, i.e. without -# crossreferencing the other doc-libraries. we do not try to make it -# dependent on anything, since it needs to be generated anyway -# -# since the rule is a rather complex one, involving the computation of -# variable names, here is the stripped down version for the base library: -# kdoc/base.kdoc: -# @cd kdoc ; $(PERL) $(KDOCFLAGS) -dbase \ -# base $(kdoc.base:../..%=../../..%) -$(kdoc.library-files): - @cd kdoc ; \ - $(PERL) $(KDOCFLAGS) \ - -d$(subst .kdoc,,$(subst kdoc/,,$@)) \ - $(subst .kdoc,,$(subst kdoc/,,$@)) \ - $($(subst /,.,$(subst .kdoc,,$@)):../..%=../../..%) - -# rule how to generate the documentation the second time, i.e. with -# crossreferencing the other doc-libraries this time. the rule is -# similar to the above one, but includes the other libraries -$(kdoc.library-files.rerun): - @cd kdoc ; \ - $(PERL) $(KDOCFLAGS) $(kdoc.library-files:kdoc/%.kdoc=-l%) \ - -d$(subst .kdoc.rerun,,$(subst kdoc/,,$@)) \ - $(subst .kdoc.rerun,,$(subst kdoc/,,$@)) \ - $($(subst /,.,$(subst .kdoc.rerun,,$@)):../..%=../../..%) - +# Will not work for kdoc2 kdoc/names.html: $(kdoc.libray-files) @cd kdoc ; $(PERL) ../scripts/index.pl *.kdoc > names.html diff --git a/deal.II/doc/auto/kdoc/Makefile.in b/deal.II/doc/auto/kdoc/Makefile.in new file mode 100644 index 0000000000..bcaa565d89 --- /dev/null +++ b/deal.II/doc/auto/kdoc/Makefile.in @@ -0,0 +1,68 @@ +############################################################ +# $Id$ +############################################################ + +D = @DEAL2_DIR@ +multigrid = @enablemultigrid@ +kdocdir = $D/@kdocdir@ +kdocversion = @kdocversion@ + + +include $D/common/Make.global_options + +KDOCFLAGS=-I$(kdocdir) $(kdocdir)/kdoc -a -p -L $D/doc/auto/kdoc + +kdoc.base = $(shell echo $D/base/include/base/*.h) +kdoc.lac = $(shell echo $D/lac/include/lac/*.h) +kdoc.grid = $(shell echo $D/deal.II/include/grid/*.h) +kdoc.dof = $(shell echo $D/deal.II/include/dofs/*.h) \ + $(shell echo $D/deal.II/include/fe/*.h) +kdoc.numerics = $(shell echo $D/deal.II/include/numerics/*.h) +kdoc.multigrid= $(shell echo $D/deal.II/include/multigrid/*.h) + + +# for latex-output, we join the different libraries of the +# deal.II library into just one file +kdoc.dealII = $(kdoc.grid) $(kdoc.dof) $(kdoc.numerics) + +# specify the names of the resulting doc libraries +ifeq ($(multigrid),yes) +kdoc.library-files = base.kdoc \ + lac.kdoc \ + grid.kdoc \ + dof.kdoc \ + numerics.kdoc \ + multigrid.kdoc +else +kdoc.library-files = base.kdoc \ + lac.kdoc \ + grid.kdoc \ + dof.kdoc \ + numerics.kdoc +endif + +kdoc: $(kdoc.library-files) + +base.kdoc: $(kdoc.base) + @$(PERL) $(KDOCFLAGS) $(subst .kdoc,,$@) -d $(subst .kdoc,,$@) -L . \ + $^ + +lac.kdoc: $(kdoc.lac) + @$(PERL) $(KDOCFLAGS) $(subst .kdoc,,$@) -d $(subst .kdoc,,$@) -L . \ + -l base $^ + +grid.kdoc: $(kdoc.grid) + @$(PERL) $(KDOCFLAGS) $(subst .kdoc,,$@) -d $(subst .kdoc,,$@) -L . \ + -l base $^ + +dof.kdoc: $(kdoc.dof) + $(PERL) $(KDOCFLAGS) $(subst .kdoc,,$@) -d $(subst .kdoc,,$@) -L . \ + -l base -llac -lgrid $^ + +numerics.kdoc: $(kdoc.numerics) + @$(PERL) $(KDOCFLAGS) $(subst .kdoc,,$@) -d $(subst .kdoc,,$@) -L . \ + -l base -llac -lgrid -ldof $^ + +multigrid.kdoc: $(kdoc.multigrid) + @$(PERL) $(KDOCFLAGS) $(subst .kdoc,,$@) -d $(subst .kdoc,,$@) -L . \ + -l base -llac -lgrid -ldof -lnumerics $^ diff --git a/deal.II/doc/auto/kdoc/multigrid/.cvsignore b/deal.II/doc/auto/kdoc/multigrid/.cvsignore new file mode 100644 index 0000000000..2d19fc766d --- /dev/null +++ b/deal.II/doc/auto/kdoc/multigrid/.cvsignore @@ -0,0 +1 @@ +*.html -- 2.39.5