progname=$0
package=gnulib
-cvsdatestamp='$Date: 2005-08-31 20:52:14 $'
+cvsdatestamp='$Date: 2005-08-31 20:53:42 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
{
modules="$1"
modules=`for m in $modules; do echo $m; done | sort | uniq`
+ specified_modules="$modules"
# Determine final module list.
func_modules_transitive_closure
if test -n "$lgpl"; then
opt_lgpl="--lgpl"
fi
- actioncmd="gnulib-tool --import --dir=$destdir --lib=$libname --source-base=$sourcebase --m4-base=$m4base --aux-dir=$auxdir $opt_libtool $opt_lgpl `echo $modules`"
+ actioncmd="gnulib-tool --import --dir=$destdir --lib=$libname --source-base=$sourcebase --m4-base=$m4base --aux-dir=$auxdir $opt_libtool $opt_lgpl `echo $specified_modules`"
# Create lib/Makefile.am.
echo "Creating $destdir/$sourcebase/Makefile.am..."
func_mv_if_changed "$destdir"/$sourcebase/Makefile.am.new \
"$destdir"/$sourcebase/Makefile.am
- # Create gnulib.m4.
- echo "Creating $destdir/$m4base/gnulib.m4..."
+ # Create m4/gnulib-cache.m4.
+ echo "Creating $destdir/$m4base/gnulib-cache.m4..."
(
if test -z "$dry_run"; then
- exec > "$destdir"/$m4base/gnulib.m4.new
+ exec > "$destdir"/$m4base/gnulib-cache.m4.new
else
- echo "# $destdir/$m4base/gnulib.m4"
+ echo "# $destdir/$m4base/gnulib-cache.m4"
fi
echo "# Copyright (C) 2004 Free Software Foundation, Inc."
echo "# This file is free software, distributed under the terms of the GNU"
echo "#"
echo "# Generated by gnulib-tool."
echo "#"
- echo "# Invoked as: $cmd"
- echo "# Reproduce by: $actioncmd"
+ echo "# This file represents the specification of how gnulib-tool is used."
+ echo "# It acts as a cache: It is written and read by gnulib-tool."
+ echo "# In projects using CVS, this file is meant to be stored in CVS,"
+ echo "# like the configure.ac and various Makefile.am files."
+ echo
+ echo
+ echo "# Specification in the form of a command-line invocation:"
+ echo "# $actioncmd"
+ echo
+ echo "# Specification in the form of a few gnulib-tool.m4 macro invocations:"
+ echo "gl_MODULES([$specified_modules])"
+ echo "gl_AVOID([$avoidlist])"
+ echo "gl_SOURCE_BASE([$sourcebase])"
+ echo "gl_M4_BASE([$m4base])"
+ echo "gl_LIB([$libname])"
+ test -z "$lgpl" || echo "gl_LGPL"
+ test -z "$libtool" || echo "gl_LIBTOOL"
+ echo "gl_MACRO_PREFIX([$macro_prefix])"
+ echo
+ echo "# gnulib-cache.m4 ends here"
+ )
+ func_mv_if_changed "$destdir"/$m4base/gnulib-cache.m4.new "$destdir"/$m4base/gnulib-cache.m4
+
+ # Create m4/gnulib-comp.m4.
+ echo "Creating $destdir/$m4base/gnulib-comp.m4..."
+ (
+ if test -z "$dry_run"; then
+ exec > "$destdir"/$m4base/gnulib-comp.m4.new
+ else
+ echo "# $destdir/$m4base/gnulib-comp.m4"
+ fi
+ echo "# Copyright (C) 2004 Free Software Foundation, Inc."
+ echo "# This file is free software, distributed under the terms of the GNU"
+ echo "# General Public License. As a special exception to the GNU General"
+ echo "# Public License, this file may be distributed as part of a program"
+ echo "# that contains a configuration script generated by Autoconf, under"
+ echo "# the same distribution terms as the rest of that program."
+ echo "#"
+ echo "# Generated by gnulib-tool."
+ echo "#"
+ echo "# This file represents the compiled summary of the specification in"
+ echo "# gnulib-cache.m4. It lists the computed macro invocations that need"
+ echo "# to be invoked from configure.ac."
+ echo "# In projects using CVS, this file can be treated like other built files."
+ echo
echo
echo "# This macro should be invoked from $configure_ac, in the section"
echo "# \"Checks for programs\", right after AC_PROG_CC, and certainly before"
done
echo "])"
echo
- echo "# gnulib.m4 ends here"
+ echo "# This macro records the list of files which have been installed by"
+ echo "# gnulib-tool and may be removed by future gnulib-tool invocations."
+ echo "AC_DEFUN([${macro_prefix}_FILE_LIST], ["
+ echo "$files" | sed -e 's,^, ,'
+ echo "])"
+ echo
+ echo "# gnulib-comp.m4 ends here"
)
- func_mv_if_changed "$destdir"/$m4base/gnulib.m4.new "$destdir"/$m4base/gnulib.m4
+ func_mv_if_changed "$destdir"/$m4base/gnulib-comp.m4.new "$destdir"/$m4base/gnulib-comp.m4
echo "Finished."
echo
echo "You may need to add #include directives for the following .h files."