]> git.draconx.ca Git - dxcommon.git/commit
fix-gnulib.pl: Convert rules to dirstamp prerequisites.
authorNick Bowler <nbowler@draconx.ca>
Wed, 6 Dec 2023 04:00:42 +0000 (23:00 -0500)
committerNick Bowler <nbowler@draconx.ca>
Wed, 6 Dec 2023 04:00:42 +0000 (23:00 -0500)
commit8c45dd9fec485578a09dbf541d4209dcf77acd5f
treee3e1e8fe02cab565455bd45ac2bb82c1a6ad3138
parent22a05c201cd829bead27a94b779fe76190103da1
fix-gnulib.pl: Convert rules to dirstamp prerequisites.

ULTRIX 4.5 make fails during rule lookup when it tries to build a
target in a nonexistent directory that might have inference rules
associated with it (i.e., ends with a defined suffix), for example:

  % echo 'nonexistent/baz.o: ;' | make -f -
  Directory nonexistent/: Make: Cannot open.  Stop.

We can work around this problem by using a prerequisite to create
the output directory instead of creating it directly in the rule.
Automake itself actually does this already using dirstamps, so
let's try to patch things to use the same mechanism.  As a bonus,
this should reduce the number of mkdir invocations.

This breaks some of the relevant tests which are looking for specific
output.  Drop the %reldir% test completely as it appears every usage
in gnulib is for this exact scenario, and patch the subdirectory test
to expect the new output.
scripts/fix-gnulib.pl
tests/scripts.at