diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2019-03-07 14:01:50 +0800 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2019-03-13 14:48:13 +0800 |
commit | 8af42d0d2581ca480cae3e65b33a07659a3b991b (patch) | |
tree | 420a7c900f5eff29cb634a067f4812640df7f4b8 | |
parent | 195d09a2793a46d05b5cc6c1c1246014f030737a (diff) | |
download | haskell-8af42d0d2581ca480cae3e65b33a07659a3b991b.tar.gz |
don't regen ghc.mk if it already exists
-rwxr-xr-x | boot | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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( |