summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1993-10-18 09:53:49 +0000
committerRoland McGrath <roland@gnu.org>1993-10-18 09:53:49 +0000
commitf5b858978fc9d2eb76431dcdce03dfc7abc9dd5c (patch)
tree122d714fc6df646b5830e1f283de1a3b13d14f71 /Makerules
parent5f4c213fb649d8d78553a20671529f7478430049 (diff)
Formerly Makerules.~96~
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules18
1 files changed, 16 insertions, 2 deletions
diff --git a/Makerules b/Makerules
index e79d658b7d..4bfcb0220e 100644
--- a/Makerules
+++ b/Makerules
@@ -99,6 +99,16 @@ $(+sysdir_pfx)sysd-Makefile: $(+sysdir_pfx)config.make $(..)Makerules
done) > $@T
mv $@T $@
+# Reorder before-compile so that mach things come first, and hurd things
+# second, before all else. The mach and hurd subdirectories have many
+# generated header files which the much of rest of the library depends on,
+# so it is best to build them first (and mach before hurd, at that).
+before-compile := $(filter $(common-objpfx)mach% $(common-objpfx)hurd%,\
+ $(before-compile))
+ $(filter-out $(common-objpfx)mach% $(common-objpfx)hurd%,\
+ $(before-compile))
+
+
# Remove existing files from `before-compile'. Things are added there when
# they must exist for dependency generation to work right, but once they
# exist there is no further need for every single file to depend on them,
@@ -307,9 +317,13 @@ $(make-target-directory)
$(INSTALL_DATA) $< $@
endef
-# Make the target directory if it doesn't exist.
+# Make the target directory if it doesn't exist. Because of make's
+# directory cache, this will produce the `mkdir' command when the directory
+# already exists, if it didn't exist at the start of the `make' run. The
+# `-' prefix ignores errors from mkdir, so there will just be some
+# gratuitous but harmless `File exists' messages.
define make-target-directory
-$(patsubst %/,-mkdir %,$(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
+$(addprefix -mkdir ,$(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
endef