summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-06-25 07:46:07 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-06-27 08:06:39 -0400
commitb43d140b3f79e024489bbd9338d81d2ac23fc437 (patch)
treee590a02b618800527ff5544d3d51174d496048c0
parent995ea44d929d6141bb1a83912f45e9802faffb33 (diff)
downloadhaskell-b43d140b3f79e024489bbd9338d81d2ac23fc437.tar.gz
`.hs-boot` make rules: add missing order-only dependency on target directory
Noticed missing target directory dependency as a build failure in `make --shuffle` mode (added in https://savannah.gnu.org/bugs/index.php?62100): "cp" libraries/base/./GHC/Stack/CCS.hs-boot libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot cp: cannot create regular file 'libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot': No such file or directory libraries/haskeline/ghc.mk:4: libraries/haskeline/dist-install/build/.depend-v-p-dyn.haskell: No such file or directory make[1]: *** [libraries/base/ghc.mk:4: libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot] Error 1 shuffle=1656129254 make: *** [Makefile:128: all] Error 2 shuffle=1656129254 Note that `cp` complains about inability to create target file. The change adds order-only dependency on a target directory (similar to the rest of rules in that file). The bug is lurking there since 2009 commit 34cc75e1a (`GHC new build system megapatch`.) where upfront directory creation was never added to `.hs-boot` files.
-rw-r--r--rules/hs-suffix-rules-srcdir.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/rules/hs-suffix-rules-srcdir.mk b/rules/hs-suffix-rules-srcdir.mk
index d7143053ee..1798bfb0b1 100644
--- a/rules/hs-suffix-rules-srcdir.mk
+++ b/rules/hs-suffix-rules-srcdir.mk
@@ -38,10 +38,10 @@ $1/$2/build/%_hsc.c $1/$2/build/%_hsc.h $1/$2/build/%.hs : $1/$3/%.hsc $$$$(hsc2
# Now the rules for hs-boot files.
-$1/$2/build/%.hs-boot : $1/$3/%.hs-boot
+$1/$2/build/%.hs-boot : $1/$3/%.hs-boot | $$$$(dir $$$$@)/.
"$$(CP)" $$< $$@
-$1/$2/build/%.lhs-boot : $1/$3/%.lhs-boot
+$1/$2/build/%.lhs-boot : $1/$3/%.lhs-boot | $$$$(dir $$$$@)/.
"$$(CP)" $$< $$@
endif