about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 5cdae9469a..61cf6904f6 100644
--- a/Makefile
+++ b/Makefile
@@ -94,7 +94,7 @@ install-others = $(inst_includedir)/gnu/stubs.h
 install-bin = glibcbug
 
 ifeq (yes,$(build-shared))
-before-compile += $(objpfx)lib-names.h
+before-compile += $(objpfx)gnu/lib-names.h
 install_others += $(inst_includedir)/gnu/lib-names.h
 endif
 
@@ -196,12 +196,13 @@ ifeq (yes,$(build-shared))
 
 # Like gnu/stubs.h the gnu/lib-names.h header is not used while building the
 # libc itself.  So we generate it while installing.
-$(inst_includedir)/gnu/lib-names.h: $(objpfx)lib-names.h
+$(inst_includedir)/gnu/lib-names.h: $(objpfx)gnu/lib-names.h
 	if test -r $@ && cmp -s $< $@; \
 	then echo 'gnu/lib-names.h unchanged'; \
 	else $(INSTALL_DATA) $< $@; fi
 
-$(objpfx)lib-names.h: $(common-objpfx)soversions.mk
+$(objpfx)gnu/lib-names.h: $(common-objpfx)soversions.mk
+	$(make-target-directory)
 	@rm -f $@
 	(echo '/* This file is automatically generated.';\
 	 echo '   It defines macros to allow user program to find the shared';\
@@ -217,7 +218,7 @@ $(objpfx)lib-names.h: $(common-objpfx)soversions.mk
 	  done;) | sort; \
 	 echo; \
 	 echo '#endif	/* gnu/lib-names.h */';) > $@
-generated += lib-names.h
+generated += gnu/lib-names.h
 endif
 
 # The `glibcbug' script contains the version number and it shall be rebuild