diff options
-rw-r--r-- | test/Rules.mak | 1 | ||||
-rw-r--r-- | test/unistd/Makefile.in | 7 | ||||
-rw-r--r-- | utils/Makefile.in | 7 | ||||
-rw-r--r-- | utils/getconf.c (renamed from test/unistd/getconf.c) | 0 |
4 files changed, 12 insertions, 3 deletions
diff --git a/test/Rules.mak b/test/Rules.mak index a386390b0..a84a7db2b 100644 --- a/test/Rules.mak +++ b/test/Rules.mak @@ -44,6 +44,7 @@ endif export TARGET_ARCH RM_R = $(Q)$(RM) -r +LN_S = $(Q)$(LN) -fs ifneq ($(KERNEL_HEADERS),) ifeq ($(patsubst /%,/,$(KERNEL_HEADERS)),/) diff --git a/test/unistd/Makefile.in b/test/unistd/Makefile.in index ae0eeb499..8ddfc52da 100644 --- a/test/unistd/Makefile.in +++ b/test/unistd/Makefile.in @@ -10,6 +10,11 @@ else OPTS_tstgetopt := -a -b -cfoobar --required foobar --optional=bazbug --none --colou --color --colour random endif -TESTS_DISABLED+=getconf +# getconf.c lives in utils/ +# Testsuite cannot currently be built with O= anyway, so hardcode path here +getconf.c: + $(LN_S) ../../utils/$(@F) . +EXTRA_CLEAN += getconf.c +TESTS_DISABLED += getconf CFLAGS_getconf = -DGETCONF_DIR='"$(CURDIR)"' shell_tst-getconf: getconf getconf_glibc diff --git a/utils/Makefile.in b/utils/Makefile.in index 2aae1df71..89cb800e9 100644 --- a/utils/Makefile.in +++ b/utils/Makefile.in @@ -40,7 +40,8 @@ CFLAGS-iconv := $(CFLAGS-utils) \ -DL_iconv_main \ CFLAGS-locale := $(CFLAGS-utils) - +CFLAGS-getconf :=$(CFLAGS-utils) \ + -DGETCONF_DIR='"$(CURDIR)"' # "make hostutils" flags @@ -76,6 +77,7 @@ utils_OUT := $(top_builddir)utils DEPS-ldconfig := $(utils_DIR)/chroot_realpath.c DEPS-ldconfig.host := $(DEPS-ldconfig) +utils_OBJ := getconf ifeq ($(HAVE_SHARED),y) utils_OBJ += ldconfig ldd endif @@ -115,6 +117,7 @@ install-y += utils_install # This installs both utils and hostutils, so doesn't depend on either. utils_install: $(addsuffix $(DOTHOST), $(utils_OBJ) $(utils_LOCALE_OBJ)) + $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/getconf$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)usr/bin/getconf ifeq ($(HAVE_SHARED),y) $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldd$(DOTHOST) $(PREFIX)$(DEVEL_PREFIX)bin/ldd $(Q)$(INSTALL) -D -m 755 $(utils_OUT)/ldconfig$(DOTHOST) $(PREFIX)$(RUNTIME_PREFIX)sbin/ldconfig @@ -128,6 +131,6 @@ endif objclean-y += CLEAN_utils CLEAN_utils: - $(do_rm) $(addprefix $(utils_OUT)/, ldconfig ldd iconv locale *.host) + $(do_rm) $(addprefix $(utils_OUT)/, getconf iconv ldconfig ldd locale *.host) $(Q)# This is a hack.. $(Q)$(RM) $(utils_OUT)/.*.dep diff --git a/test/unistd/getconf.c b/utils/getconf.c index 81566df7b..81566df7b 100644 --- a/test/unistd/getconf.c +++ b/utils/getconf.c |