Index: Makefile.in =================================================================== --- Makefile.in (revision 26020) +++ Makefile.in (working copy) @@ -14,16 +14,21 @@ noconfig_targets := menuconfig config ol defconfig allyesconfig allnoconfig \ release dist tags help -include $(top_builddir)Rules.mak +include $(top_srcdir)Rules.mak sub_headers := headers +ifndef KCONFIG_CONFIG +KCONFIG_CONFIG := $(top_builddir).config +endif +export KCONFIG_CONFIG + ifeq ($(HAVE_DOT_CONFIG),y) all: pregen libs libs: pregen # In this section, we need .config --include .config.cmd +-include $(top_builddir).config.cmd else # ifeq ($(HAVE_DOT_CONFIG),y) @@ -55,16 +60,16 @@ ifeq ($(HAVE_DOT_CONFIG),y) # have uClibc_config.h as prerequisite but since we _symlink_ the headers # and do not (?) want to rely on 'make -L' we better update them right here, # on spot to save us from alot of hazzle. -include/bits/uClibc_config.h: extra/config/conf .config $(top_srcdir)extra/scripts/conf-header.sh | include/bits +$(top_builddir)include/bits/uClibc_config.h: $(top_builddir)extra/config/conf $(KCONFIG_CONFIG) $(top_srcdir)extra/scripts/conf-header.sh | $(top_builddir)include/bits $(top_builddir)include/config @$(disp_gen) $(Q)@$< -s $(top_srcdir)extra/Configs/Config.in - $(Q)$(top_srcdir)extra/scripts/conf-header.sh .config > $@ + $(Q)$(top_srcdir)extra/scripts/conf-header.sh $(KCONFIG_CONFIG) > $@ $(Q)$(MAKE) headers-y # The above doesn't work for threads, though. Just using check-symlinks for now. # XXX: FIXME: this is ugly MAKEFLAGS += -L -include/config/linuxthreads/old.h include/config/linuxthreads/new.h: +$(top_builddir)include/config/linuxthreads/old.h $(top_builddir)include/config/linuxthreads/new.h: @true # For the moment, we have to keep re-running this target @@ -89,17 +94,18 @@ HEADERS_SYS_COMMON := $(notdir $(wildcar HEADERS_SYS_ARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h)) HEADERS_SYS_COMMON := $(filter-out $(HEADERS_SYS_ARCH),$(HEADERS_SYS_COMMON)) -ALL_HEADERS_COMMON := include/fpu_control.h include/dl-osinfo.h \ - include/hp-timing.h -ALL_HEADERS_BITS_COMMON := $(addprefix include/bits/,$(HEADERS_BITS_COMMON)) -ALL_HEADERS_BITS_ARCH := $(addprefix include/bits/,$(HEADERS_BITS_ARCH)) +ALL_HEADERS_COMMON := $(top_builddir)include/fpu_control.h \ + $(top_builddir)include/dl-osinfo.h \ + $(top_builddir)include/hp-timing.h +ALL_HEADERS_BITS_COMMON := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_COMMON)) +ALL_HEADERS_BITS_ARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_ARCH)) ifneq ($(TARGET_SUBARCH),) -ALL_HEADERS_BITS_SUBARCH := $(addprefix include/bits/,$(HEADERS_BITS_SUBARCH)) +ALL_HEADERS_BITS_SUBARCH := $(addprefix $(top_builddir)include/bits/,$(HEADERS_BITS_SUBARCH)) else ALL_HEADERS_BITS_SUBARCH := endif -ALL_HEADERS_SYS_COMMON := $(addprefix include/sys/,$(HEADERS_SYS_COMMON)) -ALL_HEADERS_SYS_ARCH := $(addprefix include/sys/,$(HEADERS_SYS_ARCH)) +ALL_HEADERS_SYS_COMMON := $(addprefix $(top_builddir)include/sys/,$(HEADERS_SYS_COMMON)) +ALL_HEADERS_SYS_ARCH := $(addprefix $(top_builddir)include/sys/,$(HEADERS_SYS_ARCH)) target-headers-sysdep := \ $(ALL_HEADERS_COMMON) \ @@ -109,37 +115,37 @@ target-headers-sysdep := \ $(ALL_HEADERS_SYS_COMMON) \ $(ALL_HEADERS_SYS_ARCH) -include/fpu_control.h: +$(top_builddir)include/fpu_control.h: @$(disp_ln) - $(Q)[ -r libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \ - $(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \ - $(LN) -fs ../libc/sysdeps/linux/common/$(@F) $@ + $(Q)[ -r $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) ] && \ + $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ || \ + $(LN) -fs $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@ -include/dl-osinfo.h include/hp-timing.h: - $(do_ln) ../libc/sysdeps/linux/common/$(@F) $@ +$(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h: + $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/$(@F) $@ $(ALL_HEADERS_BITS_COMMON): - $(do_ln) ../../libc/sysdeps/linux/common/bits/$(@F) $@ + $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/bits/$(@F) $@ $(ALL_HEADERS_BITS_ARCH): - $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@ + $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(@F) $@ ifneq ($(TARGET_SUBARCH),) $(ALL_HEADERS_BITS_SUBARCH): - $(do_ln) ../../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@ + $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$(@F) $@ endif ifneq ($(strip $(ALL_HEADERS_SYS_COMMON)),) $(ALL_HEADERS_SYS_COMMON): - $(do_ln) ../../libc/sysdeps/linux/common/sys/$(@F) $@ + $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/common/sys/$(@F) $@ endif ifneq ($(strip $(ALL_HEADERS_SYS_ARCH)),) $(ALL_HEADERS_SYS_ARCH): - $(do_ln) ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@ + $(do_ln) $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/sys/$(@F) $@ endif -$(target-headers-sysdep): | include/bits +$(target-headers-sysdep): | $(top_builddir)include/bits $(top_builddir)include/sys sysdep_common_headers-clean: $(RM) $(ALL_HEADERS_COMMON) @@ -150,22 +156,24 @@ headers_clean-y += sysdep_common_headers # libc/sysdeps/linux/Makefile.commonarch to headers-y headers-y += $(target-headers-sysdep) -headers: include/bits/uClibc_config.h +headers: $(top_builddir)include/bits/uClibc_config.h + +subdirs: $(addprefix $(top_builddir),$(subdirs)) +PHONY += $(addprefix $(top_builddir),$(subdirs)) -pregen: include/bits/sysnum.h headers +pregen: $(top_builddir)include/bits/sysnum.h headers | subdirs -include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh +$(top_builddir)include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh $(Q)$(INSTALL) -d $(@D) @$(disp_gen) $(Q)set -e; \ - cd $(top_builddir); \ - tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \ - [ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \ - KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir=. CC="$(CC) $(CPU_CFLAGS)" $(SHELL) extra/scripts/gen_bits_syscall_h.sh > $$tmp; \ - if cmp include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \ + tmp=`mktemp $(top_builddir)include/bits/sysnum.h.XXXXXX 2>/dev/null || true`; \ + [ -z "$$tmp" ] && tmp='$(top_builddir)include/bits/sysnum.h.new'; \ + KERNEL_HEADERS="${KERNEL_HEADERS}" top_builddir="$(top_builddir)" CC="$(CC) $(CPU_CFLAGS)" $(SHELL) $< > $$tmp; \ + if cmp $(top_builddir)include/bits/sysnum.h $$tmp >/dev/null 2>&1; then \ $(RM) $$tmp; \ else \ - mv -f $$tmp include/bits/sysnum.h; \ + mv -f $$tmp $(top_builddir)include/bits/sysnum.h; \ fi @# Ugly linux specific hack.. $(Q)if grep -q __NR_ $@; then true; else \ @@ -482,70 +490,70 @@ hostutils: install_hostutils: hostutils $(MAKE) CROSS="$(CROSS)" CC="$(CC)" -C utils utils_install DOTHOST=.host -include/bits include/config: - @$(disp_mkdir) - $(Q)$(INSTALL) -d $@ +$(addprefix $(top_builddir),include/bits include/sys include/config extra/config/lxdialog $(subdirs)): + $(do_mkdir) # configuration # --------------------------------------------------------------------------- -extra/config/conf extra/config/mconf: | include/config - $(Q)$(MAKE) -C extra/config $(notdir $@) +$(top_builddir)extra/config/conf $(top_builddir)extra/config/mconf: | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog + $(Q)$(MAKE) -C extra/config $@ -menuconfig: extra/config/mconf - $(Q)./extra/config/mconf extra/Configs/Config.in +menuconfig: $(top_builddir)extra/config/mconf + $(Q)$(top_builddir)extra/config/mconf extra/Configs/Config.in -config: extra/config/conf - $(Q)./extra/config/conf extra/Configs/Config.in +config: $(top_builddir)extra/config/conf + $(Q)$(top_builddir)extra/config/conf extra/Configs/Config.in -oldconfig: extra/config/conf - $(Q)./extra/config/conf -o extra/Configs/Config.in - -silentoldconfig: extra/config/conf - $(Q)./extra/config/conf -s extra/Configs/Config.in - -randconfig: extra/config/conf - $(Q)./extra/config/conf -r extra/Configs/Config.in - -allyesconfig: extra/config/conf - $(Q)./extra/config/conf -y extra/Configs/Config.in - $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" .config - $(SED) -i -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" .config - $(SED) -i -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" .config - $(SED) -i -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" .config - $(SED) -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config - $(Q)./extra/config/conf -o extra/Configs/Config.in +oldconfig: $(top_builddir)extra/config/conf + $(Q)$(top_builddir)extra/config/conf -o extra/Configs/Config.in + +silentoldconfig: $(top_builddir)extra/config/conf + $(Q)$(top_builddir)extra/config/conf -s extra/Configs/Config.in + +randconfig: $(top_builddir)extra/config/conf + $(Q)$(top_builddir)extra/config/conf -r extra/Configs/Config.in + +allyesconfig: $(top_builddir)extra/config/conf + $(Q)$(top_builddir)extra/config/conf -y extra/Configs/Config.in + $(SED) -i -e "s/^DODEBUG=.*/# DODEBUG is not set/" \ + -e "s/^DOASSERTS=.*/# DOASSERTS is not set/" \ + -e "s/^SUPPORT_LD_DEBUG_EARLY=.*/# SUPPORT_LD_DEBUG_EARLY is not set/" \ + -e "s/^SUPPORT_LD_DEBUG=.*/# SUPPORT_LD_DEBUG is not set/" \ + -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" \ + $(KCONFIG_CONFIG) + $(Q)$(top_builddir)extra/config/conf -o extra/Configs/Config.in -allnoconfig: extra/config/conf - $(Q)./extra/config/conf -n extra/Configs/Config.in +allnoconfig: $(top_builddir)extra/config/conf + $(Q)$(top_builddir)extra/config/conf -n extra/Configs/Config.in -defconfig: extra/config/conf - $(Q)./extra/config/conf -d extra/Configs/Config.in \ +defconfig: $(top_builddir)extra/config/conf + $(Q)$(top_builddir)extra/config/conf -d extra/Configs/Config.in \ -D extra/Configs/defconfigs/$(ARCH) include_clean: - $(Q)$(RM) include/fpu_control.h include/dl-osinfo.h include/hp-timing.h + $(Q)$(RM) $(top_builddir)include/fpu_control.h $(top_builddir)include/dl-osinfo.h $(top_builddir)include/hp-timing.h @set -e; \ for i in `(cd libc/sysdeps/linux/common/sys; ls *.h)` ; do \ - $(RM) include/sys/$$i; \ + $(RM) $(top_builddir)include/sys/$$i; \ done; \ if [ -d libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \ for i in `(cd libc/sysdeps/linux/$(TARGET_ARCH)/sys; ls *.h)` ; do \ - $(RM) include/sys/$$i; \ + $(RM) $(top_builddir)include/sys/$$i; \ done; \ fi clean: include_clean - $(Q)$(RM) -r lib include/bits + $(Q)$(RM) -r $(top_builddir)lib $(top_builddir)include/bits @$(MAKE) -C utils utils_clean +$(MAKE) -s -C test clean - @$(RM) include/linux include/asm* + @$(RM) $(top_builddir)include/linux $(top_builddir)include/asm* $(Q)$(RM) $(top_builddir)extra/scripts/unifdef $(Q)$(RM) -r $(LOCAL_INSTALL_PATH) distclean: clean -find . \( -name core -o -name \*.orig -o -name \*~ -o -name .\*.dep \) -exec $(RM) {} \; - $(RM) .config .config.old .config.cmd - $(RM) extra/locale/*.tgz + $(RM) $(top_builddir).config $(top_builddir).config.old $(top_builddir).config.cmd + $(RM) $(top_builddir)extra/locale/*.tgz $(MAKE) -C extra/config distclean dist release: Index: libnsl/Makefile.in =================================================================== --- libnsl/Makefile.in (revision 26020) +++ libnsl/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libnsl + CFLAGS-libnsl := -DNOT_IN_libc -DIS_IN_libnsl $(SSP_ALL_CFLAGS) LDFLAGS-libnsl.so := $(LDFLAGS) $(call link.asneeded,-lc) Index: libm/Makefile.in =================================================================== --- libm/Makefile.in (revision 26020) +++ libm/Makefile.in (working copy) @@ -20,6 +20,8 @@ # by Erik Andersen # +subdirs += libm + CFLAGS-libm := -DNOT_IN_libc -DIS_IN_libm $(SSP_ALL_CFLAGS) CFLAGS-libm += -D_IEEE_LIBM Index: extra/config/README.uClibc =================================================================== --- extra/config/README.uClibc (revision 26020) +++ extra/config/README.uClibc (working copy) @@ -8,6 +8,8 @@ To update: zcat ../config/kconfig-to-uclibc.patch.gz | patch -p1 cp ../config/README.uClibc . cp ../config/Makefile . + cp -r ../config/.svn . + cp -r ../config/lxdialog/.svn lxdialog/ cd .. rm -rf config mv config.new config Index: extra/config/lxdialog/check-lxdialog.sh =================================================================== --- extra/config/lxdialog/check-lxdialog.sh (revision 26020) +++ extra/config/lxdialog/check-lxdialog.sh (working copy) @@ -52,7 +52,7 @@ EOF } usage() { - printf "Usage: $0 [-check compiler options|-header|-library]\n" + printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n" } if [ $# -eq 0 ]; then Index: extra/config/conf.c =================================================================== --- extra/config/conf.c (revision 26020) +++ extra/config/conf.c (working copy) @@ -11,6 +11,7 @@ #include #include #include +#include #define LKC_DIRECT_LINK #include "lkc.h" @@ -432,6 +433,7 @@ int main(int ac, char **av) { int opt; const char *name; + const char *configname = conf_get_configname(); struct stat tmpstat; setlocale(LC_ALL, ""); @@ -464,9 +466,22 @@ int main(int ac, char **av) input_mode = set_yes; break; case 'r': + { + struct timeval now; + unsigned int seed; + + /* + * Use microseconds derived seed, + * compensate for systems where it may be zero + */ + gettimeofday(&now, NULL); + + seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); + srand(seed); + input_mode = set_random; - srand(time(NULL)); break; + } case 'h': printf(_("See README for usage info\n")); exit(0); @@ -484,7 +499,7 @@ int main(int ac, char **av) conf_parse(name); //zconfdump(stdout); if (sync_kconfig) { - if (stat(".config", &tmpstat)) { + if (stat(configname, &tmpstat)) { fprintf(stderr, _("***\n" "*** You have not yet configured!\n" "*** (missing .config file)\n" Index: extra/config/zconf.l =================================================================== --- extra/config/zconf.l (revision 26020) +++ extra/config/zconf.l (working copy) @@ -314,11 +314,14 @@ void zconf_nextfile(const char *name) current_buf = buf; if (file->flags & FILE_BUSY) { - printf("recursive scan (%s)?\n", name); + printf("%s:%d: do not source '%s' from itself\n", + zconf_curname(), zconf_lineno(), name); exit(1); } if (file->flags & FILE_SCANNED) { - printf("file %s already scanned?\n", name); + printf("%s:%d: file '%s' is already sourced from '%s'\n", + zconf_curname(), zconf_lineno(), name, + file->parent->name); exit(1); } file->flags |= FILE_BUSY; Index: extra/config/kconfig-to-uclibc.patch.gz =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: extra/config/Makefile =================================================================== --- extra/config/Makefile (revision 26020) +++ extra/config/Makefile (working copy) @@ -1,45 +1,72 @@ -obj := . -src := . -top_srcdir=../../ -top_builddir=../../ -srctree := . -include $(top_builddir)Rules.mak +top_srcdir?=../../ +top_builddir?=../../ -include Makefile.kconfig +include $(top_srcdir)Rules.mak +include $(top_srcdir)Makerules + +srctree := $(top_srcdir) +src := extra/config +obj := $(top_builddir)$(src) + +generated:=$(patsubst %_shipped,%,$(wildcard *_shipped)) +generated:=$(addprefix $(obj)/,$(generated:.c=.o)) + +include $(top_srcdir)extra/config/Makefile.kconfig +PHONY+=$(always) +chk-lxdialog:=$(shell pwd)/lxdialog/check-lxdialog.sh +# do not create temporary object in the readonly srctree +$(obj)/dochecklxdialog: + $(Q)cd $(obj) && $(CONFIG_SHELL) $(chk-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) +HOSTCFLAGS_lex.zconf.o := -I$(top_srcdir)$(src) +HOSTCFLAGS_zconf.tab.o := -I$(top_srcdir)$(src) +conf-objs:=$(addprefix $(obj)/,$(conf-objs)) +mconf-objs:=$(addprefix $(obj)/,$(mconf-objs)) +kxgettext-objs:=$(addprefix $(obj)/,$(kxgettext-objs)) ifeq ($(findstring mconf,$(MAKECMDGOALS)),mconf) hostprogs-y += mconf endif --include .depend -.depend: $(wildcard *.h *.c) - $(Q)$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > .depend 2>/dev/null || : +#BUILD_CFLAGS-config = -W -Wall -pedantic +#BUILD_CFLAGS-lxdialog = -W -Wall -pedantic __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) -host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) +host-csingle:= $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) host-cmulti := $(foreach m,$(__hostprogs),\ $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs))) -$(host-csingle): %: %.c - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $@ - -$(host-cmulti): %: $(host-cobjs) $(host-cshlib) - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $($@-objs) $(HOST_LOADLIBES) -o $@ - -$(host-cobjs): %.o: %.c - $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) -c $< -o $@ - -$(obj)/%:: $(src)/%_shipped +$(obj)/conf $(obj)/mconf $(obj)/kxgettext: BUILD_LDFLAGS=$(HOST_LOADLIBES) +$(obj)/conf: $(conf-objs) + $(hcompile.u) +$(obj)/mconf: $(mconf-objs) + $(hcompile.u) +$(obj)/kxgettext: $(kxgettext-objs) + $(hcompile.u) + +$(host-csingle) $(host-cmulti) $(host-cobjs): BUILD_CFLAGS=$(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) + +host-cobjs.nogen:=$(filter-out $(generated),$(host-cobjs)) +host-cobjs.generated:=$(filter $(generated),$(host-cobjs)) + +$(host-cobjs.nogen): $(obj)/%.o: $(top_srcdir)$(src)/%.c + $(hcompile.o) +$(host-cobjs.generated): $(obj)/%.o: $(obj)/%.c + $(hcompile.o) + +ifndef LKC_GENPARSER +$(obj)/%:: $(top_srcdir)$(src)/%_shipped + @$(disp_gen) $(Q)cat $< > $@ - +endif clean: - $(Q)rm -f $(clean-files) conf + $(do_rm) $(clean-files) conf distclean: clean - $(Q)rm -f $(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \ + $(do_rm) $(lxdialog) $(conf-objs) $(mconf-objs) \ + $(kxgettext-objs) \ $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \ .depend - $(Q)rm -r -f $(top_builddir)include/config + $(do_rm) -r $(top_builddir)include/config FORCE: -.PHONY: FORCE clean distclean +.PHONY: FORCE clean distclean $(always) Index: extra/config/zconf.tab.c_shipped =================================================================== --- extra/config/zconf.tab.c_shipped (revision 26020) +++ extra/config/zconf.tab.c_shipped (working copy) @@ -1281,7 +1281,7 @@ yysyntax_error (char *yyresult, int yyst } } #endif /* YYERROR_VERBOSE */ - + /*-----------------------------------------------. | Release the memory associated to this symbol. | Index: extra/config/qconf.cc =================================================================== --- extra/config/qconf.cc (revision 26020) +++ extra/config/qconf.cc (working copy) @@ -1648,7 +1648,7 @@ void ConfigMainWindow::showIntro(void) void ConfigMainWindow::showAbout(void) { static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel .\n\n" - "Bug reports and feature request can also be entered at http://bugs.uClibc.org/\n"); + "Bug reports and feature request can also be entered at https://bugs.uClibc.org/\n"); QMessageBox::information(this, "qconf", str); } Index: extra/config/Makefile.kconfig =================================================================== --- extra/config/Makefile.kconfig (revision 26020) +++ extra/config/Makefile.kconfig (working copy) @@ -4,7 +4,11 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config +ifdef KBUILD_KCONFIG +Kconfig := $(KBUILD_KCONFIG) +else Kconfig := arch/$(SRCARCH)/Kconfig +endif xconfig: $(obj)/qconf $< $(Kconfig) Index: extra/config/confdata.c =================================================================== --- extra/config/confdata.c (revision 26020) +++ extra/config/confdata.c (working copy) @@ -11,6 +11,7 @@ #include #include #include +#include #define LKC_DIRECT_LINK #include "lkc.h" @@ -553,7 +554,7 @@ int conf_write(const char *name) int conf_split_config(void) { - char *name, path[128]; + char *name, path[128], opwd[512]; char *s, *d, c; struct symbol *sym; struct stat sb; @@ -564,7 +565,9 @@ int conf_split_config(void) name = "include/config/auto.conf"; conf_read_simple(name, S_DEF_AUTO); - if (chdir("include/config")) + if (getcwd(opwd, sizeof(opwd)) == NULL) + return 1; + if (chdir(dirname(strdup(name)))) return 1; res = 0; @@ -658,7 +661,7 @@ int conf_split_config(void) close(fd); } out: - if (chdir("../..")) + if (chdir(opwd)) return 1; return res; @@ -666,6 +669,7 @@ out: int conf_write_autoconf(void) { + char opwd[512]; struct symbol *sym; const char *str; char *name; @@ -673,6 +677,10 @@ int conf_write_autoconf(void) time_t now; int i, l; + if (getcwd(opwd, sizeof(opwd)) == NULL) + return 1; + if (chdir(dirname(strdup(conf_get_configname())))) + return 1; sym_clear_all_valid(); file_write_dep("include/config/auto.conf.cmd"); @@ -780,7 +788,7 @@ int conf_write_autoconf(void) */ if (rename(".tmpconfig", name)) return 1; - + chdir(opwd); return 0; } @@ -841,7 +849,7 @@ void conf_set_all_new_symbols(enum conf_ default: continue; } - if (!sym_is_choice(sym) || mode != def_random) + if (!(sym_is_choice(sym) && mode == def_random)) sym->flags |= SYMBOL_DEF_USER; break; default: @@ -850,33 +858,53 @@ void conf_set_all_new_symbols(enum conf_ } - if (modules_sym) - sym_calc_value(modules_sym); + sym_clear_all_valid(); if (mode != def_random) return; - + /* + * We have different type of choice blocks. + * If curr.tri equal to mod then we can select several + * choice symbols in one block. + * In this case we do nothing. + * If curr.tri equal yes then only one symbol can be + * selected in a choice block and we set it to yes, + * and the rest to no. + */ for_all_symbols(i, csym) { if (sym_has_value(csym) || !sym_is_choice(csym)) continue; sym_calc_value(csym); + + if (csym->curr.tri != yes) + continue; + prop = sym_get_choice_prop(csym); - def = -1; - while (1) { - cnt = 0; - expr_list_for_each_sym(prop->expr, e, sym) { - if (sym->visible == no) - continue; - if (def == cnt++) { - csym->def[S_DEF_USER].val = sym; - break; - } + + /* count entries in choice block */ + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) + cnt++; + + /* + * find a random value and set it to yes, + * set the rest to no so we have only one set + */ + def = (rand() % cnt); + + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) { + if (def == cnt++) { + sym->def[S_DEF_USER].tri = yes; + csym->def[S_DEF_USER].val = sym; + } + else { + sym->def[S_DEF_USER].tri = no; } - if (def >= 0 || cnt < 2) - break; - def = (rand() % cnt) + 1; } csym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + csym->flags &= ~(SYMBOL_VALID); } } Index: extra/config/lex.zconf.c_shipped =================================================================== --- extra/config/lex.zconf.c_shipped (revision 26020) +++ extra/config/lex.zconf.c_shipped (working copy) @@ -52,7 +52,7 @@ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. + * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 @@ -1982,7 +1982,7 @@ static void zconfensure_buffer_stack (vo ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); - + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; @@ -2370,11 +2370,14 @@ void zconf_nextfile(const char *name) current_buf = buf; if (file->flags & FILE_BUSY) { - printf("recursive scan (%s)?\n", name); + printf("%s:%d: do not source '%s' from itself\n", + zconf_curname(), zconf_lineno(), name); exit(1); } if (file->flags & FILE_SCANNED) { - printf("file %s already scanned?\n", name); + printf("%s:%d: file '%s' is already sourced from '%s'\n", + zconf_curname(), zconf_lineno(), name, + file->parent->name); exit(1); } file->flags |= FILE_BUSY; Index: extra/config/expr.h =================================================================== --- extra/config/expr.h (revision 26020) +++ extra/config/expr.h (working copy) @@ -65,9 +65,13 @@ enum symbol_type { S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER }; +/* enum values are used as index to symbol.def[] */ enum { S_DEF_USER, /* main user value */ - S_DEF_AUTO, + S_DEF_AUTO, /* values read from auto.conf */ + S_DEF_DEF3, /* Reserved for UI usage */ + S_DEF_DEF4, /* Reserved for UI usage */ + S_DEF_COUNT }; struct symbol { @@ -75,7 +79,7 @@ struct symbol { char *name; enum symbol_type type; struct symbol_value curr; - struct symbol_value def[4]; + struct symbol_value def[S_DEF_COUNT]; tristate visible; int flags; struct property *prop; @@ -84,42 +88,64 @@ struct symbol { #define for_all_symbols(i, sym) for (i = 0; i < 257; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) -#define SYMBOL_CONST 0x0001 -#define SYMBOL_CHECK 0x0008 -#define SYMBOL_CHOICE 0x0010 -#define SYMBOL_CHOICEVAL 0x0020 -#define SYMBOL_VALID 0x0080 -#define SYMBOL_OPTIONAL 0x0100 -#define SYMBOL_WRITE 0x0200 -#define SYMBOL_CHANGED 0x0400 -#define SYMBOL_AUTO 0x1000 -#define SYMBOL_CHECKED 0x2000 -#define SYMBOL_WARNED 0x8000 -#define SYMBOL_DEF 0x10000 -#define SYMBOL_DEF_USER 0x10000 -#define SYMBOL_DEF_AUTO 0x20000 -#define SYMBOL_DEF3 0x40000 -#define SYMBOL_DEF4 0x80000 +#define SYMBOL_CONST 0x0001 /* symbol is const */ +#define SYMBOL_CHECK 0x0008 /* used during dependency checking */ +#define SYMBOL_CHOICE 0x0010 /* start of a choice block (null name) */ +#define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */ +#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */ +#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */ +#define SYMBOL_WRITE 0x0200 /* ? */ +#define SYMBOL_CHANGED 0x0400 /* ? */ +#define SYMBOL_AUTO 0x1000 /* value from environment variable */ +#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */ +#define SYMBOL_WARNED 0x8000 /* warning has been issued */ + +/* Set when symbol.def[] is used */ +#define SYMBOL_DEF 0x10000 /* First bit of SYMBOL_DEF */ +#define SYMBOL_DEF_USER 0x10000 /* symbol.def[S_DEF_USER] is valid */ +#define SYMBOL_DEF_AUTO 0x20000 /* symbol.def[S_DEF_AUTO] is valid */ +#define SYMBOL_DEF3 0x40000 /* symbol.def[S_DEF_3] is valid */ +#define SYMBOL_DEF4 0x80000 /* symbol.def[S_DEF_4] is valid */ #define SYMBOL_MAXLENGTH 256 #define SYMBOL_HASHSIZE 257 #define SYMBOL_HASHMASK 0xff +/* A property represent the config options that can be associated + * with a config "symbol". + * Sample: + * config FOO + * default y + * prompt "foo prompt" + * select BAR + * config BAZ + * int "BAZ Value" + * range 1..255 + */ enum prop_type { - P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, - P_SELECT, P_RANGE, P_ENV + P_UNKNOWN, + P_PROMPT, /* prompt "foo prompt" or "BAZ Value" */ + P_COMMENT, /* text associated with a comment */ + P_MENU, /* prompt associated with a menuconfig option */ + P_DEFAULT, /* default y */ + P_CHOICE, /* choice value */ + P_SELECT, /* select BAR */ + P_RANGE, /* range 7..100 (for a symbol) */ + P_ENV, /* value from environment variable */ }; struct property { - struct property *next; - struct symbol *sym; - enum prop_type type; - const char *text; + struct property *next; /* next property - null if last */ + struct symbol *sym; /* the symbol for which the property is associated */ + enum prop_type type; /* type of property */ + const char *text; /* the prompt value - P_PROMPT, P_MENU, P_COMMENT */ struct expr_value visible; - struct expr *expr; - struct menu *menu; - struct file *file; - int lineno; + struct expr *expr; /* the optional conditional part of the property */ + struct menu *menu; /* the menu the property are associated with + * valid for: P_SELECT, P_RANGE, P_CHOICE, + * P_PROMPT, P_DEFAULT, P_MENU, P_COMMENT */ + struct file *file; /* what file was this property defined */ + int lineno; /* what lineno was this property defined */ }; #define for_all_properties(sym, st, tok) \ Index: Makerules =================================================================== --- Makerules (revision 26020) +++ Makerules (working copy) @@ -54,6 +54,9 @@ headers-y: $(headers-y) MAKEFLAGS += --no-print-directory SHELL_SET_X := set +x +define rel_srcdir + $(shell $(CONFIG_SHELL) $(top_srcdir)/extra/scripts/relative_path.sh $(@D) .) +endef ifneq ($(findstring s,$(MAKEFLAGS)),) export MAKE_IS_SILENT := y SECHO := -@false @@ -72,7 +75,7 @@ Q := @ endif endif -show_objs = $(subst ../,,$@) +show_objs = $(subst $(top_builddir),,$(subst ../,,$@)) pur_disp_compile.c = echo " "CC $(show_objs) pur_disp_compile.i = echo " "CPP $(show_objs) @@ -88,10 +91,10 @@ pur_disp_strip = echo " "STRIP $(ST pur_disp_t_strip = echo " "STRIP $(STRIP_FLAGS) $@ pur_disp_ar = echo " "AR $(ARFLAGS) $@ pur_disp_ld = echo " "LD $(1) -pur_disp_ln = echo " "LN $@ -pur_disp_mkdir = echo " "MKDIR $@ -pur_disp_gen = echo " "GEN $@ -pur_disp_unifdef = echo " "UNIFDEF $@ +pur_disp_ln = echo " "LN $(show_objs) +pur_disp_mkdir = echo " "MKDIR $(show_objs) +pur_disp_gen = echo " "GEN $(show_objs) +pur_disp_unifdef = echo " "UNIFDEF $(show_objs) pur_disp_rm = echo " "CLEAN $(@:_clean=) sil_disp_compile.c = true @@ -205,6 +208,10 @@ define do_ln $(Q)$(LN) -fs endef +define do_mkdir + @$(disp_mkdir) + $(Q)$(INSTALL) -d $@ +endef define do_rm @$(disp_rm) @@ -237,8 +244,8 @@ define compile.u @$(disp_compile.u) ; $(cmd_compile.u) @$(disp_t_strip) endef -cmd_hcompile.u = $(HOSTCC) $^ $(DEPS-$(notdir $@)) -o $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@)) -cmd_hcompile.o = $(HOSTCC) $^ $(DEPS-$(notdir $@)) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@)) +cmd_hcompile.u = $(HOSTCC) $(filter-out $(PHONY),$^) $(DEPS-$(notdir $@)) -o $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@)) +cmd_hcompile.o = $(HOSTCC) $(filter-out $(PHONY),$<) $(DEPS-$(notdir $@)) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@)) define link.so $(Q)$(INSTALL) -d $(dir $@) Index: libcrypt/Makefile.in =================================================================== --- libcrypt/Makefile.in (revision 26020) +++ libcrypt/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libcrypt + CFLAGS-libcrypt := -DNOT_IN_libc -DIS_IN_libcrypt $(SSP_ALL_CFLAGS) LDFLAGS-libcrypt.so := $(LDFLAGS) Index: libintl/Makefile.in =================================================================== --- libintl/Makefile.in (revision 26020) +++ libintl/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libintl + CFLAGS-libintl := -DNOT_IN_libc -DIS_IN_libintl $(SSP_ALL_CFLAGS) LDFLAGS-libintl.so := $(LDFLAGS) Index: utils/Makefile.in =================================================================== --- utils/Makefile.in (revision 26020) +++ utils/Makefile.in (working copy) @@ -4,6 +4,7 @@ # # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. +subdirs += utils # "make utils" flags Index: libresolv/Makefile.in =================================================================== --- libresolv/Makefile.in (revision 26020) +++ libresolv/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libresolv + CFLAGS-libresolv := -DNOT_IN_libc -DIS_IN_libresolv $(SSP_ALL_CFLAGS) LDFLAGS-libresolv.so := $(LDFLAGS) $(call link.asneeded,-lc) Index: ldso/ldso/Makefile.in =================================================================== --- ldso/ldso/Makefile.in (revision 26020) +++ ldso/ldso/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += ldso/ldso/$(TARGET_ARCH) + CFLAGS-ldso := -DNOT_IN_libc -DIS_IN_rtld $(SSP_DISABLE_FLAGS) # This stuff will not work with -fomit-frame-pointer Index: ldso/libdl/Makefile.in =================================================================== --- ldso/libdl/Makefile.in (revision 26020) +++ ldso/libdl/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += ldso/libdl + CFLAGS-libdl := -DNOT_IN_libc -DIS_IN_libdl $(SSP_ALL_CFLAGS) CFLAGS-libdl += -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) -I$(top_srcdir)ldso/include -I$(top_srcdir)ldso/ldso Index: Rules.mak =================================================================== --- Rules.mak (revision 26020) +++ Rules.mak (working copy) @@ -533,9 +533,9 @@ endif NOSTDLIB_CFLAGS:=$(call check_gcc,-nostdlib,) # Collect all CFLAGS components -CFLAGS := -include $(top_builddir)include/libc-symbols.h \ +CFLAGS := -include $(top_srcdir)include/libc-symbols.h \ $(XWARNINGS) $(CPU_CFLAGS) $(SSP_CFLAGS) \ - -nostdinc -I$(top_builddir)include -I. \ + -nostdinc -I$(top_builddir)include -I$(top_srcdir)include -I. \ -I$(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH) ifneq ($(strip $(UCLIBC_EXTRA_CFLAGS)),"") CFLAGS += $(subst ",, $(UCLIBC_EXTRA_CFLAGS)) @@ -616,16 +616,16 @@ else PTNAME := linuxthreads endif endif -PTDIR := $(top_builddir)libpthread/$(PTNAME) +PTDIR := libpthread/$(PTNAME) # set up system dependencies include dirs (NOTE: order matters!) ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) -PTINC:= -I$(PTDIR) \ - -I$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \ - -I$(PTDIR)/sysdeps/$(TARGET_ARCH) \ - -I$(PTDIR)/sysdeps/unix/sysv/linux \ - -I$(PTDIR)/sysdeps/pthread \ - -I$(PTDIR)/sysdeps/pthread/bits \ - -I$(PTDIR)/sysdeps/generic \ +PTINC:= -I$(top_srcdir)$(PTDIR) \ + -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \ + -I$(top_srcdir)$(PTDIR)/sysdeps/$(TARGET_ARCH) \ + -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux \ + -I$(top_srcdir)$(PTDIR)/sysdeps/pthread \ + -I$(top_srcdir)$(PTDIR)/sysdeps/pthread/bits \ + -I$(top_srcdir)$(PTDIR)/sysdeps/generic \ -I$(top_srcdir)ldso/ldso/$(TARGET_ARCH) \ -I$(top_srcdir)ldso/include # @@ -647,12 +647,12 @@ gcc_tls_test_fail: endif else PTINC := \ - -I$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \ - -I$(PTDIR)/sysdeps/$(TARGET_ARCH) \ - -I$(PTDIR)/sysdeps/unix/sysv/linux \ - -I$(PTDIR)/sysdeps/pthread \ - -I$(PTDIR) \ - -I$(top_builddir)libpthread + -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux/$(TARGET_ARCH) \ + -I$(top_srcdir)$(PTDIR)/sysdeps/$(TARGET_ARCH) \ + -I$(top_srcdir)$(PTDIR)/sysdeps/unix/sysv/linux \ + -I$(top_srcdir)$(PTDIR)/sysdeps/pthread \ + -I$(top_srcdir)$(PTDIR) \ + -I$(top_srcdir)libpthread endif CFLAGS+=$(PTINC) else Index: libutil/Makefile.in =================================================================== --- libutil/Makefile.in (revision 26020) +++ libutil/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libutil + CFLAGS-libutil := -DNOT_IN_libc -DIS_IN_libutil $(SSP_ALL_CFLAGS) LDFLAGS-libutil.so := $(LDFLAGS) Index: libc/inet/Makefile.in =================================================================== --- libc/inet/Makefile.in (revision 26020) +++ libc/inet/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/inet + include $(top_srcdir)libc/inet/rpc/Makefile.in INET_DIR := $(top_srcdir)libc/inet Index: libc/inet/rpc/Makefile.in =================================================================== --- libc/inet/rpc/Makefile.in (revision 26020) +++ libc/inet/rpc/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/inet/rpc + CFLAGS-rpc := -fno-strict-aliasing ifneq ($(UCLIBC_HAS_FULL_RPC),y) Index: libc/stdlib/Makefile.in =================================================================== --- libc/stdlib/Makefile.in (revision 26020) +++ libc/stdlib/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/stdlib + include $(top_srcdir)libc/stdlib/malloc/Makefile.in include $(top_srcdir)libc/stdlib/malloc-simple/Makefile.in include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in Index: libc/stdlib/malloc-simple/Makefile.in =================================================================== --- libc/stdlib/malloc-simple/Makefile.in (revision 26020) +++ libc/stdlib/malloc-simple/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/stdlib/malloc-simple + STDLIB_MALLOC_SIMPLE_DIR := $(top_srcdir)libc/stdlib/malloc-simple STDLIB_MALLOC_SIMPLE_OUT := $(top_builddir)libc/stdlib/malloc-simple Index: libc/stdlib/malloc-standard/Makefile.in =================================================================== --- libc/stdlib/malloc-standard/Makefile.in (revision 26020) +++ libc/stdlib/malloc-standard/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/stdlib/malloc-standard + # calloc.c can be found at uClibc/libc/stdlib/calloc.c # valloc.c can be found at uClibc/libc/stdlib/valloc.c CSRC := malloc.c calloc.c realloc.c free.c memalign.c mallopt.c mallinfo.c Index: libc/stdlib/malloc/Makefile.in =================================================================== --- libc/stdlib/malloc/Makefile.in (revision 26020) +++ libc/stdlib/malloc/Makefile.in (working copy) @@ -7,6 +7,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/stdlib/malloc + CSRC := malloc.c calloc.c free.c realloc.c memalign.c \ heap_alloc.c heap_alloc_at.c heap_free.c Index: libc/pwd_grp/Makefile.in =================================================================== --- libc/pwd_grp/Makefile.in (revision 26020) +++ libc/pwd_grp/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/pwd_grp + PWDGRP_DIR := $(top_srcdir)libc/pwd_grp PWDGRP_OUT := $(top_builddir)libc/pwd_grp Index: libc/stdio/Makefile.in =================================================================== --- libc/stdio/Makefile.in (revision 26020) +++ libc/stdio/Makefile.in (working copy) @@ -8,6 +8,8 @@ # Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. # +subdirs += libc/stdio + # SUSv3 functions CSRC := \ fclose.c fcloseall.c fdopen.c fgetpos.c fopen.c freopen.c \ Index: libc/termios/Makefile.in =================================================================== --- libc/termios/Makefile.in (revision 26020) +++ libc/termios/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/termios + TERMIOS_DIR := $(top_srcdir)libc/termios TERMIOS_OUT := $(top_builddir)libc/termios Index: libc/string/Makefile.in =================================================================== --- libc/string/Makefile.in (revision 26020) +++ libc/string/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/string/$(TARGET_ARCH) libc/string/generic + # # Arch specific fun # Index: libc/unistd/Makefile.in =================================================================== --- libc/unistd/Makefile.in (revision 26020) +++ libc/unistd/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/unistd + UNISTD_DIR := $(top_srcdir)libc/unistd UNISTD_OUT := $(top_builddir)libc/unistd Index: libc/sysdeps/linux/Makefile.in =================================================================== --- libc/sysdeps/linux/Makefile.in (revision 26020) +++ libc/sysdeps/linux/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/sysdeps/linux/$(TARGET_ARCH) libc/sysdeps/linux/common + # order is relevant -include $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch include $(top_srcdir)libc/sysdeps/linux/common/Makefile.in Index: libc/sysdeps/linux/Makefile.commonarch =================================================================== --- libc/sysdeps/linux/Makefile.commonarch (revision 26020) +++ libc/sysdeps/linux/Makefile.commonarch (working copy) @@ -28,11 +28,10 @@ arch_clean: ifneq ($(ARCH_HEADERS),) -ARCH_HEADERS_IN := $(patsubst %,../libc/sysdeps/linux/$(TARGET_ARCH)/%,$(ARCH_HEADERS)) ARCH_HEADERS_OUT := $(patsubst %,$(top_builddir)include/%,$(ARCH_HEADERS)) $(ARCH_HEADERS_OUT): - $(do_ln) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ + $(do_ln) -fs $(call rel_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@ headers-y += $(ARCH_HEADERS_OUT) headers_clean-y += arch_headers_clean Index: libc/misc/file/Makefile.in =================================================================== --- libc/misc/file/Makefile.in (revision 26020) +++ libc/misc/file/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/file + MISC_FILE_DIR := $(top_srcdir)libc/misc/file MISC_FILE_OUT := $(top_builddir)libc/misc/file Index: libc/misc/syslog/Makefile.in =================================================================== --- libc/misc/syslog/Makefile.in (revision 26020) +++ libc/misc/syslog/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/syslog + CSRC := syslog.c MISC_SYSLOG_DIR := $(top_srcdir)libc/misc/syslog Index: libc/misc/fnmatch/Makefile.in =================================================================== --- libc/misc/fnmatch/Makefile.in (revision 26020) +++ libc/misc/fnmatch/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/fnmatch + ifeq ($(UCLIBC_HAS_FNMATCH_OLD),y) CSRC := fnmatch_old.c else Index: libc/misc/glob/Makefile.in =================================================================== --- libc/misc/glob/Makefile.in (revision 26020) +++ libc/misc/glob/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/glob + ifeq ($(UCLIBC_HAS_GNU_GLOB),y) CSRC := glob.c ifeq ($(UCLIBC_HAS_LFS),y) Index: libc/misc/ctype/Makefile.in =================================================================== --- libc/misc/ctype/Makefile.in (revision 26020) +++ libc/misc/ctype/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/ctype + # multi source ctype.c COM_SRC := \ isalnum.c isalpha.c iscntrl.c isdigit.c \ Index: libc/misc/utmp/Makefile.in =================================================================== --- libc/misc/utmp/Makefile.in (revision 26020) +++ libc/misc/utmp/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/utmp + CSRC := utent.c wtent.c MISC_UTMP_DIR := $(top_srcdir)libc/misc/utmp Index: libc/misc/dirent/Makefile.in =================================================================== --- libc/misc/dirent/Makefile.in (revision 26020) +++ libc/misc/dirent/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/dirent + CSRC := alphasort.c closedir.c dirfd.c opendir.c readdir.c rewinddir.c \ scandir.c seekdir.c telldir.c readdir_r.c versionsort.c Index: libc/misc/ttyent/Makefile.in =================================================================== --- libc/misc/ttyent/Makefile.in (revision 26020) +++ libc/misc/ttyent/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/ttyent + CSRC := getttyent.c MISC_TTYENT_DIR := $(top_srcdir)libc/misc/ttyent Index: libc/misc/pthread/Makefile.in =================================================================== --- libc/misc/pthread/Makefile.in (revision 26020) +++ libc/misc/pthread/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/pthread + MISC_PTHREAD_DIR := $(top_srcdir)libc/misc/pthread MISC_PTHREAD_OUT := $(top_builddir)libc/misc/pthread Index: libc/misc/wordexp/Makefile.in =================================================================== --- libc/misc/wordexp/Makefile.in (revision 26020) +++ libc/misc/wordexp/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/wordexp + CSRC := wordexp.c MISC_WORDEXP_DIR := $(top_srcdir)libc/misc/wordexp Index: libc/misc/error/Makefile.in =================================================================== --- libc/misc/error/Makefile.in (revision 26020) +++ libc/misc/error/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/error + CSRC := ifeq ($(UCLIBC_HAS_BSD_ERR),y) CSRC += err.c Index: libc/misc/gnu/Makefile.in =================================================================== --- libc/misc/gnu/Makefile.in (revision 26020) +++ libc/misc/gnu/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/gnu + CSRC := obstack.c MISC_GNU_DIR := $(top_srcdir)libc/misc/gnu Index: libc/misc/time/Makefile.in =================================================================== --- libc/misc/time/Makefile.in (revision 26020) +++ libc/misc/time/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/time + CSRC := adjtime.c ifeq ($(UCLIBC_SUSV3_LEGACY),y) CSRC += ftime.c Index: libc/misc/locale/Makefile.in =================================================================== --- libc/misc/locale/Makefile.in (revision 26020) +++ libc/misc/locale/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/locale + # multi source locale.c CSRC := setlocale.c localeconv.c _locale_init.c nl_langinfo.c ifeq ($(UCLIBC_HAS_LOCALE),y) Index: libc/misc/internals/Makefile.in =================================================================== --- libc/misc/internals/Makefile.in (revision 26020) +++ libc/misc/internals/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/internals + CFLAGS-__uClibc_main.c := $(SSP_DISABLE_FLAGS) CSRC := tempname.c errno.c __errno_location.c __h_errno_location.c Index: libc/misc/ftw/Makefile.in =================================================================== --- libc/misc/ftw/Makefile.in (revision 26020) +++ libc/misc/ftw/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/ftw + CSRC := ftw.c ifeq ($(UCLIBC_HAS_LFS),y) CSRC += ftw64.c Index: libc/misc/sysvipc/Makefile.in =================================================================== --- libc/misc/sysvipc/Makefile.in (revision 26020) +++ libc/misc/sysvipc/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/sysvipc + CSRC := ftok.c __syscall_ipc.c # multi source sem.c Index: libc/misc/assert/Makefile.in =================================================================== --- libc/misc/assert/Makefile.in (revision 26020) +++ libc/misc/assert/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/assert + CSRC := __assert.c MISC_ASSERT_DIR := $(top_srcdir)libc/misc/assert Index: libc/misc/statfs/Makefile.in =================================================================== --- libc/misc/statfs/Makefile.in (revision 26020) +++ libc/misc/statfs/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/statfs + CSRC := statvfs.c fstatvfs.c ifeq ($(UCLIBC_HAS_LFS),y) ifeq ($(UCLIBC_LINUX_SPECIFIC),y) Index: libc/misc/wchar/Makefile.in =================================================================== --- libc/misc/wchar/Makefile.in (revision 26020) +++ libc/misc/wchar/Makefile.in (working copy) @@ -16,6 +16,8 @@ # wcsftime # +subdirs += libc/misc/wchar + # multi source wchar.c CSRC := btowc.c wctob.c mbsinit.c mbrlen.c mbrtowc.c wcrtomb.c mbsrtowcs.c \ wcsrtombs.c _wchar_utf8sntowcs.c _wchar_wcsntoutf8s.c \ Index: libc/misc/mntent/Makefile.in =================================================================== --- libc/misc/mntent/Makefile.in (revision 26020) +++ libc/misc/mntent/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/mntent + CSRC := mntent.c MISC_MNTENT_DIR := $(top_srcdir)libc/misc/mntent Index: libc/misc/search/Makefile.in =================================================================== --- libc/misc/search/Makefile.in (revision 26020) +++ libc/misc/search/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/search + CSRC := hsearch.c # multi source _tsearch.c Index: libc/misc/regex/Makefile.in =================================================================== --- libc/misc/regex/Makefile.in (revision 26020) +++ libc/misc/regex/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/regex + ifeq ($(UCLIBC_HAS_REGEX_OLD),y) CSRC := regex_old.c else Index: libc/misc/wctype/Makefile.in =================================================================== --- libc/misc/wctype/Makefile.in (revision 26020) +++ libc/misc/wctype/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/misc/wctype + # multi source _wctype.c COM_SRC := \ iswalnum.c iswalpha.c iswcntrl.c iswdigit.c iswgraph.c \ Index: libc/signal/Makefile.in =================================================================== --- libc/signal/Makefile.in (revision 26020) +++ libc/signal/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libc/signal + CSRC := allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \ sigblock.c sigdelset.c sigempty.c sigfillset.c siggetmask.c \ sigisempty.c sigismem.c sigjmp.c signal.c \ Index: librt/Makefile.in =================================================================== --- librt/Makefile.in (revision 26020) +++ librt/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += librt + CFLAGS-librt := -DNOT_IN_libc -DIS_IN_librt $(SSP_ALL_CFLAGS) LDFLAGS-librt.so := $(LDFLAGS) $(call link.asneeded,-lc) Index: Makefile =================================================================== --- Makefile (revision 26020) +++ Makefile (working copy) @@ -6,9 +6,8 @@ # top_srcdir=./ -top_builddir=./ -#include $(top_builddir)Rules.mak -#all: libs -include Makefile.in +top_builddir=$(if $(O),$(O),.)/ +export top_builddir +include $(top_srcdir)Makefile.in include $(top_srcdir)Makerules include $(top_srcdir)Makefile.help Index: libpthread/linuxthreads_db/Makefile.in =================================================================== --- libpthread/linuxthreads_db/Makefile.in (revision 26020) +++ libpthread/linuxthreads_db/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libpthread/linuxthreads_db + # Get the thread include dependencies and shared object name CFLAGS-linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\"" @@ -59,18 +61,18 @@ $(top_builddir)lib/libthread_db.a: $(lib $(Q)$(RM) $@ $(do_ar) -include/thread_db.h: - $(do_ln) ../$(PTDIR)_db/$(@F) $(top_builddir)$@ +$(top_builddir)include/thread_db.h: + $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@ -linuxthreads_db_headers := include/thread_db.h -$(linuxthreads_db_headers): $(wildcard $(addprefix include/config/linuxthreads/,old.h new.h)) +linuxthreads_db_headers := $(top_builddir)include/thread_db.h +$(linuxthreads_db_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h)) headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers) objclean-y += libthread_db_clean headers_clean-y += linuxthreads_db_headers_clean linuxthreads_db_headers_clean: - $(do_rm) $(top_builddir)include/thread_db.h + $(do_rm) $(linuxthreads_db_headers) libthread_db_clean: $(do_rm) $(addprefix $(libthread_db_OUT)/*., o os oS a) Index: libpthread/Makefile.in =================================================================== --- libpthread/Makefile.in (revision 26020) +++ libpthread/Makefile.in (working copy) @@ -6,6 +6,6 @@ # ifneq ($(PTNAME),) -include $(PTDIR)/Makefile.in -include $(PTDIR)_db/Makefile.in +include $(top_srcdir)$(PTDIR)/Makefile.in +include $(top_srcdir)$(PTDIR)_db/Makefile.in endif Index: libpthread/linuxthreads.old/Makefile.in =================================================================== --- libpthread/linuxthreads.old/Makefile.in (revision 26020) +++ libpthread/linuxthreads.old/Makefile.in (working copy) @@ -6,6 +6,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libpthread/linuxthreads.old + CFLAGS-dir_linuxthreads.old := -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-linuxthreads.old := $(CFLAGS-dir_linuxthreads.old) $(SSP_ALL_CFLAGS) @@ -102,22 +104,23 @@ $(top_builddir)lib/libpthread.a: $(libpt $(Q)$(RM) $@ $(do_ar) -include/pthread.h: - $(do_ln) ../$(PTDIR)/sysdeps/pthread/$(@F) $(top_builddir)$@ -include/semaphore.h: - $(do_ln) ../$(PTDIR)/$(@F) $(top_builddir)$@ -include/bits/pthreadtypes.h: | include/bits - $(do_ln) ../../$(PTDIR)/sysdeps/pthread/bits/$(@F) $(top_builddir)$@ - -linuxthreads_headers := include/pthread.h include/semaphore.h \ - include/bits/pthreadtypes.h -$(linuxthreads_headers): $(wildcard $(addprefix include/config/linuxthreads/,old.h new.h)) +$(top_builddir)include/pthread.h: + $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/$(@F) $@ +$(top_builddir)include/semaphore.h: + $(do_ln) $(call rel_srcdir)$(PTDIR)/$(@F) $@ +$(top_builddir)include/bits/pthreadtypes.h: | $(top_builddir)include/bits + $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/bits/$(@F) $@ + +linuxthreads_headers := $(top_builddir)include/pthread.h \ + $(top_builddir)include/semaphore.h \ + $(top_builddir)include/bits/pthreadtypes.h +$(linuxthreads_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h)) headers-$(UCLIBC_HAS_THREADS) += $(linuxthreads_headers) objclean-y += libpthread_clean headers_clean-y += linuxthreads_headers_clean linuxthreads_headers_clean: - $(do_rm) $(addprefix $(top_builddir),$(linuxthreads_headers)) + $(do_rm) $(linuxthreads_headers) libpthread_clean: $(do_rm) $(addprefix $(libpthread_OUT)/*., o os oS a) Index: libpthread/linuxthreads/Makefile.in =================================================================== --- libpthread/linuxthreads/Makefile.in (revision 26020) +++ libpthread/linuxthreads/Makefile.in (working copy) @@ -6,6 +6,10 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libpthread/linuxthreads/sysdeps/$(TARGET_ARCH) +subdirs += libpthread/linuxthreads/sysdeps/unix/sysv/linux +subdirs += libpthread/linuxthreads/sysdeps/pthread + CFLAGS-dir_linuxthreads := -DNOT_IN_libc -DIS_IN_libpthread CFLAGS-linuxthreads := $(CFLAGS-dir_linuxthreads) $(SSP_ALL_CFLAGS) @@ -115,22 +119,23 @@ $(top_builddir)lib/libpthread.a: $(libpt $(Q)$(RM) $@ $(do_ar) -include/pthread.h: - $(do_ln) ../$(PTDIR)/sysdeps/pthread/$(@F) $(top_builddir)$@ -include/semaphore.h: - $(do_ln) ../$(PTDIR)/$(@F) $(top_builddir)$@ -include/bits/pthreadtypes.h: | include/bits - $(do_ln) ../../$(PTDIR)/sysdeps/pthread/bits/$(@F) $(top_builddir)$@ - -linuxthreads_headers := include/pthread.h include/semaphore.h \ - include/bits/pthreadtypes.h -$(linuxthreads_headers): $(wildcard $(addprefix include/config/linuxthreads/,old.h new.h)) +$(top_builddir)include/pthread.h: + $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/$(@F) $@ +$(top_builddir)include/semaphore.h: + $(do_ln) $(call rel_srcdir)$(PTDIR)/$(@F) $@ +$(top_builddir)include/bits/pthreadtypes.h: | $(top_builddir)include/bits + $(do_ln) $(call rel_srcdir)$(PTDIR)/sysdeps/pthread/bits/$(@F) $@ + +linuxthreads_headers := $(top_builddir)include/pthread.h \ + $(top_builddir)include/semaphore.h \ + $(top_builddir)include/bits/pthreadtypes.h +$(linuxthreads_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h)) headers-$(UCLIBC_HAS_THREADS) += $(linuxthreads_headers) objclean-y += libpthread_clean headers_clean-y += linuxthreads_headers_clean linuxthreads_headers_clean: - $(do_rm) $(addprefix $(top_builddir),$(linuxthreads_headers)) + $(do_rm) $(linuxthreads_headers) libpthread_clean: $(do_rm) $(addprefix $(libpthread_OUT)/,$(foreach e, o os oS a,$(foreach d, *. */*. */*/*. */*/*/*.,$(d)$(e)))) Index: libpthread/linuxthreads.old_db/Makefile.in =================================================================== --- libpthread/linuxthreads.old_db/Makefile.in (revision 26020) +++ libpthread/linuxthreads.old_db/Makefile.in (working copy) @@ -5,6 +5,8 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +subdirs += libpthread/linuxthreads.old_db + # Get the thread include dependencies and shared object name CFLAGS-linuxthreads.old_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\"" @@ -59,18 +61,18 @@ $(top_builddir)lib/libthread_db.a: $(lib $(Q)$(RM) $@ $(do_ar) -include/thread_db.h: - $(do_ln) ../$(PTDIR)_db/$(@F) $(top_builddir)$@ +$(top_builddir)include/thread_db.h: + $(do_ln) $(call rel_srcdir)$(PTDIR)_db/$(@F) $@ -linuxthreads_db_headers := include/thread_db.h -$(linuxthreads_db_headers): $(wildcard $(addprefix include/config/linuxthreads/,old.h new.h)) +linuxthreads_db_headers := $(top_builddir)include/thread_db.h +$(linuxthreads_db_headers): $(wildcard $(addprefix $(top_builddir)include/config/linuxthreads/,old.h new.h)) headers-$(PTHREADS_DEBUG_SUPPORT) += $(linuxthreads_db_headers) objclean-y += libthread_db_clean headers_clean-y += linuxthreads_db_headers_clean linuxthreads_db_headers_clean: - $(do_rm) $(top_builddir)include/thread_db.h + $(do_rm) $(linuxthreads_db_headers) libthread_db_clean: $(do_rm) $(addprefix $(libthread_db_OUT)/*., o os oS a)