prefix=@prefix@
am_dir=@datadir@/automake
-usage="Usage: automake [--help] [--version] [Makefile]..."
-
# These are commonly found files that we look for and automatically
# include in DIST_FILES. NOTE if you add something here, make sure
# you add it in the right place -- that is, so that the "--help" still
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
mfiles=
+am_usedeps=no
+am_incdeps=no
while test $# -gt 0; do
case "$1" in
--help | --h* )
- echo $usage
+usage="Usage: automake [--help] [--version] [Makefile]..."
+
+ echo "Usage: automake [OPTION]... [Makefile]..."
+ echo "
+ --help print this help, then exit
+ --version print version number, then exit
+ --use-deps include code to auto-generate dependencies
+ --include-deps include generated dependencies in Makefile"
echo
echo "Files which are automatically distributed, if found:"
set $common
exit 0
;;
+ --use-deps)
+ am_usedeps=yes
+ ;;
+
+ --include-deps)
+ am_incdeps=yes
+ ;;
+
-- ) # Stop option processing.
- shift
break
;;
-*)
# FIXME consider "-" meaning stdin as input?
echo "automake: unrecognized option -- \`$1'" 1>&2
- echo "${usage}" 1>&2
exit 1
;;
shift
done
+if test "$am_usedeps" = yes && test "$am_incdeps" = yes; then
+ echo "automake: can't specify both --use-deps and --include-deps" 1>&2
+ exit 1
+fi
+
test -n "$mfiles" || {
# Look around.
mfiles=`echo */Makefile.am`
if test -n "$mfiles"; then
echo "automake: using $mfiles" 1>&2
else
- echo "${usage}" 1>&2
+ echo "automake: no \"Makefile.am\" found or specified" 1>&2
exit 1
fi
}
echo >&5
fi
+
+ #
+ # Handle auto-generating dependencies.
+ #
+ if test "$am_usedeps" = yes; then
+ # Include code to auto-generate dependencies.
+ cat $am_dir/depend.am >&5
+ else
+ if test "$am_incdeps" = yes; then
+ # Include any already generated dependencies.
+ if test -d .deps && test -f .deps/empty.P; then
+ cat .deps/*.P >&5
+ fi
+ fi
+ fi
+
+
#
# Some final checks.
#