From: Tom Tromey Date: Thu, 16 Nov 1995 18:33:25 +0000 (+0000) Subject: Use am_dir, not AM_DIR. X-Git-Tag: Release-0-25~306 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=364ba746e7ef0ff2c3162836062ea4da211e99e2;p=automake.git Use am_dir, not AM_DIR. Use version, not VERSION. Bug fix in TAGS code. --- diff --git a/automake.in b/automake.in index 574486a4..91593456 100755 --- a/automake.in +++ b/automake.in @@ -19,8 +19,11 @@ # Sample usage: automake Makefile lib/Makefile src/Makefile man/Makefile # Written by David Mackenzie . -VERSION=@VERSION@ -AM_DIR=@prefix@/share/automake +# Caveat: must use all lowercase variables in this file. User +# Makefile.am can cause any uppercase variable to be set. + +version=@VERSION@ +am_dir=@prefix@/share/automake usage="Usage: automake [--help] [--version] [Makefile]..." @@ -44,7 +47,7 @@ while test $# -gt 0; do ;; --version | --v* ) - echo "Automake version $VERSION" + echo "Automake version $version" exit 0 ;; @@ -144,9 +147,9 @@ for am_makefile in $mfiles; do exec 4> ${am_makefile}.vars exec 5> ${am_makefile}.rules - echo "# Makefile.in generated automatically by automake $VERSION from Makefile.am." >&4 - cat $AM_DIR/header-vars.am >&4 - cat $AM_DIR/header.am >&5 + echo "# Makefile.in generated automatically by automake $version from Makefile.am." >&4 + cat $am_dir/header-vars.am >&4 + cat $am_dir/header.am >&5 DEFS= INCLUDES= CPPFLAGS= CFLAGS= SOURCES= CONFIG_HEADER= SUBDIRS= PROGRAMS= LIBPROGRAMS= SCRIPTS= LIBSCRIPTS= @@ -165,9 +168,9 @@ for am_makefile in $mfiles; do fi if test -n "$PROGRAMS$LIBPROGRAMS$LIBRARIES"; then - cat $AM_DIR/compile-vars.am >&4 - cat $AM_DIR/compile.am >&5 - grep @kr@ ${am_makefile}.am >/dev/null && cat $AM_DIR/compile-kr.am >&5 + cat $am_dir/compile-vars.am >&4 + cat $am_dir/compile.am >&5 + grep @kr@ ${am_makefile}.am >/dev/null && cat $am_dir/compile-kr.am >&5 for am_file in $PROGRAMS $LIBPROGRAMS $LIBRARIES; do if grep "^[ ]*${am_file}_SOURCES[ ]*=" ${am_makefile}.am >/dev/null; then if grep "^[ ]*${am_file}_OBJECTS[ ]*=" ${am_makefile}.am >/dev/null; then @@ -200,10 +203,10 @@ ${am_file}_OBJECTS = ${am_file}.${kr}o" >&4 if test -n "$PROGRAMS$LIBPROGRAMS$SCRIPTS$LIBSCRIPTS"; then if test -n "$PROGRAMS$SCRIPTS"; then - cat $AM_DIR/programs.am >&5 + cat $am_dir/programs.am >&5 fi if test -n "$LIBPROGRAMS$LIBSCRIPTS"; then - cat $AM_DIR/libprograms.am >&5 + cat $am_dir/libprograms.am >&5 fi if test -n "$PROGRAMS$LIBPROGRAMS"; then for am_prog in $PROGRAMS $LIBPROGRAMS; do @@ -217,49 +220,49 @@ ${am_file}_OBJECTS = ${am_file}.${kr}o" >&4 # Insert rule for this target, unless it is explicitly given # in Makefile.am. eval "test \"\$target_$am_prog\" != explicit" && - sed "s/@PROGRAM@/$am_prog/g" $AM_DIR/program.am >&5 + sed "s/@PROGRAM@/$am_prog/g" $am_dir/program.am >&5 done fi fi if test -n "$LIBRARIES"; then echo "LIBFILES = " `echo "$LIBRARIES"|sed 's/\([a-zA-Z0-9_][a-zA-Z0-9_]*\)/lib\1.a/g'` >&4 - cat $AM_DIR/libraries-vars.am >&4 - cat $AM_DIR/libraries.am >&5 + cat $am_dir/libraries-vars.am >&4 + cat $am_dir/libraries.am >&5 for am_lib in $LIBRARIES; do - sed "s/@LIBRARY@/$am_lib/g" $AM_DIR/library.am >&5 + sed "s/@LIBRARY@/$am_lib/g" $am_dir/library.am >&5 done fi if test -n "$TEXINFOS"; then - cat $AM_DIR/texinfos-vars.am >&4 - cat $AM_DIR/texinfos.am >&5 + cat $am_dir/texinfos-vars.am >&4 + cat $am_dir/texinfos.am >&5 echo "$TEXINFOS" | sed 's/^/INFOS = /; s/\.texi/.info*/g' >&4 echo "$TEXINFOS" | sed 's/^/INFO_DEPS = /; s/\.texi/.info/g' >&4 echo "$TEXINFOS" | sed 's/^/DVIS = /; s/\.texi/.dvi/g' >&4 fi if test -n "$MANS"; then - cat $AM_DIR/mans-vars.am >&4 - cat $AM_DIR/mans.am >&5 + cat $am_dir/mans-vars.am >&4 + cat $am_dir/mans.am >&5 fi case "$SUBDIRS" in "") if grep @kr@ ${am_makefile}.am >/dev/null; then - cat $AM_DIR/clean-kr.am >&5 - else cat $AM_DIR/clean.am >&5 + cat $am_dir/clean-kr.am >&5 + else cat $am_dir/clean.am >&5 fi - cat $AM_DIR/footer.am >&5 ;; - *) cat $AM_DIR/subdirs.am >&5 ;; + cat $am_dir/footer.am >&5 ;; + *) cat $am_dir/subdirs.am >&5 ;; esac case "$am_makefile" in */*) - cat $AM_DIR/remake-subd.am >&5 + cat $am_dir/remake-subd.am >&5 ;; *) test -f aclocal.m4 && echo "ACLOCAL = aclocal.m4" >&4 - cat $AM_DIR/remake.am >&5 + cat $am_dir/remake.am >&5 ;; esac @@ -270,7 +273,7 @@ ${am_file}_OBJECTS = ${am_file}.${kr}o" >&4 test -f acconfig.h && echo "ACCONFIG = acconfig.h" >&4 test -f config.h.top && echo "CONFIG_TOP = config.h.top" >&4 test -f config.h.bot && echo "CONFIG_BOT = config.h.bot" >&4 - cat $AM_DIR/remake-hdr.am >&5 ;; + cat $am_dir/remake-hdr.am >&5 ;; esac echo "SOURCES = $SOURCES" >&4 @@ -282,15 +285,15 @@ ${am_file}_OBJECTS = ${am_file}.${kr}o" >&4 case "$am_makefile" in */*) if test -n "${SOURCES}${HEADERS}${ETAGS_ARGS}"; then - cat tags-subd.am >&5 + cat $am_dir/tags-subd.am >&5 fi ;; *) if test -n "${SUBDIRS}"; then - cat tags.am >&5 + cat $am_dir/tags.am >&5 else if test -n "${SOURCES}${HEADERS}${ETAGS_ARGS}"; then - cat tags-subd.am >&5 + cat $am_dir/tags-subd.am >&5 fi fi ;; @@ -299,15 +302,15 @@ ${am_file}_OBJECTS = ${am_file}.${kr}o" >&4 # # Handle "dist" targets. # - amdir=`echo "$am_makefile" | sed 's,//*[^/][^/]*$,,g'` - if test "$amdir" = "$am_makefile"; then + am_reldir=`echo "$am_makefile" | sed 's,//*[^/][^/]*$,,g'` + if test "$am_reldir" = "$am_makefile"; then # Bogus. - amdir=. + am_reldir=. fi # Look for certain common files and make sure they are included. dlist= for cfile in $common; do - if test -f $amdir/$cfile; then + if test -f $am_reldir/$cfile; then dlist="$dlist $cfile" fi done @@ -315,16 +318,16 @@ ${am_file}_OBJECTS = ${am_file}.${kr}o" >&4 # Include "dist" boilerplate. case "$am_makefile" in */*) - cat $AM_DIR/dist-subd-vars.am >&4 - echo "subdir = $amdir" >&5 - cat $AM_DIR/dist-subd.am >&5 + cat $am_dir/dist-subd-vars.am >&4 + echo "subdir = $am_reldir" >&5 + cat $am_dir/dist-subd.am >&5 ;; *) - cat $AM_DIR/dist-vars.am >&4 + cat $am_dir/dist-vars.am >&4 if test -n "$SUBDIRS"; then - cat $AM_DIR/dist-subd-top.am >&5 + cat $am_dir/dist-subd-top.am >&5 else - cat $AM_DIR/dist.am >&5 + cat $am_dir/dist.am >&5 fi ;; esac