summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 13 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 790d08f421..5cdae9469a 100644
--- a/Makefile
+++ b/Makefile
@@ -91,10 +91,12 @@ echo-headers: subdir_echo-headers
# What to install.
install-others = $(inst_includedir)/gnu/stubs.h
+install-bin = glibcbug
+
ifeq (yes,$(build-shared))
-install-others += $(inst_includedir)/gnu/lib-names.h
+before-compile += $(objpfx)lib-names.h
+install_others += $(inst_includedir)/gnu/lib-names.h
endif
-install-bin = glibcbug
ifeq (yes,$(gnu-ld))
libc-init = set-init
@@ -194,8 +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: $(common-objpfx)soversions.mk
- @rm -f $(objpfx)lib-names.h
+$(inst_includedir)/gnu/lib-names.h: $(objpfx)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
+ @rm -f $@
(echo '/* This file is automatically generated.';\
echo ' It defines macros to allow user program to find the shared';\
echo ' library files which come as part of GNU libc. */';\
@@ -209,11 +216,8 @@ $(inst_includedir)/gnu/lib-names.h: $(common-objpfx)soversions.mk
echo "#define $${upname}_SO \"$$l\""; \
done;) | sort; \
echo; \
- echo '#endif /* gnu/lib-names.h */';) > $(objpfx)lib-names.h
- if test -r $@ && cmp -s $(objpfx)lib-names.h $@; \
- then echo 'gnu/lib-names.h unchanged'; \
- else $(INSTALL_DATA) $(objpfx)lib-names.h $@; fi
- rm -f $(objpfx)lib-names.h
+ echo '#endif /* gnu/lib-names.h */';) > $@
+generated += lib-names.h
endif
# The `glibcbug' script contains the version number and it shall be rebuild