diff --git a/Makefile.am b/Makefile.am index 91e0f2ceb59ba8599ce8be9bbb0adf8f6dbd5d81..c72cd9d46e0979f76a8622cbd873add6c253f7fd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,7 +2,7 @@ SUBDIRS = gnu-compat alberta_util alberta add_ons ACLOCAL_AMFLAGS = -I ./m4 -EXTRA_DIST = demo m4 +# EXTRA_DIST = demo # # install the libtool-script in the libexecdir s.t. Makefile.alberta @@ -10,9 +10,9 @@ EXTRA_DIST = demo m4 # if INSTALL_LIBTOOL -libexec_SCRIPTS = libtool.alberta -libtool.alberta: libtool - cp libtool libtool.alberta +libexec_SCRIPTS = libtool.@PACKAGE@ +libtool.@PACKAGE@: libtool + cp libtool libtool.@PACKAGE@ endif # @@ -21,8 +21,8 @@ endif # install_code: - mkdir -p $(prefix)/src/alberta - cp $(top_srcdir)/alberta/src/*/*.c $(prefix)/src/alberta/ + mkdir -p $(DESTDIR)$(prefix)/src/alberta + cp $(top_srcdir)/alberta/src/*/*.c $(DESTDIR)$(prefix)/src/alberta/ uninstall_code: rm -rf $(prefix)/src/alberta @@ -74,14 +74,18 @@ cvs-clean: chgrp -R alberta . dist-hook: - @echo Deleting CVS directories in $(distdir) - rm -rf `find $(distdir) -name CVS` - @echo Deleting .cvsignore file in $(distdir) - rm -f `find $(distdir) -name '.cvsignore'` + @echo Copying demo directory to $(distdir) + cp -pR demo/. $(distdir)/demo/. @echo Cleaning up demo directory in $(distdir) find $(distdir)/demo \( -name \*~ -o -name \*.o -o -name \*.lo \) -exec /bin/rm -f {} \; find $(distdir)/demo \( -name ellipt -o -name heat -o -name nonlin \) -exec /bin/rm -f {} \; find $(distdir)/demo -name Makefile -exec /bin/rm -f {} \; + @echo Deleting .svn directories in $(distdir) + rm -rf `find $(distdir) -name .svn -a -type d` + @echo Deleting CVS directories in $(distdir) + rm -rf `find $(distdir) -name CVS` + @echo Deleting .cvsignore file in $(distdir) + rm -f `find $(distdir) -name '.cvsignore'` # # NOTE: you better have GRAPE installed properly before doing this. diff --git a/Makefile.am.template b/Makefile.am.template index 6bff19236e44489a0c71395d94922899b2e361a1..7129eaa72f312dc616a16e805e8464fc158dc399 100644 --- a/Makefile.am.template +++ b/Makefile.am.template @@ -1,7 +1,10 @@ ## Makefile.am for libalberta%LIBCODE% +## +## DO NOT EDIT, this file is automatically generated by +## ${top_srcdir}/generate-alberta-automakefiles.sh DIM_OF_WORLD = %DIM_OF_WORLD% -DEBUG = %DEBUG% +ALBERTA_DEBUG = %ALBERTA_DEBUG% lib_LTLIBRARIES = libalberta%LIBCODE%.la diff --git a/alberta-2.0.spec b/alberta-2.0.spec index 75de9feeaa35552642a836f483f2bcc41e8693ba..6c056d905790075766bc9e616f373fefefde02d3 100644 --- a/alberta-2.0.spec +++ b/alberta-2.0.spec @@ -8,7 +8,7 @@ Version: 2.0 Release: 1 Copyright: GPL Group: Productivity/Scientific/Math -Source: alberta-2.0.tar.gz +Source: alberta2-2.0.tar.gz URL: http:/www.alberta-fem.de Packager: Daniel Koester <koester@math.uni-augsburg.de> Requires: aaa_base glibc glibc-devel libgcc make gcc rpm blas xorg-x11 xorg-x11-devel xorg-x11-libs xorg-x11-Mesa @@ -19,7 +19,7 @@ ALBERTA is an Adaptive multi-Level finite element toolbox using Bisectioning refinement and Error control by Residual Techniques for scientific Applications. -This is version 2.0 with many new features. Please see %{_datadir}/alberta +This is version 2.0 with many new features. Please see %{_datadir}/alberta2 for a demonstration package. Authors: @@ -93,13 +93,14 @@ make install #/usr/local/lib/libalberta3_debug.so #/usr/local/lib/libalberta3_debug.so.0 #/usr/local/lib/libalberta3_debug.so.0.0.0 -/usr/local/lib/libalberta_util.a -/usr/local/lib/libalberta_util.la -/usr/local/lib/libalberta_util.so -/usr/local/lib/libalberta_util.so.0 -/usr/local/lib/libalberta_util.so.0.0.0 -/usr/local/include/alberta_inlines.h -/usr/local/include/alberta.h -/usr/local/include/alberta_util.h -/usr/local/share/alberta/Makefile.alberta -/usr/local/share/alberta/alberta-2.0-demo.tar.gz \ No newline at end of file +/usr/local/lib/libalberta2_util.a +/usr/local/lib/libalberta2_util.la +/usr/local/lib/libalberta2_util.so +/usr/local/lib/libalberta2_util.so.0 +/usr/local/lib/libalberta2_util.so.0.0.0 +/usr/local/include/alberta2/alberta_inlines.h +/usr/local/include/alberta2/alberta_util_inlines.h +/usr/local/include/alberta2/alberta.h +/usr/local/include/alberta2/alberta_util.h +/usr/local/share/alberta2/Makefile.alberta +/usr/local/share/alberta2/alberta-2.0-demo.tar.gz diff --git a/configure.ac b/configure.ac index 509f7e14d8587b3bdcbc20b63c5b90c61ddb65f7..1293a0f472b123e7286c9588b10a9d476ae950df 100644 --- a/configure.ac +++ b/configure.ac @@ -27,9 +27,8 @@ AC_CONFIG_FILES([Makefile gnu-compat/Makefile AC_CONFIG_COMMANDS([demo], [if ! test "$srcdir" = \. ; then - AC_MSG_CHECKING([Copying $srcdir/demo sources to current directory]) + AC_MSG_NOTICE([Copying $srcdir/demo sources to current directory]) ( cd $srcdir && tar cf - demo ) | tar xf - - AC_MSG_RESULT([done]) fi]) # @@ -39,11 +38,12 @@ fi]) # alberta_util_inlines.h # AC_CONFIG_COMMANDS([alberta_util/src/alberta_util_inlines.h], -[if cmp alberta_util/src/alberta_util_inlines.h alberta_util/src/alberta_util_inlines.h.in +[if test -f alberta_util/src/alberta_util_inlines.h && \ + cmp alberta_util/src/alberta_util_inlines.h alberta_util/src/alberta_util_inlines.h.in then - AC_MSG_CHECKING([alberta_util/src/alberta_util_inlines.h is unchanged]) + AC_MSG_NOTICE([alberta_util/src/alberta_util_inlines.h is unchanged]) else - AC_MSG_CHECKING([Creating alberta_util/src/alberta_util_inlines.h]) + AC_MSG_NOTICE([Creating alberta_util/src/alberta_util_inlines.h]) cp \ alberta_util/src/alberta_util_inlines.h.in \ alberta_util/src/alberta_util_inlines.h @@ -263,7 +263,11 @@ ALBERTA_CHECK_PACKAGE(silo, silo, ,, silo.h, , ,optional) dnl dnl Debugging dnl -ALBERTA_ENABLE_FLAG([debug], [disable building of ALBERTA libraries with debugging information.], 1) + +ALBERTA_ENABLE_FLAG([debug], + [disable building of ALBERTA libraries with debugging information.], + 1, + ALBERTA_DEBUG) dnl dnl Install libtool.alberta for shared libraries? diff --git a/generate-alberta-automakefiles.sh b/generate-alberta-automakefiles.sh index 2d830cb8e0383949f780e1838f7db8c886e9dff7..3a503edefb1600faa59576cd1122142bb472423a 100755 --- a/generate-alberta-automakefiles.sh +++ b/generate-alberta-automakefiles.sh @@ -5,9 +5,9 @@ # same. # -for DEBUG in 0 1; do +for ALBERTA_DEBUG in 0 1; do for DIM_OF_WORLD in 1 2 3; do - if test $DEBUG -eq 0; then + if test $ALBERTA_DEBUG -eq 0; then LIBCODE=${DIM_OF_WORLD} EFLAGS=OPTIMIZE else @@ -16,6 +16,6 @@ for DEBUG in 0 1; do fi mkdir -p alberta/src/alberta$LIBCODE - sed -e "s/%DIM_OF_WORLD%/$DIM_OF_WORLD/g" Makefile.am.template -e "s/%DEBUG%/$DEBUG/g" -e "s/%LIBCODE%/$LIBCODE/g" -e "s/%EFLAGS%/$EFLAGS/g" > alberta/src/alberta$LIBCODE/Makefile.am + sed -e "s/%DIM_OF_WORLD%/$DIM_OF_WORLD/g" Makefile.am.template -e "s/%DEBUG%/$DEBUG/g" -e "s/%ALBERTA_DEBUG%/$ALBERTA_DEBUG/g" -e "s/%LIBCODE%/$LIBCODE/g" -e "s/%EFLAGS%/$EFLAGS/g" > alberta/src/alberta$LIBCODE/Makefile.am done done \ No newline at end of file diff --git a/m4/alberta-check.m4 b/m4/alberta-check.m4 index edd7d13b15300088c520137bbff656d967db5dc7..c2a6bc0d1b7ba0f30b8cd513b591d01d8514f4d8 100644 --- a/m4/alberta-check.m4 +++ b/m4/alberta-check.m4 @@ -22,7 +22,7 @@ dnl DIM_OF_WORLD is passed in $1 dnl AC_DEFUN([ALBERTA_CHECK_NEWLIBS], [ -if test "${DEBUG}" = "1"; then +if test "${ALBERTA_DEBUG}" = "1"; then ALBERTA_LIB_$1=alberta$1_debug ALBERTA_LIB_$1_C=ac_cv_lib_ALBERTA$1_DEBUG else @@ -143,7 +143,7 @@ AC_CHECK_LIB(blas, dnrm2, AC_LANG_POP(Fortran 77) # Cache check-point AC_CACHE_SAVE -ALBERTA_CHECK_PACKAGE(alberta_util, alberta_util, $ALBERTA_LIB_PATH, +ALBERTA_CHECK_PACKAGE(alberta2_util, alberta2_util, $ALBERTA_LIB_PATH, -lm ${FLIBS}, alberta_util.h, $ALBERTA_INCLUDE_PATH,, required) ]) \ No newline at end of file diff --git a/m4/grapeiface.m4 b/m4/grapeiface.m4 index 146dabbd8dbd59a3937e7cb3273e64ff74efe0d3..0276f0f185a01d958c29bec05b50d13f4d2bdc03 100644 --- a/m4/grapeiface.m4 +++ b/m4/grapeiface.m4 @@ -9,11 +9,11 @@ AM_CONDITIONAL(GRAPE, test -n "${GRAPE_LIB}") ALBERTA_LIB_PATH=$prefix/lib ALBERTA_INCLUDE_PATH='$(top_srcdir)/alberta/src/Common/ -I$(top_srcdir)/alberta_util/src/ -I$(top_builddir)/alberta_util/src/' -ALBERTA_LIBS_1='$(top_builddir)/alberta/src/alberta1/libalberta1.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' +ALBERTA_LIBS_1='$(top_builddir)/alberta/src/alberta1/libalberta1.la $(top_builddir)/alberta_util/src/libalberta2_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' -ALBERTA_LIBS_2='$(top_builddir)/alberta/src/alberta2/libalberta2.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' +ALBERTA_LIBS_2='$(top_builddir)/alberta/src/alberta2/libalberta2.la $(top_builddir)/alberta_util/src/libalberta2_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' -ALBERTA_LIBS_3='$(top_builddir)/alberta/src/alberta3/libalberta3.la $(top_builddir)/alberta_util/src/libalberta_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' +ALBERTA_LIBS_3='$(top_builddir)/alberta/src/alberta3/libalberta3.la $(top_builddir)/alberta_util/src/libalberta2_util.la $(BLAS_ALL_LIB) $(GLTOOLS_ALL_LIB)' ALBERTA_DEBUG= AC_SUBST(ALBERTA_DEBUG) AC_SUBST(ALBERTA_LIB_PATH) diff --git a/m4/simple-enable-flag.m4 b/m4/simple-enable-flag.m4 index f7bdef0def7d5d5f13dac0fa910c0ff93d9a99c0..9796f0717e91e7afe7428c9746892ad0a066fbd8 100644 --- a/m4/simple-enable-flag.m4 +++ b/m4/simple-enable-flag.m4 @@ -3,17 +3,26 @@ # $2: help string # $3: one of {0,1}, default value # +# _OR_ +# +# $1: name of the enable/disable option +# $2: help string +# $3: default value +# $4: name of the preprocessor/Makefile/shell variable +# # Results: declare proper AC_ARG_ENABLE(), define make-file # subsitution (e.g. EL_INDEX), define automake conditional # (e.g. EL_INDEX). # AC_DEFUN([ALBERTA_ENABLE_FLAG], -[m4_define([FLAGNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)]) +[m4_if($#,3, + [m4_define([FLAGNAME], [m4_bpatsubst(m4_toupper([$1]),-,_)])], + [m4_define([FLAGNAME], [m4_bpatsubst(m4_toupper([$4]),-,_)])]) m4_if([$3],[1], -[m4_define([NEGDEFAULT],[disable]) -m4_define([DEFAULT],[enabled])], -[m4_define([NEGDEFAULT],[enable]) -m4_define([DEFAULT],[disabled])]) + [m4_define([NEGDEFAULT],[disable]) + m4_define([DEFAULT],[enabled])], + [m4_define([NEGDEFAULT],[enable]) + m4_define([DEFAULT],[disabled])]) AC_ARG_ENABLE($1, AC_HELP_STRING(--[]NEGDEFAULT[]-$1, [$2 (default: DEFAULT)]),