Browse Source

getconf: move to utils/

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 14 years ago
parent
commit
e1b4229b5a
4 changed files with 12 additions and 3 deletions
  1. 1 0
      test/Rules.mak
  2. 6 1
      test/unistd/Makefile.in
  3. 5 2
      utils/Makefile.in
  4. 0 0
      utils/getconf.c

+ 1 - 0
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)),/)

+ 6 - 1
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

+ 5 - 2
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

+ 0 - 0
test/unistd/getconf.c → utils/getconf.c