progname=$0
package=gnulib
-cvsdatestamp='$Date: 2006-10-12 12:33:50 $'
+cvsdatestamp='$Date: 2006-10-23 11:25:20 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
nl='
# m4base (to avoid an error in func_import) and optional for the others.
sed_trimtrailingslashes='s,\([^/]\)//*$,\1,'
case "$local_gnulib_dir" in
- */ ) sourcebase=`echo "$local_gnulib_dir" | sed -e "$sed_trimtrailingslashes"` ;;
+ */ ) local_gnulib_dir=`echo "$local_gnulib_dir" | sed -e "$sed_trimtrailingslashes"` ;;
esac
case "$sourcebase" in
*/ ) sourcebase=`echo "$sourcebase" | sed -e "$sed_trimtrailingslashes"` ;;
{
func_lookup_file "modules/$1"
sed -n -e "/^Makefile\.am$sed_extract_prog" < "$lookedup_file"
+ case "$1" in
+ *-tests)
+ # *-tests module live in tests/, not lib/.
+ ;;
+ *)
+ # Synthesize an EXTRA_DIST augmentation.
+ sed_combine_lines='/\\$/{
+ :a
+ N
+ s/\\\
+//
+ s/\\$/\\/
+ ta
+ }'
+ sed_extract_mentioned_files='s/^lib_SOURCES[ ]*+=[ ]*//p'
+ already_mentioned_files=` \
+ sed -n -e "/^Makefile\.am$sed_extract_prog" < "$lookedup_file" \
+ | sed -e "$sed_combine_lines" \
+ | sed -n -e "$sed_extract_mentioned_files" | sed -e 's/#.*//'`
+ all_files=`func_get_filelist $1`
+ lib_files=`for f in $all_files; do \
+ case $f in \
+ lib/*) echo $f ;; \
+ esac; \
+ done | sed -e 's,^lib/,,'`
+ # Remove $already_mentioned_files from $lib_files.
+ echo "$lib_files" | LC_ALL=C sort -u > "$tmp"/lib-files
+ extra_files=`for f in $already_mentioned_files; do echo $f; done \
+ | LC_ALL=C sort -u | LC_ALL=C join -v 2 - "$tmp"/lib-files`
+ if test -n "$extra_files"; then
+ echo "EXTRA_DIST +=" $extra_files
+ echo
+ fi
+ ;;
+ esac
}
# func_get_include_directive module
cat allsnippets.tmp
echo
echo "mostlyclean-local: mostlyclean-generic"
- echo " @test -z \"\$(MOSTLYCLEANDIRS)\" || \\"
- echo " for dir in \$(MOSTLYCLEANDIRS); do \\"
- echo " if test -d \$\$dir; then \\"
- echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\"
- echo " fi; \\"
- echo " done"
+ echo " @for dir in '' \$(MOSTLYCLEANDIRS); do \\"
+ echo " if test -n \"\$\$dir\" && test -d \$\$dir; then \\"
+ echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\"
+ echo " fi; \\"
+ echo " done"
rm -f allsnippets.tmp
}
echo " rm -rf SunWS_cache"
echo
echo "mostlyclean-local: mostlyclean-generic"
- echo " @test -z \"\$(MOSTLYCLEANDIRS)\" || \\"
- echo " for dir in \$(MOSTLYCLEANDIRS); do \\"
- echo " if test -d \$\$dir; then \\"
- echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\"
- echo " fi; \\"
- echo " done"
+ echo " @for dir in '' \$(MOSTLYCLEANDIRS); do \\"
+ echo " if test -n \"\$\$dir\" && test -d \$\$dir; then \\"
+ echo " echo \"rmdir \$\$dir\"; rmdir \$\$dir; \\"
+ echo " fi; \\"
+ echo " done"
rm -f allsnippets.tmp
}
echo " ${macro_prefix}_libobjs="
echo " ${macro_prefix}_ltlibobjs="
echo " if test -n \"\$${macro_prefix}_LIBOBJS\"; then"
- echo " for i in \$${macro_prefix}_LIBOBJS; do"
- echo " # Remove the extension."
- echo " sed_drop_objext='s/\\.o\$//;s/\\.obj\$//'"
- echo " i=\`echo \"\$i\" | sed \"\$sed_drop_objext\"\`"
+ echo " # Remove the extension."
+ echo " sed_drop_objext='s/\\.o\$//;s/\\.obj\$//'"
+ echo " for i in \`for i in \$${macro_prefix}_LIBOBJS; do echo \"\$i\"; done | sed \"\$sed_drop_objext\" | sort | uniq\`; do"
echo " ${macro_prefix}_libobjs=\"\$${macro_prefix}_libobjs \$i.\$ac_objext\""
echo " ${macro_prefix}_ltlibobjs=\"\$${macro_prefix}_ltlibobjs \$i.lo\""
echo " done"
# All modules together.
# Except config-h, which breaks all modules which use HAVE_CONFIG_H.
# Except fnmatch-posix, which conflicts with fnmatch-gnu. FIXME.
+ # Except ftruncate, mountlist, which abort the configuration on mingw. FIXME.
modules=`func_all_modules`
- modules=`for m in $modules; do if test $m != config-h && test $m != fnmatch-posix; then echo $m; fi; done`
+ modules=`for m in $modules; do case $m in config-h | fnmatch-posix | ftruncate | mountlist) ;; *) echo $m;; esac; done`
fi
modules=`for m in $modules; do echo $m; done | LC_ALL=C sort -u`