From: roland Date: Mon, 18 Oct 1993 09:53:49 +0000 (+0000) Subject: Formerly Makerules.~96~ X-Git-Tag: jems-14oct94~2564 X-Git-Url: http://git.csclub.uwaterloo.ca/?p=kopensolaris-gnu%2Fglibc.git;a=commitdiff_plain;h=a7554b080973c55c0cd36deadd3d0cd021a8a93e Formerly Makerules.~96~ --- 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