summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2019-03-07 14:01:50 +0800
committerMoritz Angermann <moritz.angermann@gmail.com>2019-03-13 14:48:13 +0800
commit8af42d0d2581ca480cae3e65b33a07659a3b991b (patch)
tree420a7c900f5eff29cb634a067f4812640df7f4b8
parent195d09a2793a46d05b5cc6c1c1246014f030737a (diff)
downloadhaskell-8af42d0d2581ca480cae3e65b33a07659a3b991b.tar.gz
don't regen ghc.mk if it already exists
-rwxr-xr-xboot5
1 files changed, 3 insertions, 2 deletions
diff --git a/boot b/boot
index d57dcc846b..62fb4929b5 100755
--- a/boot
+++ b/boot
@@ -113,12 +113,13 @@ def boot_pkgs():
elif len(cabals) == 1:
cabal = cabals[0]
- if os.path.isfile(cabal):
+ ghc_mk = os.path.join(package, 'ghc.mk')
+
+ if os.path.isfile(cabal) and not os.path.isfile(ghc_mk):
# strip both .cabal and .in
pkg = os.path.splitext(os.path.splitext(os.path.basename(cabal))[0])[0]
top = os.path.join(*['..'] * len(os.path.normpath(package).split(os.path.sep)))
- ghc_mk = os.path.join(package, 'ghc.mk')
print('Creating %s' % ghc_mk)
with open(ghc_mk, 'w') as f:
f.write(dedent(