Thu Jan 18 00:25:56 1996 Tom Tromey <tromey@creche.cygnus.com>
+ From François Pinard:
+ * automake.in (handle_source_transform): Transform $o file into .P
+ file.
+ (handle_dist_worker): Handle case where DISTFILES includes
+ wildcard. Bug fix in subdir case.
+
* automake.in (parse_arguments): Initialize strictness to
'normal'.
sub handle_source_transform
{
local ($one_file, $obj) = @_;
+ local ($objpat) = $obj;
+ $objpat =~ s/([.\$])/\\\1/g;
# Look for file_SOURCES and file_OBJECTS.
if (defined $contents{$one_file . "_SOURCES"})
s/\.[cCmylfs]$/$obj/g;
push (@result, $_);
- # Transform .o file into .P file (for automatic
+ # Transform .o or $o file into .P file (for automatic
# dependency code).
- s/$obj/.P/g;
+ s/$objpat$/.P/g;
$dep_files{$_} = 1;
}
# Also, there are situations in which "ln" can fail. For instance
# a file to distribute could actually be a cross-filesystem
# symlink -- this can easily happen if "gettextize" was run on the
- # distribution.
- $output_rules .= ' @for file in $(DISTFILES); do \\
+ # distribution. Note that DISTFILES can contain a wildcard (for
+ # info files, sigh), so we must use the echo trick.
+
+ $output_rules .= ' @for file in `cd $(srcdir) && $(DISTFILES); do \\
test -f $(distdir)/$$file \\
|| ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \\
|| cp -p $(srcdir)/$$file $(distdir)/$$file; \\
else
{
$output_rules .= ("\nsubdir = " . $relative_dir . "\n"
- . 'distdir = $(PACKAGE)-$(VERSION)/$(subdir)'
+ . 'distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)'
. "\n");
}