From: Tom Tromey Date: Sat, 2 Mar 1996 22:52:54 +0000 (+0000) Subject: Bug fixes X-Git-Tag: Release-0-31~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1aca759a879c252bd9880900880d0ad76dab663;p=thirdparty%2Fautomake.git Bug fixes --- diff --git a/ChangeLog b/ChangeLog index 2893e7131..4d7b7d4d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,11 @@ Sat Mar 2 14:04:38 1996 Tom Tromey * automake.in (handle_dist_worker): Only cause Automake to be re-run if not making a distribution. Fixes bug reported by Joerg-Martin Schwarz. + (require_file_with_line): New function. + (require_file): Use it. + (am_line_error): Don't print line number if $symbol is empty. + (get_object_extension): Use require_file_with_line. + (handle_libraries): Use require_file_with_line. Fri Mar 1 00:13:04 1996 Tom Tromey diff --git a/Makefile.in b/Makefile.in index 3bf4a1d0c..d6472315f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -261,9 +261,6 @@ dist: $(DEP_DISTFILES) rm -rf $(distdir) mkdir $(distdir) chmod 777 $(distdir) - distdir=`cd $(distdir) && pwd` \ - && cd $(srcdir) \ - && automake --include-deps --output-dir=$$distdir --strictness=gnits @for file in `cd $(srcdir) && echo $(DISTFILES)`; do \ test -f $(distdir)/$$file \ || ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \ diff --git a/THANKS b/THANKS index e70c1b928..5bce45e99 100644 --- a/THANKS +++ b/THANKS @@ -9,5 +9,6 @@ Henrik Frystyk Nielsen Jerome Santini Jim Meyering Karl Berry +Markku Rossi Noah Friedman Ulrich Drepper diff --git a/TODO b/TODO index db8959e30..b75049798 100644 --- a/TODO +++ b/TODO @@ -3,18 +3,23 @@ Priorities for release: Makefile.am or configure.in. [handle_configure does] * Add prog_CFLAGS -Franc,ois> * Do you speak somewhere of the capability Automake has to let -Franc,ois> the user overrides definitions and goals? I think this is useful, -Franc,ois> at times. I think the "When Automake Isn't Enough" node needs to -Franc,ois> be revisited, as it says false things. +François> * Do you speak somewhere of the capability Automake has to let +François> the user overrides definitions and goals? I think this is useful, +François> at times. I think the "When Automake Isn't Enough" node needs to +François> be revisited, as it says false things. +-- this should be its own node +-- should include general comment on automake processing -- copy-through +-- include recommended order of macros -Franc,ois> * You might say a word about comment processing, double -Franc,ois> hash removing, and copying of a possible copyright block at -Franc,ois> beginning of Makefile.am. +need to add chapter with examples of each kind of package -Franc,ois> * The manual should tell about the fact the automake program, when -Franc,ois> used for a single subdirectory, should be run from the top level, -Franc,ois> with something like an explicit DIR/Makefile argument. +François> * You might say a word about comment processing, double +François> hash removing, and copying of a possible copyright block at +François> beginning of Makefile.am. + +François> * The manual should tell about the fact the automake program, when +François> used for a single subdirectory, should be run from the top level, +François> with something like an explicit DIR/Makefile argument. * look at ``'' issues in docs. and look for 'definition' pragma @@ -32,7 +37,7 @@ an option Think about ways to make automake fit better with Cygnus-style trees. -Use recode in dist target when MAIN_CHARSET specified. Read caveats +Use recode in dist target when MAINT_CHARSET specified. Read caveats in automake.in before doing this. Note the same problem used to apply to the no-dependencies option; maybe it still should? Note also that each Makefile.am must be rewritten at "make dist" time if diff --git a/automake.in b/automake.in index abb4b6693..8eed243e1 100755 --- a/automake.in +++ b/automake.in @@ -452,7 +452,8 @@ sub get_object_extension $dir_holds_sources = '$o'; push (@suffixes, '._c', '._o'); - &require_file ($FOREIGN, 'ansi2knr.c', 'ansi2knr.1'); + &require_file_with_line ('AUTOMAKE_OPTIONS', $FOREIGN, + 'ansi2knr.c', 'ansi2knr.1'); $output_vars .= &file_contents ('kr-vars'); $output_rules .= &file_contents ('compile-kr'); @@ -633,7 +634,8 @@ sub handle_libraries { ($rewrite = $iter) =~ s/\.c$/.P/; $dep_files{'$(srcdir)/.deps/' . $rewrite} = 1; - &require_file ($FOREIGN, $iter); + &require_file_with_line ($onelib . '_LIBADD', + $FOREIGN, $iter); } } } @@ -643,7 +645,8 @@ sub handle_libraries "\@ALLOCA\@ seen but \`AC_FUNC_ALLOCA' not in \`configure.in'") if ! defined $libsources{'alloca.c'}; $dep_files{'$(srcdir)/.deps/alloca.P'} = 1; - &require_file ($FOREIGN, 'alloca.c'); + &require_file_with_line ($onelib . '_LIBADD', $FOREIGN, + 'alloca.c'); } } } @@ -764,7 +767,8 @@ sub handle_texinfo &push_phony_cleaners ($vti); - # Only require once. + # Only require once. FIXME should be able to use + # require_file_with_line here. &require_file ($FOREIGN, 'mdate-sh') if ! $done; ++$done; } @@ -834,7 +838,8 @@ sub handle_texinfo # supported. . "TEXINFOS = " . $contents{'info_TEXINFOS'} . "\n\n"); - # Do some error checking. + # Do some error checking. FIXME should be able to use + # require_file_with_line here. &require_file ($FOREIGN, 'texinfo.tex'); } @@ -1192,6 +1197,7 @@ sub handle_subdirs if $contents{'SUBDIRS'} !~ /\bintl\b/; } + # FIXME should be able to use require_file_with_line here. &require_file ($FOREIGN, 'ABOUT-NLS') if $seen_gettext; return if ! defined $contents{'SUBDIRS'}; @@ -1266,10 +1272,12 @@ sub handle_configure { # FIXME this restriction should be lifted. # FIXME first see if it is even needed as-is. + # FIXME shouldn't this message reference configure.in? &am_line_error ($config_header_line, "argument to AC_CONFIG_HEADER contains \`/'\n") if ($config_header =~ /\//); + # FIXME should be able to use require_file_with_line here. &require_file ($FOREIGN, $config_header); # Header defined and in this directory. @@ -1340,6 +1348,7 @@ sub handle_configure . ($relative_dir eq '.' ? '' : '$(subdir)/') . '$@ CONFIG_HEADERS= ./config.status' . "\n"); + # FIXME should be able to use require_file_with_line here. &require_file ($FOREIGN, $local . '.in'); } } @@ -2470,9 +2479,9 @@ sub am_install_var # Usage: require_file (strictness, file) # strictness is the strictness level at which this file becomes # required. -sub require_file +sub require_file_with_line { - local ($mystrict, @files) = @_; + local ($line, $mystrict, @files) = @_; local ($file, $fullfile); foreach $file (@files) @@ -2502,19 +2511,25 @@ sub require_file # FIXME this is a hack. Should have am_warn. local ($save) = $exit_status; - &am_error - ("required file \"$fullfile\" not found; installing"); + &am_line_error + ($line, + "required file \"$fullfile\" not found; installing"); $exit_status = $save; } else { # Only an error if strictness constraint violated. - &am_error ("required file \"$fullfile\" not found"); + &am_error ($line, "required file \"$fullfile\" not found"); } } } } +sub require_file +{ + &require_file_with_line ('', @_); +} + # Require a file that is also required by Autoconf. Looks in # configuration path, as specified by AC_CONFIG_AUX_DIR. sub require_config_file @@ -2654,8 +2669,10 @@ sub am_line_error local ($symbol, @args) = @_; # If SYMBOL not already a line number, look it up in Makefile.am. - $symbol = $content_lines{$symbol} unless $symbol =~ /^\d+$/; - warn "${am_file}.am:", $symbol, ": ", join (' ', @args), + # Use \d* and not \d+ so that empty symbol will pass through. + $symbol = $content_lines{$symbol} unless $symbol =~ /^\d*$/; + $symbol .= ': ' if $symbol; + warn "${am_file}.am:", $symbol, join (' ', @args), "\n"; $exit_status = 1; } diff --git a/automake.texi b/automake.texi index bbd5ce35b..0c9931a32 100644 --- a/automake.texi +++ b/automake.texi @@ -338,6 +338,14 @@ end, Automake allows you to extend the list of possible installation directories. A given prefix (eg @samp{zar}) is valid if a variable of the same name with @samp{dir} appended is defined (eg @samp{zardir}). +For instance, until HTML support is part of Automake, you could use this +to install raw HTML documentation: + +@example +htmldir = $(prefix)/html +html_DATA = automake.html +@end example + The special prefix @samp{noinst} indicates that the objects in question should not be installed at all. diff --git a/version.texi b/version.texi index 566c8d36b..796c36905 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set UPDATED 1 March 1996 +@set UPDATED 2 March 1996 @set EDITION 0.31 @set VERSION 0.31