summaryrefslogtreecommitdiff
path: root/posix/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'posix/Makefile')
-rw-r--r--posix/Makefile15
1 files changed, 4 insertions, 11 deletions
diff --git a/posix/Makefile b/posix/Makefile
index 643d7e5374..bb2b054249 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -305,15 +305,8 @@ $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
mv -f $@/$$spec.new $@/$$spec; \
done < $(objpfx)getconf.speclist
-$(objpfx)getconf.speclist: $(objpfx)getconf
-ifeq (no,$(cross-compiling))
- LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< _POSIX_V7_WIDTH_RESTRICTED_ENVS > $@.new
- LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< _POSIX_V6_WIDTH_RESTRICTED_ENVS >> $@.new
- LC_ALL=C GETCONF_DIR=/dev/null \
- $(run-program-prefix) $< _XBS5_WIDTH_RESTRICTED_ENVS >> $@.new
-else
- > $@.new
-endif
+$(objpfx)getconf.speclist: getconf.speclist.h
+ $(CC) -E $(CFLAGS) $(CPPFLAGS) $< \
+ | sed -n -e '/START_OF_STRINGS/,$${/\(POSIX_V[67]\|_XBS5\)_/{s/^[^"]*"//;s/".*$$//;p}}' \
+ > $@.new
mv -f $@.new $@