add a rule for creating makefiles as <dir>/CabalMakefile
authorSimon Marlow <simonmar@microsoft.com>
Thu, 24 May 2007 13:54:56 +0000 (13:54 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Thu, 24 May 2007 13:54:56 +0000 (13:54 +0000)
Not done by default yet, but useful when hacking on libraries.

libraries/Makefile

index a76739e..5311d55 100644 (file)
@@ -200,6 +200,13 @@ build.library.%: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
                                        $(addprefix --ghc-option=,$(GhcLibHcOpts))
        ifBuildable/ifBuildable $* setup/Setup register --inplace
 
+$(foreach SUBDIR,$(SUBDIRS),$(SUBDIR)/CabalMakefile):\
+%/CabalMakefile: stamp/configure.library.build$(CONFIGURE_STAMP_EXTRAS).% \
+                 %/setup/Setup ifBuildable/ifBuildable
+       $(RM) $*/CabalMakefile
+       ifBuildable/ifBuildable $* setup/Setup makefile -f CabalMakefile \
+                                    $(addprefix --ghc-option=,$(GhcLibHcOpts))
+
 .PHONY: doc
 
 DOC_SUBDIRS = $(filter-out haskell98,$(SUBDIRS))