91-init-then-set.patch
Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in (&generate_makefile): Call &initialize_per_input *before* setting $am_file_name and $in_file_name. Index: Makefile.in --- Makefile.in Wed, 28 Feb 2001 23:04:21 +0100 akim (am/h/16_Makefile.i 1.28 644) +++ Makefile.in Wed, 28 Feb 2001 23:40:56 +0100 akim (am/h/16_Makefile.i 1.28 644) @@ -1,4 +1,4 @@ -# generated automatically by automake 1.4e from +# Makefile.in generated automatically by automake 1.4e from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. @@ -129,12 +129,12 @@ TEXINFOS = automake.texi DATA = $(dist_pkgdata_DATA) $(dist_script_DATA) -DIST_COMMON = README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \ -COPYING ChangeLog INSTALL NEWS README-alpha THANKS TODO aclocal.in \ -aclocal.m4 ansi2knr.1 ansi2knr.c automake.in compile config.guess \ -config.sub configure configure.in depcomp elisp-comp install-sh \ -mdate-sh missing mkinstalldirs py-compile stamp-vti texinfo.tex \ -version.texi ylwrap +DIST_COMMON = README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \ +COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS README-alpha \ +THANKS TODO aclocal.in aclocal.m4 ansi2knr.1 ansi2knr.c automake.in \ +compile config.guess config.sub configure configure.in depcomp \ +elisp-comp install-sh mdate-sh missing mkinstalldirs py-compile \ +stamp-vti texinfo.tex version.texi ylwrap DIST_SUBDIRS = $(SUBDIRS) all: all-recursive Index: automake.in --- automake.in Wed, 28 Feb 2001 23:06:47 +0100 akim (am/f/39_automake.i 1.98 755) +++ automake.in Wed, 28 Feb 2001 23:40:43 +0100 akim (am/f/39_automake.i 1.98 755) @@ -1045,6 +1045,9 @@ sub generate_makefile { my ($output, $makefile) = @_; +# Reset all the Makefile.am related variables. +&initialize_per_input; + # Name of input file ("Makefile.am") and output file # ("Makefile.in"). These have no directory components. $am_file_name = basename ($makefile) . '.am'; @@ -1058,7 +1061,6 @@ sub generate_makefile my (@secondary_inputs); ($output, @secondary_inputs) = split (/:/, $output); -&initialize_per_input; $relative_dir = dirname ($output); $am_relative_dir = dirname ($makefile); @@ -6718,7 +6720,7 @@ sub read_main_am_file # Generate copyright header for generated Makefile.in. my $ov = $output_vars; $output_vars = ("# $in_file_name generated automatically by automake " - . $VERSION . " from $am_file_name\n"); + . $VERSION . " from $am_file_name.\n"); $output_vars .= $gen_copyright; # Now go through and delete all the variables that the user did Index: m4/Makefile.in --- m4/Makefile.in Wed, 28 Feb 2001 23:04:21 +0100 akim (am/h/15_Makefile.i 1.20 644) +++ m4/Makefile.in Wed, 28 Feb 2001 23:40:56 +0100 akim (am/h/15_Makefile.i 1.20 644) @@ -1,4 +1,4 @@ -# generated automatically by automake 1.4e from +# Makefile.in generated automatically by automake 1.4e from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. @@ -94,7 +94,7 @@ DIST_SOURCES = DATA = $(m4data_DATA) -DIST_COMMON = +DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: Index: tests/Makefile.in --- tests/Makefile.in Wed, 28 Feb 2001 23:04:21 +0100 akim (am/h/14_Makefile.i 1.23 644) +++ tests/Makefile.in Wed, 28 Feb 2001 23:40:56 +0100 akim (am/h/14_Makefile.i 1.23 +644) @@ -1,4 +1,4 @@ -# generated automatically by automake 1.4e from +# Makefile.in generated automatically by automake 1.4e from Makefile.am. # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc.
92-backslash-z.patch
I was wondering whether the leading extra space in var defs was due to some broken initialization, of some issues in pretty printing. The latter is responsible. FWIW, I compared my Makefile.ins from 30 versions ago (in the sense of my home prcs repo) to the current ones, and we have recovered the Makefile.ins from before my variable changes. So I can now state that my changes are semantically transparent (which I wouldn't have said before patch 91). Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in (&pretty_print_internal): Don't output useless spaces. (define_pretty_variable): Don't issue the space after the `=' sign to avoid trailing spaces in Makefile.ins. Index: Makefile.in --- Makefile.in Wed, 28 Feb 2001 23:42:01 +0100 akim (am/h/16_Makefile.i 1.29 644) +++ Makefile.in Thu, 01 Mar 2001 00:14:41 +0100 akim (am/h/16_Makefile.i 1.29 644) @@ -119,24 +119,24 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = automake aclocal -SCRIPTS = $(bin_SCRIPTS) +CONFIG_CLEAN_FILES = automake aclocal +SCRIPTS = $(bin_SCRIPTS) -DIST_SOURCES = +DIST_SOURCES = TEXI2DVI = texi2dvi INFO_DEPS = automake.info DVIS = automake.dvi TEXINFOS = automake.texi -DATA = $(dist_pkgdata_DATA) $(dist_script_DATA) +DATA = $(dist_pkgdata_DATA) $(dist_script_DATA) -DIST_COMMON = README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \ +DIST_COMMON = README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \ COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS README-alpha \ THANKS TODO aclocal.in aclocal.m4 ansi2knr.1 ansi2knr.c automake.in \ compile config.guess config.sub configure configure.in depcomp \ elisp-comp install-sh mdate-sh missing mkinstalldirs py-compile \ stamp-vti texinfo.tex version.texi ylwrap -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: .SUFFIXES: .dvi .info .ps .texi .texinfo .txi @@ -147,7 +147,7 @@ cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status -$(ACLOCAL_M4): configure.in +$(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) Index: automake.in --- automake.in Wed, 28 Feb 2001 23:42:01 +0100 akim (am/f/39_automake.i 1.99 755) +++ automake.in Thu, 01 Mar 2001 00:14:04 +0100 akim (am/f/39_automake.i 1.99 755) @@ -5573,7 +5573,6 @@ sub pretty_print_internal my $fill_length = length ($fill); $fill_length += 7 * ($fill =~ tr/\t/\t/d); -my $bol = $head eq ''; foreach (@values) { # "71" because we also print a space. @@ -5581,13 +5580,11 @@ sub pretty_print_internal { $result .= " \\\n" . $fill; $column = $fill_length; - $bol = 1; + $separate = 0; } - - $result .= ' ' unless $bol; + $result .= ' ' if $result =~ /\S\z/; $result .= $_; $column += length ($_) + 1; - $bol = 0; } $result .= "\n"; @@ -6235,7 +6232,7 @@ sub define_pretty_variable ${$conditional{$var}}{$cond} = $contents{$var}; } my $make_condition = &make_condition ($cond); - &pretty_print ($make_condition . $var . ' = ', + &pretty_print ($make_condition . $var . ' =', $make_condition, @value); $content_seen{$var} = 1; } Index: m4/Makefile.in --- m4/Makefile.in Wed, 28 Feb 2001 23:42:01 +0100 akim (am/h/15_Makefile.i 1.21 644) +++ m4/Makefile.in Thu, 01 Mar 2001 00:14:41 +0100 akim (am/h/15_Makefile.i 1.21 644) @@ -90,11 +90,11 @@ EXTRA_DIST = $(m4data_DATA) subdir = m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -DIST_SOURCES = -DATA = $(m4data_DATA) +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DATA = $(m4data_DATA) -DIST_COMMON = Makefile.am Makefile.in +DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES: Index: tests/Makefile.in --- tests/Makefile.in Wed, 28 Feb 2001 23:42:01 +0100 akim (am/h/14_Makefile.i 1.24 644) +++ tests/Makefile.in Thu, 01 Mar 2001 00:14:41 +0100 akim (am/h/14_Makefile.i 1.24 +644) @@ -359,9 +359,9 @@ EXTRA_DIST = defs ChangeLog-old $(TESTS) subdir = tests mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -DIST_SOURCES = -DIST_COMMON = Makefile.am Makefile.in +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DIST_COMMON = Makefile.am Makefile.in all: all-am .SUFFIXES:
90-errdir.patch
Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in (&require_file_internal): $errfile must be independent from the loop on the directories. Index: automake.in --- automake.in Wed, 28 Feb 2001 23:04:21 +0100 akim (am/f/39_automake.i 1.97 755) +++ automake.in Wed, 28 Feb 2001 23:05:40 +0100 akim (am/f/39_automake.i 1.97 755) @@ -7373,6 +7373,7 @@ sub require_file_internal foreach my $file (@files) { my $fullfile; + my $errdir; my $errfile; my $save_dir; @@ -7384,7 +7385,6 @@ sub require_file_internal my $dangling_sym = 0; foreach my $dir (@require_file_paths) { - my $errdir; if ($dir eq '.') { $fullfile = $relative_dir . "/" . $file;
Re: yaccvpath.test
Hello, Derek! > > Some unices (including GNU/Linux) are not very precise with respect to the > > timestamps. It's likely that parse.c and the new parse.y are created in > > the same second, so parse.c will appear to be up-to-date. Adding "sleep > > 3" (I have no idea what would be a minimal safe time) before the new > > CVS uses a single second sleep to guarentee timestamps change cross-platform > and we don't see bug reports about it. Only ocassionaly complaints that > scripts which invoke CVS many times take too long. Thanks! Then "touch parse.y" can be moved below "configure", since the later is guaranteed to take at least 1 second (see AM_SANITY_CHECK). Regards, Pavel Roskin
Re: yaccvpath.test
Pavel Roskin wrote: > Some unices (including GNU/Linux) are not very precise with respect to the > timestamps. It's likely that parse.c and the new parse.y are created in > the same second, so parse.c will appear to be up-to-date. Adding "sleep > 3" (I have no idea what would be a minimal safe time) before the new CVS uses a single second sleep to guarentee timestamps change cross-platform and we don't see bug reports about it. Only ocassionaly complaints that scripts which invoke CVS many times take too long. Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- "A slipping gear could let your M203 grenade launcher fire when you least expect it. That would make you quite unpopular in what's left of your unit." -- In the August 1993 issue, page 9, of PS magazine, the Army's magazine of preventive maintenance
setting -DDEBUG
Thanks for the response on the debug target question. I did like you said except set CXXFLAGS=-g and it worked just fine. EXCEPT, I also want to set -DDEBUG on the call to c++. How would I do that without messing up DEFS? Dean
Re: problem with make install and java
>I'm using automake with mix C++ and Java code. Everything is fine, > even the creating of JNI header files, except for one thing. On > "make install", the .class files get copied into the installation > directory. Since, I'm creating a .jar file, which gets installed in > $prefix/share, I don't want the .class files installed. > >How do I turn this off? I do this with noinst_JAVA. A while ago I sent a patch to fix a problem or two with the way noinst_JAVA is handled, but I don't know whether it went in (I still haven't gotten around to filling out the paperwork). Now that you can go foo_SOURCES = dir1/foo.c dir2/bar.c, it seems like it would be easy to have support for hippo_jar_SOURCES = \ com/foo/bar/Blather.java \ com/foo/baz/Blerf.java \ com/foo/snoggins.properties \ etc. That would be ideal. (Maybe you can already do this?) If you're using automake 1.4, I can send you some horrendous AC_OUTPUT commands which fiddle with noinst_JAVA in the generated Makefiles. --Rusty
Re: Current problems
Akim Demaille wrote: > "Derek R. Price" <[EMAIL PROTECTED]> writes: > > > Only a global is going to be seen within a separate function... > > Right, but `my' at the top level is a global. The problem was really > related to the specific semantics of foreach. Huh. You're right. I didn't believe you, but I just went and tested it myself. :) Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- There are two major products to come out of Berkley: LSD and UNIX. We don't believe this to be a coincidence.
problem with make install and java
I'm using automake with mix C++ and Java code. Everything is fine, even the creating of JNI header files, except for one thing. On "make install", the .class files get copied into the installation directory. Since, I'm creating a .jar file, which gets installed in $prefix/share, I don't want the .class files installed. How do I turn this off? Here is the relevalent part of my Makefile.am JAVADOC = @JAVADOC@ JAR = @JAVAPREFIX@/bin/jar CLASSDIR = $(top_builddir)/hippo JARPATH = $(top_srcdir)/hippo CLASSPATH = $(top_srcdir):$(JARPATH)/koala.jar:$(JARPATH)/saxxml.jar JAVACFLAGS = -g -classpath $(CLASSPATH) jardir = $(datadir) jar_DATA = hippo.jar koala.jar saxxml.jar EXTRA_DIST = hippo.mf.in koala.jar saxxml.jar javadir = $(prefix)/hippo java_JAVA = \ AbstractView.java \ [many more .java files deleted] SUFFIXES = .java .class .jar hippo.jar : $(java_JAVA) cd ..; $(JAR) cmf hippo/hippo.mf hippo/hippo.jar hippo/*.class koala.jar : saxml.jar : dummy :
Re: debug target
Akim Demaille wrote: > Dean Hoover <[EMAIL PROTECTED]> writes: > > > I am new to autotools, and am reading GNU autoconf, automake, and > > libtool by Vaughan, et. al. and the manuals for autoconf and > > automake. I am building a fairly large project with multiple > > directories and several executables and several libraries. I plan to > > use this in conjunction with CVS. I would like to know how to go > > about adding a debug target, such that -O2 is not given on the > > compile/link lines. Any ideas? > > make clean all CFLAGS=-ggdb The sources are c++, so should I set CXXFLAGS instead? Is this somewhere in the documents? Thanks. Dean
Re: 89-stricter-vars.patch
Akim Demaille <[EMAIL PROTECTED]> writes: > There is another problem: installsh.test I found my error, I had not realized that $errdir had to be kept common to each iteration over @require_file_paths. If you apply all my previous patches, plus this: /tmp/am % diff -u automake.in.old automake.innostromo Err 2 --- automake.in.old Wed Feb 28 20:44:54 2001 +++ automake.in Wed Feb 28 20:44:57 2001 @@ -7375,6 +7375,7 @@ my $fullfile; my $errfile; my $save_dir; + my $errdir; # If we've already looked for it, we're done. next if defined $require_file_found{$file}; @@ -7384,7 +7385,6 @@ my $dangling_sym = 0; foreach my $dir (@require_file_paths) { - my $errdir; if ($dir eq '.') { $fullfile = $relative_dir . "/" . $file; there remains two global variables, an happy use strict, and an happy make check. Tom?
Re: debug target
Dean Hoover <[EMAIL PROTECTED]> writes: > I am new to autotools, and am reading GNU autoconf, automake, and > libtool by Vaughan, et. al. and the manuals for autoconf and > automake. I am building a fairly large project with multiple > directories and several executables and several libraries. I plan to > use this in conjunction with CVS. I would like to know how to go > about adding a debug target, such that -O2 is not given on the > compile/link lines. Any ideas? make clean all CFLAGS=-ggdb
debug target
Hi, I am new to autotools, and am reading GNU autoconf, automake, and libtool by Vaughan, et. al. and the manuals for autoconf and automake. I am building a fairly large project with multiple directories and several executables and several libraries. I plan to use this in conjunction with CVS. I would like to know how to go about adding a debug target, such that -O2 is not given on the compile/link lines. Any ideas? Thanks. Dean Hoover
Re: Current problems
"Derek R. Price" <[EMAIL PROTECTED]> writes: > Only a global is going to be seen within a separate function... Right, but `my' at the top level is a global. The problem was really related to the specific semantics of foreach.
Re: Current problems
Akim Demaille wrote: > # Now do all the work on each file. > foreach my $am_file (@input_files) > { > if (! -f ($am_file . '.am')) > { > &am_error ("\`" . $am_file . ".am' does not exist"); > } > else > { > &generate_makefile ($output_files{$am_file}, $am_file); > } > } > > and there is a sub: > > # Print an error message and set exit status. > sub am_error > { > warn "$me: ${am_file}.am: @_\n"; > $exit_status = 1; > } Only a global is going to be seen within a separate function... Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- I will not hide behind the Fifth Amendment. I will not hide behind the Fifth Amendment. I will not hide behind the Fifth Amendment... - Bart Simpson on chalkboard, _The Simpsons_
Re: yaccvpath.test
Hello, Alexandre! I'm applying my patch, Ok? > Pavel> Now we have a more interesting error: > > This is *the* error this test is expected to show. Thanks :) The only question remains, whether it's a bug a not. I'm affraid it's a highly debatable topic. I think it's Ok to test for features if there is consensus that it's features and not bugs and vice versa. So I'll outline some questions. If we argee on them - fine, if not, let's not enforce arguments with test cases. 1) "make dist" must ensure that out-of-date generated distributable files (parser.c, Makefile.in etc) are not included in the tarball either by running "make all" or otherwise. Yes or no? 2) "make distcheck" must ensure that out-of-date generated distributable files are not included in the tarball by exiting with non-zero code. Yes or no? 3) Out-of-date generated distributable files should be recreated in the build directory. Always, never, only when no write permissions for srcdir? 4) "make distclean" should attempt to clean generated distributable files that appear in the build directory. Yes or no? Regards, Pavel Roskin
89-stricter-vars.patch
[Written yesterday by night] Groumph, I'm starting to be too drunk to hack properly :( There are several problems my series of patches has introduced, but I'm tempted to ask for their installations because my feeling is that the patches are right, they just reveal serious problems. And reaching `use strict' is a great news. use strict is almost happy, there remains one var causing problems: require_file_found, which I did not fix (it'd be easy) because there is a dirty hack for depcomp. Tom, why does it have that special handling? It does not follow the regular rules? There is another problem: installsh.test, but it's related to the very same problem: the require_file_internal series is incredible... I plead for my patches because having the test suite fail might be an impetus sufficient to have people install better handlings (at least, I plan to, but certainly not before Friday). In particular, the way require_file_internal modifies @require_file_paths frigthens me to death. require_file_internal should be a pure function (well, installing copies should be the only side effect), taking require_file_paths as an argument, and returning the right path. As is, it's hairy and incredibly fragile (most ypically, hecking it when you're drunk breaks it :). If someone has a deep insight in the ../../install-sh missing stuff, I'm very interested. I read all the relevant notes, but still did not catch the actually idea of it. BTW, until mu drunkness drove me to remove all the work I had done to uniformize the handling of $config_aux_dir, I had it default to $(top_srcdir), and had good results. Is there any point in defaulting it to nothing and special casing it everywhere it appears? Yeah, there are bad bad case such as texinfo.tex, but that remains doable with a $config_aux_dir_has_no_been_set. Also, what's the deep meaning of my @config_aux_path = ('.', '..', '../..'); ? What's special about ../.. and even .. ? Anything to do with $cygnus_mode? Hm. A few more cigarettes, some more alcohol, and time to get some sleep now. Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in ($in_file_name, $am_file_name, $relative_dirs): Globals, initialized... (&initialize_per_input): here. Index: Makefile.am --- Makefile.am Tue, 27 Feb 2001 22:22:03 +0100 akim (am/f/46_Makefile.a 1.11 644) +++ Makefile.am Wed, 28 Feb 2001 01:06:07 +0100 akim (am/f/46_Makefile.a 1.11 644) @@ -116,18 +116,18 @@ echo "Don't use \`local' with parens: use several \`local' above." >&2; \ exit 1; \ fi -## Up to now we manage to limit to 6 uses of local. +## Up to now we manage to limit to 1 use of local. @locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \ case $$locals in \ - [0-6] ) \ - echo "Wow, congrats! There are $$locals \`local' now!." >&2; \ + [0] ) \ + echo "Wow, congrats! There are no \`local' now!." >&2; \ echo "Please update Makefile.am (maintainer-check)." >&2; \ exit 1; \ ;; \ - 7 ) ;; \ + 1 ) ;; \ * ) \ echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \ - echo "Up to now 7 was enough." >&2; \ + echo "Up to now 1 was enough." >&2; \ exit 1; \ ;; \ esac Index: Makefile.in --- Makefile.in Tue, 27 Feb 2001 22:22:03 +0100 akim (am/h/16_Makefile.i 1.27 644) +++ Makefile.in Wed, 28 Feb 2001 01:06:53 +0100 akim (am/h/16_Makefile.i 1.27 644) @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.4e from Makefile.am +# generated automatically by automake 1.4e from # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. @@ -129,12 +129,12 @@ TEXINFOS = automake.texi DATA = $(dist_pkgdata_DATA) $(dist_script_DATA) -DIST_COMMON = README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \ -COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS README-alpha \ -THANKS TODO aclocal.in aclocal.m4 ansi2knr.1 ansi2knr.c automake.in \ -compile config.guess config.sub configure configure.in depcomp \ -elisp-comp install-sh mdate-sh missing mkinstalldirs py-compile \ -stamp-vti texinfo.tex version.texi ylwrap +DIST_COMMON = README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \ +COPYING ChangeLog INSTALL NEWS README-alpha THANKS TODO aclocal.in \ +aclocal.m4 ansi2knr.1 ansi2knr.c automake.in compile config.guess \ +config.sub configure configure.in depcomp elisp-comp install-sh \ +mdate-sh missing mkinstalldirs py-compile stamp-vti texinfo.tex \ +version.texi ylwrap DIST_SUBDIRS = $(SUBDIRS) all: all-recursive @@ -622,7 +622,8 @@ exit 1; \ else :; fi @if grep -n -w undef $(srcdir)/automake.in | \ - fgrep -v 'undef $/'; then \ + fgrep -v 'undef $/' | \ + grep . ; then \ echo "Found undef in automake.in; use delete instead"
87-stricter-vars.patch
Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in (%am_vars, @var_list, %def_type): Globals. (&initialize_per_input): Initialize them. (&read_main_am_file): Don't local them. (&get_object_extension): $objext is private. (&handle_single_transform_list): $lang is. (&handle_ltlibraries): $libname_rx is. (&scan_autoconf_config_files): How about actually paying attention to your arguments, instead of working on $_? (this is no Perl variable, it's a Perl variable followed by a question mark). (&file_contents): $contents and $separator are private. (&am_install_var): Declare @condvals, not $condvals. (%make_dirs): My. Index: automake.in --- automake.in Tue, 27 Feb 2001 23:08:54 +0100 akim (am/f/39_automake.i 1.94 755) +++ automake.in Tue, 27 Feb 2001 23:23:53 +0100 akim (am/f/39_automake.i 1.94 755) @@ -586,6 +586,13 @@ # True if we need `LINK' defined. This is a hack. my $need_link; +# The keys here are variables we want to dump at the end of this +# function. The values are corresponding comments. Need dynamic +# scopes. +my %am_vars; +my @var_list; +my %def_type; + # &initialize_per_input () # @@ -789,6 +796,13 @@ sub initialize_per_input () # True if we need `LINK' defined. This is a hack. $need_link = 0; + +# The keys here are variables we want to dump at the end of this +# function. The values are corresponding comments. Need dynamic +# scopes. +%am_vars = (); +@var_list = (); +%def_type = (); } @@ -1345,7 +1359,7 @@ sub get_object_extension # Generate rules to build ansi2knr. If it is in some # other directory, then generate dependencies but have the # rule just run elsewhere. - $objext = $seen_objext ? ".\$(OBJEXT)" : ".o"; + my $objext = $seen_objext ? ".\$(OBJEXT)" : ".o"; $output_rules .= ($options{'ansi2knr'} . ': ' . $options{'ansi2knr'} . $objext . "\n"); if ($options{'ansi2knr'} eq 'ansi2knr') @@ -1639,7 +1653,7 @@ sub handle_single_transform_list my $renamed = 0; $extension = &derive_suffix ($extension); -$lang = $extension_map{$extension}; +my $lang = $extension_map{$extension}; if ($lang) { &saw_extension ($extension); @@ -2436,7 +2450,7 @@ sub handle_ltlibraries } # Check that the library fits the standard naming convention. - $libname_rx = "^lib.*\.la"; + my $libname_rx = "^lib.*\.la"; if ((&variable_defined ($xlib . '_LDFLAGS') && grep (/-module/, &variable_value_as_list ($xlib . '_LDFLAGS', 'all'))) @@ -4373,8 +4387,9 @@ sub handle_minor_options # (or AC_OUTPUT). sub scan_autoconf_config_files { +my ($config_files) = @_; # Look at potential Makefile.am's. -foreach (split) +foreach (split ' ', $config_files) { # Must skip empty string for Perl 4. next if $_ eq "\\" || $_ eq ''; @@ -6635,13 +6650,6 @@ sub read_main_am_file { my ($amfile) = @_; -# The keys here are variables we want to dump at the end of this -# function. The values are corresponding comments. -# Need dynamic scopes. -local %am_vars = (); -local @var_list = (); -local %def_type = (); - # This supports the strange variable tricks we are about to play. &prog_error ("variable defined before read_main_am_file") if scalar keys %contents > 0; @@ -6784,9 +6792,8 @@ sub file_contents $_ = $fc_file->getline; $/ = $saved_dollar_slash; eval $command; -$contents = $_; - $fc_file->close; +my $contents = $_; # Process each Make `paragraph'. @@ -6810,6 +6817,7 @@ sub file_contents my $result_vars = ''; my $result_rules = ''; my $comment = ''; +my $separator = ''; foreach (split (/(?
86-initialize-move.patch
I've left the comments related to these vars at both their declarations, and their initialization because I don't know where you, Tom, would like to keep them. Personally, I'd keep it at there declaration, but... Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in (&initialize_per_input): Move to the top. Precede with the `my' list of its variables. Index: automake.in --- automake.in Tue, 27 Feb 2001 22:58:56 +0100 akim (am/f/39_automake.i 1.93 755) +++ automake.in Tue, 27 Feb 2001 23:06:24 +0100 akim (am/f/39_automake.i 1.93 755) @@ -28,7 +28,7 @@ # Perl reimplementation by Tom Tromey <[EMAIL PROTECTED]>. require 5.005; - +use strict; use File::Basename; use IO::File; @@ -407,11 +407,394 @@ ); + -# Initialize our list of languages that are internally supported. -&initialize_global_constants; +## -- ## +## Variables reset by &initialize_per_input. ## +## -- ## + +my $output_rules; +my $output_vars; +my $output_trailer; +my $output_all; +my $output_header; + +# Suffixes found during a run. +my @suffixes; + +# This holds the contents of a Makefile.am, as parsed by +# read_am_file. +my %contents; + +# This maps a variable name onto a flag. The flag is true iff the +# variable was first defined with `+='. +my %var_was_plus_eq; + +# This holds definitions of all variables defined in .am files. +# This is used during startup to determine which variables can be +# assigned with ` +my %am_var_defs; + +# For a variable or target $ITEM which is defined conditionally, +# this holds a hash of the conditional values. The keys of +# %CONDITIONAL{$ITEM} are the conditions (the variables which +# configure will substitute), and the values, the associated +# values (meaningless for targets). +# +# By definition, for an unconditional variable, this is empty. +my %conditional; + +# This holds the line numbers at which various elements of +# %contents are defined. +my %content_lines; + +# This holds a 1 if a particular variable was examined. +my %content_seen; + +# This holds the names which are targets. These also appear in +# %contents. +my %targets; + +# Same as %CONDITIONAL, but for targets. +my %target_conditional; + +# This is the conditional stack. +my @conditional_stack; + +# This holds the set of included files. +my @include_stack; + +# This holds the "relative directory" of the current Makefile.in. +# Eg for src/Makefile.in, this is "src". +my $relative_dir; + +# This holds a list of files that are included in the +# distribution. +my %dist_common; + +# This holds a list of directories which we must create at `dist' +# time. This is used in some strange scenarios involving weird +# AC_OUTPUT commands. +my %dist_dirs; + +# List of dependencies for the obvious targets. +my @info; +my @dvi; +my @all; +my @check; +my @check_tests; + +# Holds the dependencies of targets which dependencies are factored. +# Typically, `.PHONY' will appear in plenty of *.am files, but must +# be output once. Arguably all pure dependencies could be subject +# to this factorization, but it is not unpleasant to have paragraphs +# in Makefile: keeping related stuff altogether. +my %dependencies; + +# Holds the factored actions. Tied to %DEPENDENCIES, i.e., filled +# only when keys exists in %DEPENDENCIES. +my %actions; + +# A list of files deleted by `maintainer-clean'. +my @maintainer_clean_files; + +# These are pretty obvious, too. They are used to define the +# SOURCES and OBJECTS variables. +my @sources; +my @objects; +# Sources which go in the distribution. +my @dist_sources; + +# This hash maps object file names onto their corresponding source +# file names. This is used to ensure that each object is created +# by a single source file. +my %object_map; + +# This keeps track of the directories for which we've already +# created `.dirstamp' code. +my %directory_map; + +# These variables track inclusion of various compile-related .am +# files. $included_generic_compile is TRUE if the basic code has +# been included. $included_knr_compile is TRUE if the ansi2knr +# code has been included. $included_libtool_compile is TRUE if +# libtool support has been included. +my $included_generic_compile; +my $included_knr_compile; +my $included_libtool_compile; + +# All .P files. +my %dep_files; + +# Strictness levels. +my $strictness; +my $strictness_name; + +# Options from AUTOMAKE_OPTIONS. +my %options; + +# Whether or not dependencies are handled. Can be further changed +# in handle_options. +my $use_dependencies; + +# Per Makefile.am. +my $local_maint_charset; + +# All yacc and lex source filenames for this directory. Use +# filenames instead of raw count so that multiple instances are +# counted correctly (eg one yacc file can appear in multiple +# programs without harm). +my %yacc_sources; +my %lex_sources; + +# This is a list of all ta
88-stricter-vars.patch
Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in ($am_relative_dir): Global. (&initialize_per_input): Init it. (%make_list, @make_input_list): My them from (&scan_autoconf_files): here. (&require_file_internal): Mying changes. Index: automake.in --- automake.in Tue, 27 Feb 2001 23:30:16 +0100 akim (am/f/39_automake.i 1.95 755) +++ automake.in Tue, 27 Feb 2001 23:42:05 +0100 akim (am/f/39_automake.i 1.95 755) @@ -469,6 +469,9 @@ # Eg for src/Makefile.in, this is "src". my $relative_dir; +# Same but wrt Makefile.am. +my $am_relative_dir; + # This holds a list of files that are included in the # distribution. my %dist_common; @@ -656,6 +659,9 @@ sub initialize_per_input () # Eg for src/Makefile.in, this is "src". $relative_dir = ''; +# Same but wrt Makefile.am. +$am_relative_dir = ''; + # This holds a list of files that are included in the # distribution. %dist_common = (); @@ -4381,6 +4387,8 @@ sub handle_minor_options +my %make_list; +my @make_input_list; # &scan_autoconf_config_files ($CONFIG-FILES) # --- # Study $CONFIG-FILES which is the first argument to AC_CONFIG_FILES @@ -4833,10 +4841,6 @@ sub scan_autoconf_files # that won't always be the case. %libsources = (); -# Watchout: these guys need dynamic scope! -local %make_list; -local @make_input_list; - warn "$me: both \`configure.ac' and \`configure.in' present:" . " ignoring \`configure.in'\n" if -f 'configure.ac' && -f 'configure.in'; @@ -7342,29 +7346,34 @@ sub maybe_push_required_file } } -# Verify that the file must exist in the current directory. Usage: -# require_file (isconfigure, line_number, strictness, file) strictness -# is the strictness level at which this file becomes required. Must -# set require_file_paths before calling this function. + +# &require_file_internal ($IS_CONFIGURE, $LINE, $MYSTRICT, @FILES) +# +# Verify that the file must exist in the current directory. +# $MYSTRICT is the strictness level at which this file becomes required. +# +# Must set require_file_paths before calling this function. # require_file_paths is set to hold a single directory (the one in # which the first file was found) before return. sub require_file_internal { my ($is_configure, $line, $mystrict, @files) = @_; -my $fullfile; -my ($found_it, $dangling_sym, $errfile, $errdir); -my $save_dir; foreach my $file (@files) { +my $fullfile; + my $errfile; + my $save_dir; + # If we've already looked for it, we're done. next if defined $require_file_found{$file}; $require_file_found{$file} = 1; - $found_it = 0; - $dangling_sym = 0; + my $found_it = 0; + my $dangling_sym = 0; foreach my $dir (@require_file_paths) { + my $errdir; if ($dir eq '.') { $fullfile = $relative_dir . "/" . $file;
85-var-move.patch
Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in ($am_file): Use vars. ($am_file_name, $in_file_name): Private to &generate_makefile. Index: automake.in --- automake.in Tue, 27 Feb 2001 22:52:56 +0100 akim (am/f/39_automake.i 1.92 755) +++ automake.in Tue, 27 Feb 2001 22:58:21 +0100 akim (am/f/39_automake.i 1.92 755) @@ -372,11 +372,6 @@ my $maint_charset = ''; my $dist_charset = 'utf8'; # recode doesn't support this yet. -# Name of input file ("Makefile.in") and output file ("Makefile.am"). -# These have no directory components. -my $am_file_name = ''; -my $in_file_name = ''; - # TRUE if --cygnus seen. my $cygnus_mode = 0; @@ -490,6 +485,7 @@ # Now do all the work on each file. # This guy must be local otherwise it's private to the loop. +use vars '$am_file'; local $am_file; foreach $am_file (@input_files) { @@ -635,8 +631,10 @@ sub generate_makefile { my ($output, $makefile) = @_; -($am_file_name = $makefile) =~ s/^.*\///; -$in_file_name = $am_file_name . '.in'; +# Name of input file ("Makefile.in") and output file +# ("Makefile.am"). These have no directory components. +(my $am_file_name = $makefile) =~ s/^.*\///; +my $in_file_name = $am_file_name . '.in'; $am_file_name .= '.am'; # $OUTPUT is encoded. If it contains a ":" then the first element
84-move-constants-to-the-top.patch
Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in: Preparation for `use strict': Move the initialization of the constants to the top, from... (&initialize_global_constants): here. Index: automake.in --- automake.in Tue, 27 Feb 2001 22:32:32 +0100 akim (am/f/39_automake.i 1.91 755) +++ automake.in Tue, 27 Feb 2001 22:50:37 +0100 akim (am/f/39_automake.i 1.91 755) @@ -34,6 +34,11 @@ my $me = basename ($0); + +## --- ## +## Constants. ## +## --- ## + # Parameters set by configure. Not to be changed. NOTE: assign # VERSION as string so that eg version 0.30 will print correctly. my $VERSION = "@VERSION@"; @@ -79,6 +84,53 @@ my $GNU = 1; my $GNITS = 2; +# Values for AC_CANONICAL_* +my $AC_CANONICAL_HOST = 1; +my $AC_CANONICAL_SYSTEM = 2; + +# Files installed by libtoolize. +my @libtoolize_files = ('ltmain.sh', 'config.guess', 'config.sub'); +# ltconfig appears here for compatibility with old versions of libtool. +my @libtoolize_sometimes = ('ltconfig', 'ltcf-c.sh', 'ltcf-cxx.sh', +'ltcf-gcj.sh'); + +# Commonly found files we look for and automatically include in +# DISTFILES. +my @common_files = + ( + 'README', 'THANKS', 'TODO', 'NEWS', 'COPYING', 'COPYING.LIB', + 'INSTALL', 'ABOUT-NLS', 'ChangeLog', 'configure.ac', + 'configure.in', 'configure', 'config.guess', 'config.sub', + 'AUTHORS', 'BACKLOG', 'ABOUT-GNU', 'libversion.in', + 'mdate-sh', 'mkinstalldirs', 'install-sh', 'texinfo.tex', + 'ansi2knr.c', 'ansi2knr.1', 'elisp-comp', + # ltconfig appears here for compatibility with old versions + # of libtool. + 'ylwrap', 'acinclude.m4', @libtoolize_files, @libtoolize_sometimes, + 'missing', 'depcomp', 'compile', 'py-compile' + ); + +# Commonly used files we auto-include, but only sometimes. +my @common_sometimes = + ( + 'aclocal.m4', 'acconfig.h', 'config.h.top', + 'config.h.bot', 'stamp-h.in', 'stamp-vti' + ); + +# Copyright on generated Makefile.ins. +my $gen_copyright = "\ +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. +"; + # These constants are returned by lang_*_rewrite functions. # LANG_SUBDIR means that the resulting object file should be in a # subdir if the source file is. In this case the file name cannot @@ -105,11 +157,55 @@ 'pkglib'=> 1, 'pkginclude'=> 0 ); + +# Map from obsolete macros to hints for new macros. +# If you change this, change the corresponding list in aclocal.in. +# FIXME: should just put this into a single file. +my %obsolete_macros = +( + 'AC_FEATURE_CTYPE', "use \`AC_HEADER_STDC'", + 'AC_FEATURE_ERRNO', "add \`strerror' to \`AC_REPLACE_FUNCS(...)'", + 'AC_FEATURE_EXIT', '', + 'AC_SYSTEM_HEADER', '', + + # Note that we do not handle this one, because it is still run + # from AM_CONFIG_HEADER. So we deal with it specially in + # &scan_autoconf_files. + # 'AC_CONFIG_HEADER', "use \`AM_CONFIG_HEADER'", + + 'fp_C_PROTOTYPES', "use \`AM_C_PROTOTYPES'", + 'fp_PROG_CC_STDC', "use \`AM_PROG_CC_STDC'", + 'fp_PROG_INSTALL', "use \`AC_PROG_INSTALL'", + 'fp_WITH_DMALLOC', "use \`AM_WITH_DMALLOC'", + 'fp_WITH_REGEX', "use \`AM_WITH_REGEX'", + 'gm_PROG_LIBTOOL', "use \`AM_PROG_LIBTOOL'", + 'jm_MAINTAINER_MODE', "use \`AM_MAINTAINER_MODE'", + 'md_TYPE_PTRDIFF_T', "use \`AM_TYPE_PTRDIFF_T'", + 'ud_PATH_LISPDIR', "use \`AM_PATH_LISPDIR'", + 'ud_GNU_GETTEXT', "use \`AM_GNU_GETTEXT'", + + # Now part of autoconf proper, under a different name. + 'AM_FUNC_FNMATCH', "use \`AC_FUNC_FNMATCH'", + 'fp_FUNC_FNMATCH', "use \`AC_FUNC_FNMATCH'", + 'AM_SANITY_CHECK_CC', "automatically done by \`AC_PROG_CC'", + 'AM_PROG_INSTALL', "use \`AC_PROG_INSTALL'", + 'AM_EXEEXT', "use \`AC_EXEEXT'", + 'AM_CYGWIN32', "use \`AC_CYGWIN'", + 'AM_MINGW32', "use \`AC_MINGW32'", + 'AM_FUNC_MKTIME', "use \`AC_FUNC_MKTIME'", + +# These aren't quite obsolete. +# 'md_PATH_PROG', + ); + +# Regexp to match the above macros. +my $obsolete_rx = '(\b' . join ('\b|\b', keys %obsolete_macros) . '\b)'; -# Variables global to entire run. -# Variables related to the options. +## -- ## +## Variables related to the options. ## +## -- ## # TRUE if we should always generate Makefile.in. my $force_generation = 1; @@ -143,24 +239,10 @@ # TRUE if we should always update files that we know about. my $force_missing = 0; -#
83-lang-spec-files-list.patch
Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in (&handle_single_transform_list, &add_depend2): Let $lang_specific_files{$lang} be a list instead of a string. Index: automake.in --- automake.in Tue, 27 Feb 2001 22:23:36 +0100 akim (am/f/39_automake.i 1.90 755) +++ automake.in Tue, 27 Feb 2001 22:29:07 +0100 akim (am/f/39_automake.i 1.90 755) @@ -1305,9 +1305,8 @@ sub handle_single_transform_list $rule = ''; my $obj_sans_ext = substr ($object, 0, - length ($this_obj_ext)); -$lang_specific_files{$lang} .= (' ' . $derived -. ' ' . $full -. ' ' . $obj_sans_ext); +push (@{$lang_specific_files{$lang}}, + "$derived $full $obj_sans_ext"); } } elsif ($extension eq 'o') @@ -2770,17 +2769,10 @@ sub add_depend2 # Now include code for each specially handled object with this # language. -my @list = grep ($_ ne '', split (' ', $lang_specific_files{$lang})); -my $max = scalar @list; -my $i = 0; -my ($derived, $source, $obj); my %seen_files = (); -while ($i < $max) +foreach my $file (@{$lang_specific_files{$lang}}) { - $derived = $list[$i]; - $source = $list[$i + 1]; - $obj = $list[$i + 2]; - $i += 3; +my ($derived, $source, $obj) = split (' ', $file); # We might see a given object twice, for instance if it is # used under different conditions.
82-depend2-fix-non-generic.patch
I'm applying it since it's a bug fix, and rather obvious. Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in (&add_depend2): Transform `GENERIC'. Get rid of the ad hoc transformation of `@EXT@.o:' which in addition was broken by the `@ -> %' patch. * depend2.am: Adjust to use ?GENERIC?. Index: automake.in --- automake.in Tue, 27 Feb 2001 22:20:29 +0100 akim (am/f/39_automake.i 1.89 755) +++ automake.in Tue, 27 Feb 2001 22:22:41 +0100 akim (am/f/39_automake.i 1.89 755) @@ -2750,7 +2750,8 @@ sub add_depend2 my $compile = '$(' . $pfx . 'COMPILE)'; my $ltcompile = '$(LT' . $pfx . 'COMPILE)'; my $xform1 = ($xform - . &transform ('BASE' => '$*', + . &transform ('GENERIC' => 1, + 'BASE' => '$*', 'SOURCE'=> '$<', 'OBJ' => '$@', 'LTOBJ' => '$@', @@ -2799,22 +2800,14 @@ sub add_depend2 &file_contents ('depend2', $xform -. &transform ('COMPILE' => $obj_compile, - 'LTCOMPILE' => $obj_ltcompile, - # Handle source and obj transforms. - 'OBJ' => $obj . '.o', - 'OBJOBJ'=> $obj . '.obj', - 'LTOBJ' => $obj . '.lo', +. &transform ('GENERIC' => 0, 'BASE' => $obj, - 'SOURCE'=> $source) -# Generate rule for `.o'. -. 's/^\@EXT\@\.o:/' . "\Q$obj.o: $source\E" . '/g;' -# Maybe generate rule for `.lo'. Might be eliminated -# by $XFORM. -. 's/^\@EXT\@\.lo:/' . "\Q$obj.lo: $source\E" . '/g;' -# Maybe generate rule for `.obj'. Might be -# eliminated by $XFORM. -. 's/^\@EXT\@\.obj:/' . "\Q$obj.obj: $source\E" . '/g;'); + 'SOURCE'=> $source, + 'OBJ' => "$obj.o", + 'OBJOBJ'=> "$obj.obj", + 'LTOBJ' => "$obj.lo", + 'COMPILE' => $obj_compile, + 'LTCOMPILE' => $obj_ltcompile)) } } Index: depend2.am --- depend2.am Mon, 26 Feb 2001 23:44:40 +0100 akim (am/g/43_depend2.am 1.6 644) +++ depend2.am Tue, 27 Feb 2001 22:22:31 +0100 akim (am/g/43_depend2.am 1.6 644) @@ -23,19 +23,22 @@ ?AMDEP?@AMDEP@%FPFX%DEPMODE = @%FPFX%DEPMODE@ -%EXT%.o: +?GENERIC?%EXT%.o: +?!GENERIC?%OBJ%: %SOURCE% ?AMDEP?@AMDEP@ source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@ ?AMDEP?@AMDEP@ depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' @AMDEPBACKSLASH@ ?AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ %COMPILE% -c -o %OBJ% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE% -?LIBTOOL?%EXT%.lo: +?GENERIC??LIBTOOL?%EXT%.lo: +?!GENERIC??LIBTOOL?LTOBJ%: %SOURCE% ?LIBTOOL??AMDEP?@AMDEP@source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@ ?LIBTOOL??AMDEP?@AMDEP@depfile='$(DEPDIR)/%BASE%.Plo' tmpdepfile='$(DEPDIR)/%BASE%.TPlo' @AMDEPBACKSLASH@ ?LIBTOOL??AMDEP?@AMDEP@$(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@ ?LIBTOOL? %LTCOMPILE% -c -o %LTOBJ% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE% -?OBJEXT?%EXT%.obj: +?GENERIC??OBJEXT?%EXT%.obj: +?!GENERIC??OBJEXT?%OBJOBJ%: %SOURCE% ?OBJEXT??AMDEP?@AMDEP@ source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@ ?OBJEXT??AMDEP?@AMDEP@ depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' @AMDEPBACKSLASH@ ?OBJEXT??AMDEP?@AMDEP@ $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
FYI: undef $/.
Needed for my ten-times patch. Question: why do we grep . after grep -v? It is not guaranteed that grep -v will exit positive when it output something? Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * Makefile.am (maintainer-check): `undef $/' is OK. Index: Makefile.am --- Makefile.am Mon, 26 Feb 2001 23:44:40 +0100 akim (am/f/46_Makefile.a 1.10 644) +++ Makefile.am Tue, 27 Feb 2001 22:20:55 +0100 akim (am/f/46_Makefile.a 1.10 644) @@ -88,8 +88,10 @@ echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \ exit 1; \ else :; fi -## We never want to use "undef", only "delete". - @if grep -n -w undef $(srcdir)/automake.in; then \ +## We never want to use "undef", only "delete", but for $/. + @if grep -n -w undef $(srcdir)/automake.in | \ + fgrep -v 'undef $/' | \ + grep . ; then \ echo "Found undef in automake.in; use delete instead" 1>&2; \ exit 1; \ fi
FYI: dead var.
Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * automake.in (&handle_configure): Fortunately, $top_reldir, which definition was highly suspicious, was useless. Index: automake.in --- automake.in Tue, 27 Feb 2001 21:22:26 +0100 akim (am/f/39_automake.i 1.88 755) +++ automake.in Tue, 27 Feb 2001 21:57:50 +0100 akim (am/f/39_automake.i 1.88 755) @@ -3079,13 +3079,7 @@ sub handle_configure . ' CONFIG_HEADERS= CONFIG_LINKS= $(SHELL) ./config.status' . "\n\n"); -my $top_reldir; -if ($relative_dir ne '.') -{ - # In subdirectory. - $top_reldir = '../'; -} -else +if ($relative_dir eq '.') { &handle_aclocal_m4; $output_rules .= @@ -3093,7 +3087,6 @@ sub handle_configure &transform ('CONFIGURE_AC' => $configure_ac)); &examine_variable ('CONFIG_STATUS_DEPENDENCIES'); &examine_variable ('CONFIGURE_DEPENDENCIES'); - $top_reldir = ''; &push_dist_common ('acconfig.h') if -f 'acconfig.h';
Re: How about making it ten times faster?
Hm, I sent my patch yesterday, but it didn't show up :( Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> Let's make it run ten times faster... * automake.in (&transform): Be sure to remove the `\n' with ?FOO? transformations. (&file_contents): Let `$command' remove the Automake commands, and normalize the series of `\n'. Slurp the file and apply $command in a single step. No longer apply the `@MAINTAINER_MODE_TRUE@' transformation which is already normalized to be handled by &transform. Index: automake.in --- automake.in Tue, 27 Feb 2001 20:24:10 +0100 akim (am/f/39_automake.i 1.87 755) +++ automake.in Tue, 27 Feb 2001 21:11:36 +0100 akim (am/f/39_automake.i 1.87 755) @@ -6586,21 +6586,26 @@ sub file_contents &prog_error ("file_contents: $command") if $command ne '' && substr ($command, -1) ne ';'; $command .= - &transform ('CYGNUS' => $cygnus_mode, - 'MAINTAINER_MODE' => $seen_maint_mode, + # We don't use IGNORE_PATTERN because it contains $ which + # prevents us from matching the end of line. + "s/##([^#\n].*)?\\n//gmo;" + . &transform ('CYGNUS' => $cygnus_mode, + 'MAINTAINER_MODE' => $seen_maint_mode, + + 'SHAR'=> $options{'dist-shar'}, + 'BZIP2' => $options{'dist-bzip2'}, + 'ZIP' => $options{'dist-zip'}, + 'COMPRESS'=> $options{'dist-tarZ'}, + + 'INSTALL-INFO' => !$options{'no-installinfo'}, + 'INSTALL-MAN' => !$options{'no-installman'}, + 'CK-NEWS' => $options{'check-news'}, + + 'SUBDIRS' => &variable_defined ('SUBDIRS')) + # We don't need more than two consecutive new-lines. + . 's/\n{3,}/\n\n/g'; - 'SHAR'=> $options{'dist-shar'}, - 'BZIP2' => $options{'dist-bzip2'}, - 'ZIP' => $options{'dist-zip'}, - 'COMPRESS'=> $options{'dist-tarZ'}, - - 'INSTALL-INFO' => !$options{'no-installinfo'}, - 'INSTALL-MAN' => !$options{'no-installman'}, - 'CK-NEWS' => $options{'check-news'}, - - 'SUBDIRS' => &variable_defined ('SUBDIRS')); - -# Swallow the file and applied the COMMAND. +# Swallow the file and apply the COMMAND. my $file = $am_dir . '/' . $basename . '.am'; my $fc_file = new IO::File ("< $file"); if (! $fc_file) @@ -6612,39 +6617,15 @@ sub file_contents # Swallow into $CONTENTS the whole content of the file, after # having performed the $COMMAND, and removed Automake comments. -my $contents = ''; - -while ($_ = $fc_file->getline) -{ - $_ =~ s/\@MAINTAINER_MODE_TRUE\@//g - unless $seen_maint_mode; - - $had_chars = length ($_) && $_ ne "\n"; -eval $command; - # If the transform caused all the characters to go away, then - # ignore the line. Why do this? Because in Perl 4, a "next" - # inside of an eval doesn't affect a loop outside the eval. - # So we can't pass in a "transform" that uses next. We used - # to do this. "Empty" also means consisting of a single - # newline. - next if $had_chars && ($_ eq '' || $_ eq "\n"); - - # Merely delete comments beginning with two hashes. - next if /$IGNORE_PATTERN/o; - - $contents .= $_; -} +my $saved_dollar_slash = $/; +undef $/; +$_ = $fc_file->getline; +$/ = $saved_dollar_slash; +eval $command; +$contents = $_; $fc_file->close; -# We don't need more than two consecutive new-lines. -$contents =~ s/\n{3,}/\n\n/g; - -# A rule has three parts: a list of targets, a list of dependencies, -# and optionally actions. -my $RULE_PATTERN = - "^($TARGET_PATTERN(?:(?:\n|\\s)+$TARGET_PATTERN)*) *:([^=].*|)\$"; - # Process each Make `paragraph'. # @@ -6658,6 +6639,12 @@ sub file_contents # perl goes loopy if you try to # # $result_rules =~ /^($TARGET_PATTERN *)+: ($TARGET_PATTERN *)+\n\n/sm + +# A rule has three parts: a list of targets, a list of dependencies, +# and optionally actions. +my $RULE_PATTERN = + "^($TARGET_PATTERN(?:(?:\n|\\s)+$TARGET_PATTERN)*) *:([^=].*|)\$"; + my $result_vars = ''; my $result_rules = ''; my $comment = ''; @@ -6780,14 +6767,14 @@ sub transform (%) while (my ($token, $val) = each %pairs) { -$result .= "s/\Q%$token%\E/\Q$val\E/g;"; +$result .= "s/\Q%$token%\E/\Q$val\E/gm;"; if ($val) { - $result .= "s/\Q?$token?\E//g;s/^.*\Q?!$token?\E.*\$//g;"; + $result .= "s/\Q?$token?\E//gm;s/^.*\Q?!$token?\E.*\\n//gm;"; } else { - $result .= "s/\Q?!$token?\E//g;s/^.*\Q?$
Automating builds of multiple packages
Hello, I am Arjan Molenaar and I am a software engineer from the Netherlands. I have a question... I'm wondering if it is possible to build multiple packages from one point, where the packages are linked to each other. Hmm.. This looks vague. Imagine this: I want to build the gnome-libs from source. Therefore I need GLib, GTK+, Pango and a few other packages already build and installed. It would be nice (especially for developers) to make sure GLib is up to date, GTK+ is up to date, etc. before building gnome-libs (a "make" in gnome-libs/ would automatically check those packages). My question is: Is there support for this in AutoMake/conf/... or a separate tool, or need something like this to be build? Thanks in advance, Arjan PS. Would you be so kind to CC me, since I'm not subscribed to this list (yet ;-). -- Computers are like air-conditioners - they stop working properly if you open Windows. -- Unknown.
Re: yaccvpath.test
>>> "Pavel" == Pavel Roskin <[EMAIL PROTECTED]> writes: Pavel> Hello, Alexandre! Pavel> It fails on RedHat 6.2, but not 7.0. I believe it's a Pavel> Perl issue. Not sure if I'll have time today to look at Pavel> this. Pavel> It's not Perl. It's a timestamp quantization. Oops, I should have read this mail before posting my own patch... [...] Pavel> Now we have a more interesting error: This is *the* error this test is expected to show. Thanks :) Pavel> make[3]: Leaving directory Pavel> `/usr/local/src/am1/tests/testSubDir/sub/foo-0.1/=build' Pavel> Error: files left after distclean Pavel> make[2]: *** [distcheck] Error 1 Pavel> make[2]: Leaving directory `/usr/local/src/am1/tests/testSubDir/sub' Pavel> FAIL: yaccvpath.test Pavel> The file left after distclean is parse.c in the "=build" directory. [...] -- Alexandre Duret-Lutz
Re: yaccvpath.test
>>> "Pavel" == Pavel Roskin <[EMAIL PROTECTED]> writes: Pavel> Hello, Alexandre! >> >> Alexandre claims it fails. >> >> Yes it should. Pavel> Then show us how it fails. You did it in the next mail. [...] Pavel> But I don't see that your are testing for that Pavel> problem. Your test is quite generic - "make distcheck" Pavel> should pass. No it dows stop because a newer parse.c is generated in the build tree (because the parse.c included in the distribution is not up to date w.r.t parse.y). [...] >> Isn't this a workaround to an Automake bug? It look so to me: >> if install-sh is in current directory, why would Automake prefer >> and use ../../install-sh? Pavel> It's a complicated mix of several bugs and ancient Pavel> traditions. I believe, the best fix will be to have Pavel> tests/defs to copy the right install-sh instead of Pavel> creating an empty file. yaccvpath already erase these files and run `automake -a'. -- Alexandre Duret-Lutz
cross-install-strip summary
>>> "Tom" == Tom Tromey <[EMAIL PROTECTED]> writes: [...] Tom> I think what is in there now ought to work. Tom> Can you test it? I have tested install-strip for cross-compilation with CVS Automake, doing both an in-place and a VPATH build (with relative paths, I have not tested absolute paths). It works here, great :) I suppose the following issue are remaining: * install-strip when cross-compiling: - $INSTALL_STRIP_PROGRAM assumes install-sh, not install.sh (easily fixed) - $_am_dirpart can fooled when $install_sh is defined using $am_missing_run - $STRIP has to be set *before* AM_INIT_AUTOMAKE is called (either by the user or in a configure check); I'm not really happy with that -- but it deserves some documentation, should it be kept as-is. * install-strip when *not* cross-compiling: - $INSTALL_STRIP_PROGRAM uses sub make evaluation, does it really matters? Comments? -- Alexandre Duret-Lutz
Re: yaccvpath.test
>>> "Tom" == Tom Tromey <[EMAIL PROTECTED]> writes: >> "Pavel" == Pavel Roskin <[EMAIL PROTECTED]> writes: Pavel> I don't quite understand whether your test is supposed to work Pavel> or not. It's failing for me (besides the typo in Pavel> tests/Makefile.am that I've just fixed). Tom> Alexandre claims it fails. Tom> I've updated it a bit. Now it works for me. Tom> Alexandre, can you investigate the change? Tom> I changed it to only configure and build once. Tom> Actually, sometimes bison complains when I run the test and sometimes Tom> it does not. Weird. Ok, I think I have fixed the testcase (I mean, it now fails succesfully :)) It seems it was a timestamp issue. First parse.y is create, then parse.c is generated, (this takes less than a second since you removed the first configure/make call); if parse.y is updated during this same second, parse.c is considered up-to-date by make, and make distcheck doesn't complain. I have fixed that in two ways: - when parse.y is updated, add a string that can be grepped for latter in parse.c; and grep for this string in the fresh distribution made by make distcheck (make dist would be enough). - add a sleep before updating parse.y Actually grepping is not needed when `make distcheck' does its job correctly, so if you think two checks for the same things are too much you might want to remove the grep call, or replace `make distcheck' by `make dist'. 2001-02-27 Alexandre Duret-Lutz <[EMAIL PROTECTED]> * tests/yaccvpath.test: Check for no gzip; run bison in yacc mode; sleep before updating parse.y to have a different timestamp; append a comment to parse.y instead of adding an usused rule; grep for that comment in the resulting parse.c from the distribution in addition to running make distcheck. --- tests/yaccvpath.test.oldTue Feb 27 20:18:29 2001 +++ tests/yaccvpath.testTue Feb 27 20:55:03 2001 @@ -42,10 +42,11 @@ (gcc -v) > /dev/null 2>&1 || exit 77 (flex -V) > /dev/null 2>&1 || exit 77 (bison -V) > /dev/null 2>&1 || exit 77 +(gzip -V) > /dev/null 2>&1 || exit 77 LEX=flex export LEX -YACC=bison +YACC='bison -y' export YACC # Remove some files installed by defs. @@ -58,11 +59,16 @@ $AUTOCONF $AUTOMAKE -a -bison -y parse.y +$YACC parse.y mv y.tab.c parse.c +# sleep to make sure the timestamp of parse.y will be +# different from the timestamp of parse.c when make distcheck run. +sleep 2 + cat >> parse.y << 'END' -fubar : 'f' foobar {}; +%% +/* GrepMe */ END mkdir sub @@ -70,3 +76,8 @@ ../configure $MAKE $MAKE distcheck +# distcheck should be king enough to detect if parse.c is up-to-date +# in the distribution. +# Below is another way to test for the same thing. +gzip -d -c foo-0.1.tar.gz | tar xf - +grep GrepMe foo-0.1/parse.c [...] -- Alexandre Duret-Lutz