From 7602220aa0afa798e19054368e27f74055fb666d Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 10 Apr 1999 04:08:38 +0000 Subject: [PATCH] * automake.in (handle_source_transform): Add a pfx to used_pfx only if it's conditional or non-empty, to reduce the number of empty variables. Emit _OBJECS variable based on program name if no SOURCES were explicitly specified. --- ChangeLog | 5 +++++ Makefile.in | 3 ++- automake.in | 19 +++++++++++++++---- m4/Makefile.in | 3 ++- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index bfbc408a..d81a8310 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 1999-04-10 Alexandre Oliva + * automake.in (handle_source_transform): Add a pfx to used_pfx + only if it's conditional or non-empty, to reduce the number of + empty variables. Emit _OBJECS variable based on program name if + no SOURCES were explicitly specified. + * remake-hdr.am: Create the stamp file before the header file, and just rename it after, so that the timestamps will be correct. Reported by Marc Horowitz diff --git a/Makefile.in b/Makefile.in index 4dda13ad..f48afe58 100644 --- a/Makefile.in +++ b/Makefile.in @@ -100,6 +100,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = automake aclocal SCRIPTS = $(bin_SCRIPTS) +DIST_SOURCES = TEXI2DVI = texi2dvi INFO_DEPS = automake.info DVIS = automake.dvi @@ -114,7 +115,7 @@ mdate-sh missing mkinstalldirs stamp-vti texinfo.tex version.texi \ ylwrap -DISTFILES = $(DIST_COMMON) $(SOURCES) $(TEXINFOS) $(EXTRA_DIST) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) GZIP_ENV = --best all: all-redirect diff --git a/automake.in b/automake.in index e311c335..69f65b3f 100755 --- a/automake.in +++ b/automake.in @@ -1212,10 +1212,6 @@ sub handle_source_transform local ($var) = $prefix . $one_file . "_SOURCES"; if (&variable_defined ($var)) { - # Keep track of which prefixes we saw. - $used_pfx{$xpfx} = 1 - unless $prefix =~ /EXTRA_/; - push (@sources, '$(' . $prefix . $one_file . "_SOURCES)"); push (@objects, '$(' . $xpfx . $one_file . "_OBJECTS)") unless $prefix =~ /EXTRA_/; @@ -1242,10 +1238,21 @@ sub handle_source_transform unless $prefix =~ /EXTRA_/; } + # Keep track of which prefixes we saw. + $used_pfx{$xpfx} = 1 + unless $prefix =~ /EXTRA_/; + next; } } + # Avoid defining needless variables. + next if (scalar @files == 0); + + # Keep track of which prefixes we saw. + $used_pfx{$xpfx} = 1 + unless $prefix =~ /EXTRA_/; + ($temp, @result) = &handle_single_transform_list ($obj, @files); $linker = $temp if $linker eq ''; &define_pretty_variable ($xpfx . $one_file . "_OBJECTS", '', @result) @@ -1260,6 +1267,10 @@ sub handle_source_transform push (@dist_sources, $unxformed . '.c'); push (@objects, $unxformed . $obj); push (@files, $unxformed . '.c'); + + ($temp, @result) = &handle_single_transform_list ($obj, @files); + $linker = $temp if $linker eq ''; + &define_pretty_variable ($one_file . "_OBJECTS", '', @result) } else { diff --git a/m4/Makefile.in b/m4/Makefile.in index 6451e21c..437ba4f9 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -78,12 +78,13 @@ termios.m4 winsz.m4 EXTRA_DIST = $(m4data_DATA) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = +DIST_SOURCES = DATA = $(m4data_DATA) DIST_COMMON = $(m4data_DATA) Makefile.am Makefile.in -DISTFILES = $(DIST_COMMON) $(SOURCES) $(TEXINFOS) $(EXTRA_DIST) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) GZIP_ENV = --best all: all-redirect -- 2.43.5