[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: work around NEWS make bug
From: |
Tom Tromey |
Subject: |
Patch: work around NEWS make bug |
Date: |
17 Jul 2001 00:17:43 -0600 |
I'm checking this in. Note the change to HACKING. I picked this
since it seemed reasonable. I even like it a bit more. Feel free to
complain if you think there is a reason to do something differently.
It is easier to write a portable `make' than a portable Makefile
(apologies to Larry Wall).
(In our case both activities are equally suspect though.)
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
Report from Motoyuki Kasahara:
* tests/make.test: Use am__include.
* tests/exsource.test: Use am__include.
* m4/make.m4 (AM_MAKE_INCLUDE): Use am__include and am__quote.
* automake.in (handle_languages): Use am__include and am__quote.
Index: HACKING
===================================================================
RCS file: /cvs/automake/automake/HACKING,v
retrieving revision 1.10
diff -u -r1.10 HACKING
--- HACKING 2001/02/16 06:48:01 1.10
+++ HACKING 2001/07/17 05:51:30
@@ -37,11 +37,15 @@
= Naming
* We've adopted the convention that internal AC_SUBSTs should be
- named with a leading `_am_', and internally generated targets should
- be named with a leading `_am-'. This convention is very new
+ named with a leading `am__', and internally generated targets should
+ be named with a leading `am--'. This convention is very new
(as of Feb 7 2001) and so it isn't yet universally used. But all
new code should use it.
+ We used to use `_am_' as the prefix for an internal AC_SUBST.
+ However, it turns out that NEWS-OS 4.2R complains if a Makefile
+ variable begins with `_'. Yay for them. I changed the target
+ naming convention just to be safe.
================================================================
= Editing `.am' files
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1153
diff -u -r1.1153 automake.in
--- automake.in 2001/07/17 03:38:31 1.1153
+++ automake.in 2001/07/17 05:51:36
@@ -1522,11 +1522,11 @@
foreach my $iter (@deplist)
{
$output_rules .= (subst ('AMDEP_TRUE')
- . subst ('_am_include')
+ . subst ('am__include')
. ' '
- . subst ('_am_quote')
+ . subst ('am__quote')
. $iter
- . subst ('_am_quote')
+ . subst ('am__quote')
. "\n");
}
Index: m4/make.m4
===================================================================
RCS file: /cvs/automake/automake/m4/make.m4,v
retrieving revision 1.6
diff -u -r1.6 make.m4
--- m4/make.m4 2001/05/17 04:50:51 1.6
+++ m4/make.m4 2001/07/17 05:51:36
@@ -9,8 +9,8 @@
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
-_am_include='#'
-_am_quote=
+am__include='#'
+am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
@@ -20,21 +20,21 @@
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" =
"done"; then
- _am_include=include
- _am_quote=
+ am__include=include
+ am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
-if test "$_am_include" = "#"; then
+if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
- _am_include=.include
- _am_quote='"'
+ am__include=.include
+ am__quote='"'
_am_result=BSD
fi
fi
-AC_SUBST(_am_include)
-AC_SUBST(_am_quote)
+AC_SUBST(am__include)
+AC_SUBST(am__quote)
AC_MSG_RESULT($_am_result)
rm -f confinc confmf
])
Index: tests/exsource.test
===================================================================
RCS file: /cvs/automake/automake/tests/exsource.test,v
retrieving revision 1.13
diff -u -r1.13 exsource.test
--- tests/exsource.test 2001/05/15 18:04:56 1.13
+++ tests/exsource.test 2001/07/17 05:51:36
@@ -26,4 +26,4 @@
$ACLOCAL || exit 1
$AUTOMAKE || exit 1
-grep '@_am_include@ .*/xtra\.P' Makefile.in
+grep '@am__include@ .*/xtra\.P' Makefile.in
Index: tests/make.test
===================================================================
RCS file: /cvs/automake/automake/tests/make.test,v
retrieving revision 1.3
diff -u -r1.3 make.test
--- tests/make.test 2001/05/17 03:14:24 1.3
+++ tests/make.test 2001/07/17 05:51:36
@@ -34,12 +34,12 @@
for flag in '' -w; do
MAKE="$save $flag" ./configure
- fgrep '_am_include = #' Makefile && exit 1
+ fgrep 'am__include = #' Makefile && exit 1
touch configure.in
$MAKE $flag
- fgrep '_am_include = #' Makefile && exit 1
+ fgrep 'am__include = #' Makefile && exit 1
rm -f config.cache
done
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: work around NEWS make bug,
Tom Tromey <=