X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rules%2Fbuild-perl.mk;h=982a2b699df39b8b1999f908b3d2091e24e4ed9b;hb=fae43d78c5f7fdcdd236e187d07d140b9ad4e07c;hp=48694e460ee5c7d7d49086a95c0bbe000be3f4d7;hpb=34cc75e1a62638f2833815746ebce0a9114dc26b;p=ghc-hetmet.git diff --git a/rules/build-perl.mk b/rules/build-perl.mk index 48694e4..982a2b6 100644 --- a/rules/build-perl.mk +++ b/rules/build-perl.mk @@ -1,3 +1,15 @@ +# ----------------------------------------------------------------------------- +# +# (c) 2009 The University of Glasgow +# +# This file is part of the GHC build system. +# +# To understand how the build system works and how to modify it, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture +# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# +# ----------------------------------------------------------------------------- + # Build a perl script. Invoke like this: # @@ -22,24 +34,25 @@ $(call clean-target,$1,$2,$1/$2 $$($1_$2_INPLACE)) .PHONY: clean_$1 clean_$1 : clean_$1_$2 +# INPLACE_BIN etc. might be empty if we're cleaning +ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ifneq "$$(BINDIST)" "YES" $1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$(UNLIT) - $$(MKDIRHIER) $1/$2 - $$(RM) -f $$@ - $$(UNLIT) $$(UNLIT_OPTS) $$< $$@ + "$$(MKDIRHIER)" $1/$2 + "$$(UNLIT)" $$(UNLIT_OPTS) $$< $$@ $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl - $$(RM) -f $$@ + "$$(RM)" $$(RM_OPTS) $$@ echo '#!$$(PERL)' >> $$@ echo '$$$$TARGETPLATFORM = "$$(TARGETPLATFORM)";' >> $$@ cat $$< >> $$@ $$(EXECUTABLE_FILE) $$@ $$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) - $$(MKDIRHIER) $$(dir $$@) - $$(RM) -f $$@ - $$(CP) $$< $$@ + "$$(MKDIRHIER)" $$(dir $$@) + "$$(CP)" $$< $$@ $$(EXECUTABLE_FILE) $$@ endif +endif endef