diff options
author | Ian Lynagh <igloo@earth.li> | 2009-10-02 19:12:18 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2009-10-02 19:12:18 +0000 |
commit | 883d980815437736c486bf69b2f066ef918d2989 (patch) | |
tree | 51590d522003ca6220ff2ee98f29c1c67991fb4c /rules | |
parent | 6a2a21971ae1a29bf296ecc8652f7cb86b71e7bb (diff) | |
download | haskell-883d980815437736c486bf69b2f066ef918d2989.tar.gz |
Use "order only constraints" for directories
There are now 104 calls to mkdirhier, down from 1201, when validating.
Diffstat (limited to 'rules')
-rw-r--r-- | rules/build-dependencies.mk | 3 | ||||
-rw-r--r-- | rules/build-perl.mk | 6 | ||||
-rw-r--r-- | rules/build-prog.mk | 9 | ||||
-rw-r--r-- | rules/c-suffix-rules.mk | 12 | ||||
-rw-r--r-- | rules/cmm-suffix-rules.mk | 18 | ||||
-rw-r--r-- | rules/haddock.mk | 3 | ||||
-rw-r--r-- | rules/hs-suffix-rules-srcdir.mk | 15 |
7 files changed, 22 insertions, 44 deletions
diff --git a/rules/build-dependencies.mk b/rules/build-dependencies.mk index 2ab503f1b6..68d45c82b6 100644 --- a/rules/build-dependencies.mk +++ b/rules/build-dependencies.mk @@ -21,8 +21,7 @@ endif ifneq "$$($1_$2_NO_BUILD_DEPS)" "YES" -$$($1_$2_depfile) : $$(MKDIRHIER) $$(MKDEPENDC) $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC_MK_DEPEND_DEP) $$($1_$2_C_FILES) $$($1_$2_S_FILES) - "$$(MKDIRHIER)" $1/$2/build +$$($1_$2_depfile) : $$(MKDEPENDC) $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC_MK_DEPEND_DEP) $$($1_$2_C_FILES) $$($1_$2_S_FILES) | $$$$(dir $$$$@)/. "$$(RM)" $$(RM_OPTS) $$@.tmp touch $$@.tmp ifneq "$$($1_$2_C_SRCS)$$($1_$2_S_SRCS)" "" diff --git a/rules/build-perl.mk b/rules/build-perl.mk index 86f729fbb1..669f3d7be4 100644 --- a/rules/build-perl.mk +++ b/rules/build-perl.mk @@ -37,8 +37,7 @@ 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 +$1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$(UNLIT) | $$$$(dir $$$$@)/. "$$(UNLIT)" $$(UNLIT_OPTS) $$< $$@ $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl @@ -48,8 +47,7 @@ $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl cat $$< >> $$@ $$(EXECUTABLE_FILE) $$@ -$$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) - "$$(MKDIRHIER)" $$(dir $$@) +$$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) | $$$$(dir $$$$@)/. "$$(CP)" $$< $$@ $$(EXECUTABLE_FILE) $$@ endif diff --git a/rules/build-prog.mk b/rules/build-prog.mk index b975f4956f..0a801afabf 100644 --- a/rules/build-prog.mk +++ b/rules/build-prog.mk @@ -96,12 +96,10 @@ $(call c-objs,$1,$2,v) $(call hs-objs,$1,$2,v) ifeq "$$(BootingFromHc)" "NO" -$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" -o $$@ $$($1_$2_v_ALL_HC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) else -$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/tmp/$$($1_$2_PROG) : $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) | $$$$(dir $$$$@)/. "$$(CC)" -o $$@ $$($1_$2_v_ALL_CC_OPTS) $$(LD_OPTS) $$($1_$2_v_HS_OBJS) $$($1_$2_v_C_OBJS) $$($1_$2_v_S_OBJS) $$($1_$2_OTHER_OBJS) $$($1_$2_v_EXTRA_CC_OPTS) endif @@ -136,8 +134,7 @@ $(call clean-target,$1,$2_inplace,$$($1_$2_INPLACE)) # INPLACE_BIN might be empty if we're distcleaning ifeq "$(findstring clean,$(MAKECMDGOALS))" "" -$$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG) $$(MKDIRHIER) - "$$(MKDIRHIER)" $$(dir $$@) +$$($1_$2_INPLACE) : $1/$2/build/tmp/$$($1_$2_PROG) | $$$$(dir $$$$@)/. "$$(CP)" -p $$< $$@ touch $$@ endif diff --git a/rules/c-suffix-rules.mk b/rules/c-suffix-rules.mk index 5b4cc6e914..cc7c219bb4 100644 --- a/rules/c-suffix-rules.mk +++ b/rules/c-suffix-rules.mk @@ -20,8 +20,7 @@ define c-suffix-rules # UseGhcForCc is only relevant when not booting from HC files. ifeq "$4 $$(BootingFromHc)" "YES NO" -$1/$2/build/%.$$($3_osuf) : $1/%.c $$(MKDIRHIER) $$($1_$2_HC_DEP) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_osuf) : $1/%.c $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c $$($1_$2_HC_DEP) @@ -30,8 +29,7 @@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s $$($1_$2_HC_DEP) "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@ -$1/$2/build/%.$$($3_osuf) : $1/%.S $$(MKDIRHIER) $$($1_$2_HC_DEP) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_osuf) : $1/%.S $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@ $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c $$($1_$2_HC_DEP) @@ -42,8 +40,7 @@ $1/$2/build/%.$$($3_way_)s : $1/%.c $$($1_$2_HC_DEP) else -$1/$2/build/%.$$($3_osuf) : $1/%.c $$(MKDIRHIER) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_osuf) : $1/%.c | $$$$(dir $$$$@)/. "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c @@ -52,8 +49,7 @@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s "$$(AS)" $$($1_$2_$3_ALL_AS_OPTS) -o $$@ $$< -$1/$2/build/%.$$($3_osuf) : $1/%.S $$(MKDIRHIER) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_osuf) : $1/%.S | $$$$(dir $$$$@)/. "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@ $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c diff --git a/rules/cmm-suffix-rules.mk b/rules/cmm-suffix-rules.mk index 0cb1c453c1..b806414a43 100644 --- a/rules/cmm-suffix-rules.mk +++ b/rules/cmm-suffix-rules.mk @@ -22,28 +22,22 @@ ifneq "$$(CLEANING)" "YES" ifneq "$$(BootingFromHc)" "YES" -$1/$2/build/%.$$($3_way_)o : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_way_)o : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -c $$< -o $$@ -$1/$2/build/%.$$($3_way_)o : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_way_)o : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -c $$< -o $$@ -$1/$2/build/%.$$($3_way_)hc : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_way_)hc : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -C $$< -o $$@ -$1/$2/build/%.$$($3_way_)hc : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_way_)hc : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -C $$< -o $$@ -$1/$2/build/%.$$($3_way_)s : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_way_)s : $1/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -S $$< -o $$@ -$1/$2/build/%.$$($3_way_)s : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_way_)s : $1/$2/build/%.cmm $$(rts_H_FILES) $$($1_$2_HC_DEP) | $$$$(dir $$$$@)/. "$$($1_$2_HC)" $$($1_$2_$3_MOST_HC_OPTS) -S $$< -o $$@ endif diff --git a/rules/haddock.mk b/rules/haddock.mk index a6ad82ef3d..5e5b2f25ac 100644 --- a/rules/haddock.mk +++ b/rules/haddock.mk @@ -37,8 +37,7 @@ ifeq "$$(HSCOLOUR_SRCS)" "YES" $1_$2_HADDOCK_FLAGS += --hyperlink-source endif -$$($$($1_PACKAGE)_HADDOCK_FILE) : $$(MKDIRHIER) $$(INPLACE_BIN)/haddock$$(exeext) $$(GHC_CABAL_INPLACE) $$($1_$2_HS_SRCS) $$($$($1_PACKAGE)_HADDOCK_DEPS) - "$$(MKDIRHIER)" $$(dir $$@) +$$($$($1_PACKAGE)_HADDOCK_FILE) : $$(INPLACE_BIN)/haddock$$(exeext) $$(GHC_CABAL_INPLACE) $$($1_$2_HS_SRCS) $$($$($1_PACKAGE)_HADDOCK_DEPS) | $$$$(dir $$$$@)/. "$$(GHC_CABAL_INPLACE)" haddock $2 $1 --with-haddock=$$(TOP)/$$(INPLACE_BIN)/haddock --with-ghc=$$(TOP)/$$(INPLACE_BIN)/ghc-stage2 $$($1_$2_HADDOCK_FLAGS) $$($1_$2_HADDOCK_OPTS) # Make the haddocking depend on the library .a file, to ensure diff --git a/rules/hs-suffix-rules-srcdir.mk b/rules/hs-suffix-rules-srcdir.mk index 1829057318..168a880521 100644 --- a/rules/hs-suffix-rules-srcdir.mk +++ b/rules/hs-suffix-rules-srcdir.mk @@ -18,20 +18,16 @@ define hs-suffix-rules-srcdir ifneq "$$(BootingFromHc)" "YES" -$1/$2/build/%.hs : $1/$4/%.ly $$(MKDIRHIER) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.hs : $1/$4/%.ly | $$$$(dir $$$$@)/. "$$(HAPPY)" $$($1_$2_$3_ALL_HAPPY_OPTS) $$< -o $$@ -$1/$2/build/%.hs : $1/$4/%.y $$(MKDIRHIER) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.hs : $1/$4/%.y | $$$$(dir $$$$@)/. "$$(HAPPY)" $$($1_$2_$3_ALL_HAPPY_OPTS) $$< -o $$@ -$1/$2/build/%.hs : $1/$4/%.x $$(MKDIRHIER) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.hs : $1/$4/%.x | $$$$(dir $$$$@)/. "$$(ALEX)" $$($1_$2_$3_ALL_ALEX_OPTS) $$< -o $$@ -$1/$2/build/%_hsc.c $1/$2/build/%_hsc.h $1/$2/build/%.hs : $1/$4/%.hsc $$(HSC2HS_INPLACE) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%_hsc.c $1/$2/build/%_hsc.h $1/$2/build/%.hs : $1/$4/%.hsc $$(HSC2HS_INPLACE) | $$$$(dir $$$$@)/. "$$(HSC2HS_INPLACE)" $$($1_$2_$3_ALL_HSC2HS_OPTS) $$< -o $$@ # Compiling Haskell source @@ -53,8 +49,7 @@ endif # XXX: for some reason these get used in preference to the direct # .hs->.o rule, I don't know why --SDM -$1/$2/build/%.$$($3_osuf) : $1/$4/%.hc includes/ghcautoconf.h includes/ghcplatform.h $$(MKDIRHIER) - "$$(MKDIRHIER)" $$(dir $$@) +$1/$2/build/%.$$($3_osuf) : $1/$4/%.hc includes/ghcautoconf.h includes/ghcplatform.h | $$$$(dir $$$$@)/. "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -Iincludes -x c -c $$< -o $$@ $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.hc includes/ghcautoconf.h includes/ghcplatform.h |