+# We use -main-is so that GHC doesn't get confused and think
+# Main.hi/Main.o from cabal belongs to ghc-prim/Setup, or vice-versa.
+cabal-bin: cabal-bin.hs
+ $(GHC) $(BOOTSTRAPPING_FLAGS) --make cabal-bin -o cabal-bin -main-is Cabal
+
+# ghc-prim/Setup doesn't really depend on cabal-bin, but pretending that it
+# does sequentialises building the two of them, which is nice given
+# they're sharing -odir and -hidir.
+ghc-prim/Setup: ghc-prim/Setup.hs cabal-bin
+ cd ghc-prim && $(GHC) $(BOOTSTRAPPING_FLAGS) --make Setup -o Setup
+
+installPackage/installPackage: installPackage.hs