am_status=0
-# Remove \newline.
-am_rmnl=/tmp/am.sed1
-cat > $am_rmnl <<\EOF
-/\\$/{
- s///
- H
- d
-}
-/[^\\]$/{
- H
- x
- s/\n//g
- p
- s/.*//
- h
-}
-EOF
-
-# Turn Makefile target and variable assignments into shell variable
-# assignments:
-# * For targets, define the variable `target_NAME' to "explicit".
-# * For variables whose names are uppercase, perform the actual assignment.
-# We only do this for all-upper variables to avoid conflict with variables
-# used in automake.
-# * For other variables, define `var_NAME' to "explicit". Such variables
-# can only be used as flags; any use of their values must be done
-# later, in the generated Makefile.
-am_ass=/tmp/am.sed2
-cat > $am_ass <<\EOF
-s/(/{/g
-s/)/}/g
-/^ *\([a-zA-Z_.][a-zA-Z0-9_.]*\):.*/{
-s//target_\1=explicit/
-s/\./_/g
-p
-}
-s/^ *\([A-Z][A-Z0-9_]*\)[ ]*=[ ]*\(.*\)/\1='\2'/p
-s/^ *\([A-Za-z][A-Za-z0-9_]*\)[ ]*=[ ]*\(.*\)/var_\1=explicit/p
-EOF
+# Some handy sed scripts.
+am_rmnl=$am_dir/nl-remove.sed
+am_ass=$am_dir/hack-make.sed
for am_makefile in $mfiles; do
(
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
- :
- else
- sed -n -f $am_rmnl ${am_makefile}.am |
- sed -n "/^[ ]*${am_file}_SOURCES[ ]*=/{
+ if eval "test \"\$var_${am_file}_SOURCES\" = explicit"; then
+ if eval "test \"\$var_${am_file}_OBJECTS\" = explicit"; then
+ :
+ else
+ sed -n -f $am_rmnl ${am_makefile}.am |
+ sed -n "/^[ ]*${am_file}_SOURCES[ ]*=/{
s/SOURCES/OBJECTS/
s/@[^@]*@//g
s/\$([^)]*)//g
s/\\.[cCmylfs]/.${kr}o/g
p
}" >&4
- fi
- SOURCES="$SOURCES \${${am_file}_SOURCES}"
- else
- echo "${am_file}_SOURCES = ${am_file}.c
-${am_file}_OBJECTS = ${am_file}.${kr}o" >&4
- SOURCES="$SOURCES ${am_file}.c"
- fi
- if test -n "$CONFIG_HEADER"; then
- echo "\$(${am_file}_OBJECTS): $CONFIG_HEADER" >&5
- fi
+ fi
+ SOURCES="$SOURCES \${${am_file}_SOURCES}"
+ else
+ echo "${am_file}_SOURCES = ${am_file}.c" >&4
+ echo "${am_file}_OBJECTS = ${am_file}.${kr}o" >&4
+ SOURCES="$SOURCES ${am_file}.c"
+ fi
+ if test -n "$CONFIG_HEADER"; then
+ echo "\$(${am_file}_OBJECTS): $CONFIG_HEADER" >&5
+ fi
done
fi
)
done
-rm -f $am_rmnl $am_ass
-
exit $am_status