summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-02-20 18:30:49 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-02-20 21:56:23 -0500
commit3cea67955a5ae7d3de7aa9dcfdabaf6ee3681ffc (patch)
treea3858bfd4dfee42f0d9ad02d6272c36c9a0863e0
parent33fa8d9433d82b03f3209698bf27420a32302321 (diff)
downloadhaskell-3cea67955a5ae7d3de7aa9dcfdabaf6ee3681ffc.tar.gz
Make: fix sdist target (#17848)
-rw-r--r--ghc.mk4
-rw-r--r--rules/sdist-ghc-file.mk2
2 files changed, 3 insertions, 3 deletions
diff --git a/ghc.mk b/ghc.mk
index 717c9e8016..53731ae64f 100644
--- a/ghc.mk
+++ b/ghc.mk
@@ -1217,8 +1217,8 @@ sdist-ghc-prep-tree :
# Add files generated by alex and happy.
# These rules depend on sdist-ghc-prep-tree.
-$(eval $(call sdist-ghc-file,compiler,stage2,GHC,Cmm,Lexer,x))
-$(eval $(call sdist-ghc-file,compiler,stage2,GHC,Cmm,Parser,y))
+$(eval $(call sdist-ghc-file,compiler,stage2,.,GHC/Cmm/Lexer,x))
+$(eval $(call sdist-ghc-file,compiler,stage2,.,GHC/Cmm/Parser,y))
$(eval $(call sdist-ghc-file,compiler,stage2,parser,Lexer,x))
$(eval $(call sdist-ghc-file,compiler,stage2,parser,Parser,y))
$(eval $(call sdist-ghc-file,utils/hpc,dist-install,,HpcParser,y))
diff --git a/rules/sdist-ghc-file.mk b/rules/sdist-ghc-file.mk
index 99264488c4..81e1c5c105 100644
--- a/rules/sdist-ghc-file.mk
+++ b/rules/sdist-ghc-file.mk
@@ -37,7 +37,7 @@ sdist_$1_$2_$4 : sdist-ghc-prep-tree
# Generate the .hs files if they don't exist yet, then do actual copying and
# moving.
sdist_$1_$2_$4 : $1/$2/build/$4.hs
- "$(CP)" $1/$2/build/$4.hs $(SRC_DIST_GHC_DIR)/$1/$3
+ "$(CP)" $1/$2/build/$4.hs $(SRC_DIST_GHC_DIR)/$1/$3/$$(dir $4)
mv $(SRC_DIST_GHC_DIR)/$1/$3/$4.$5 $(SRC_DIST_GHC_DIR)/$1/$3/$4.$5.source
# And make sure the rules for generating the .hs files exist, even when we