mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
build: fix support for --disable-dependency-tracking
Reported by Juan Manuel Guerrero. https://lists.gnu.org/archive/html/bug-bison/2014-07/msg00000.html. * examples/local.mk (%D%/extracted.stamp): Make sure the output directory exists. * examples/extexi (process): Likewise.
This commit is contained in:
@@ -47,6 +47,9 @@
|
|||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
|
use File::Basename qw(dirname);
|
||||||
|
use File::Path qw(make_path);
|
||||||
|
|
||||||
# Whether we generate synclines.
|
# Whether we generate synclines.
|
||||||
my $synclines = 0;
|
my $synclines = 0;
|
||||||
|
|
||||||
@@ -92,7 +95,9 @@ sub file_wanted ($)
|
|||||||
undef
|
undef
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# process ($in)
|
||||||
|
# -------------
|
||||||
|
# Read input file $in, and generate the outputs.
|
||||||
sub process ($)
|
sub process ($)
|
||||||
{
|
{
|
||||||
my ($in) = @_;
|
my ($in) = @_;
|
||||||
@@ -152,7 +157,7 @@ sub process ($)
|
|||||||
# Output the files.
|
# Output the files.
|
||||||
for my $file (keys %file)
|
for my $file (keys %file)
|
||||||
{
|
{
|
||||||
# No spurious end of line: use printf.
|
make_path (dirname ($file));
|
||||||
my $o = new IO::File(">$file")
|
my $o = new IO::File(">$file")
|
||||||
or die "$file: cannot create: $?";
|
or die "$file: cannot create: $?";
|
||||||
print $o $file{$file}{$_}
|
print $o $file{$file}{$_}
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ extracted =
|
|||||||
CLEANFILES += $(extracted) %D%/extracted.stamp
|
CLEANFILES += $(extracted) %D%/extracted.stamp
|
||||||
%D%/extracted.stamp: $(doc) $(extexi)
|
%D%/extracted.stamp: $(doc) $(extexi)
|
||||||
$(AM_V_GEN)rm -f $@ $@.tmp
|
$(AM_V_GEN)rm -f $@ $@.tmp
|
||||||
|
$(AM_V_at)$(MKDIR_P) %D%
|
||||||
$(AM_V_at)touch $@.tmp
|
$(AM_V_at)touch $@.tmp
|
||||||
$(AM_V_at)$(extract) $(extracted)
|
$(AM_V_at)$(extract) $(extracted)
|
||||||
$(AM_V_at)mv $@.tmp $@
|
$(AM_V_at)mv $@.tmp $@
|
||||||
|
|||||||
Reference in New Issue
Block a user