about summary refs log tree commit diff
path: root/manual/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'manual/Makefile')
-rw-r--r--manual/Makefile13
1 files changed, 11 insertions, 2 deletions
diff --git a/manual/Makefile b/manual/Makefile
index a6cd048d6e..c0a5782ea7 100644
--- a/manual/Makefile
+++ b/manual/Makefile
@@ -165,8 +165,17 @@ $(glibc-targets):
 # changed the library.
 lib: $(foreach o,$(object-suffixes),$(objpfx)stamp$o-$(subdir))
 stubs: $(common-objpfx)stub-manual
-$(common-objpfx)stub-manual ../po/manual.pot:; cp /dev/null $@
-$(objpfx)stamp%-$(subdir):; cp /dev/null $@
+$(common-objpfx)stub-manual ../po/manual.pot $(objpfx)stamp%-$(subdir):
+	$(make-target-directory)
+	cp /dev/null $@
+
+
+# Make the target directory if it doesn't exist, using the `mkinstalldirs'
+# script that does `mkdir -p' even if `mkdir' doesn't support that flag.
+define make-target-directory
+$(addprefix $(..)./mkinstalldirs ,\
+	    $(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
+endef
 
 # The top-level glibc Makefile expects subdir_install to update the stubs file.
 subdir_install: stubs