aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2007-08-02 09:59:18 +0000
committerRoland McGrath <roland@gnu.org>2007-08-02 09:59:18 +0000
commitdb502a60bc0dbc8ebb6f5269117ca6aa3b67a0f0 (patch)
tree5c3eff95b9cafd898bb7904fb139f024ce0e6b8a /posix
parent0abf17decfe2109955f8c35392770ea708cf5962 (diff)
downloadglibc-db502a60bc0dbc8ebb6f5269117ca6aa3b67a0f0.zip
glibc-db502a60bc0dbc8ebb6f5269117ca6aa3b67a0f0.tar.gz
glibc-db502a60bc0dbc8ebb6f5269117ca6aa3b67a0f0.tar.bz2
2007-08-02 Roland McGrath <roland@redhat.com>
* posix/Makefile ($(inst_libexecdir)/getconf): Make hard links to $(inst_bindir)/getconf if possible. * posix/Makefile ($(objpfx)getconf.speclist): New target. (generated): Add it. ($(inst_libexecdir)/getconf): Use it.
Diffstat (limited to 'posix')
-rw-r--r--posix/Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/posix/Makefile b/posix/Makefile
index 1a1d2bc..bef2665 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -110,7 +110,7 @@ generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
tst-rxspencer-mem tst-rxspencer.mtrace tst-getconf.out \
tst-pcre-mem tst-pcre.mtrace tst-boost-mem tst-boost.mtrace \
bug-ga2.mtrace bug-ga2-mem bug-glob2.mtrace bug-glob2-mem \
- tst-vfork3-mem tst-vfork3.mtrace
+ tst-vfork3-mem tst-vfork3.mtrace getconf.speclist
include ../Rules
@@ -291,12 +291,16 @@ bug-glob2-ENV = MALLOC_TRACE=$(objpfx)bug-glob2.mtrace
$(objpfx)bug-glob2-mem: $(objpfx)bug-glob2.out
$(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@
-$(inst_libexecdir)/getconf: $(objpfx)getconf FORCE
+$(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
+ $(objpfx)getconf.speclist FORCE
$(addprefix $(..)./scripts/mkinstalldirs ,\
$(filter-out $(wildcard $@),$@))
- for spec in `LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< \
- _POSIX_V6_WIDTH_RESTRICTED_ENVS`; do \
- $(INSTALL_PROGRAM) $< $@/$$spec.new; \
- mv -f $@/$$spec.new $@/$$spec; \
- done
+ while read spec; do \
+ ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
+ mv -f $@/$$spec.new $@/$$spec; \
+ done < $(objpfx)getconf.speclist
+
+$(objpfx)getconf.speclist: $(objpfx)getconf
+ LC_ALL=C GETCONF_DIR=/dev/null \
+ $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS > $@.new
+ mv -f $@.new