On Tue, Jun 03, 2008 at 04:54:20PM +0200, Bernd Schmidt wrote:
> Bernhard Fischer wrote:
>
>> I would prefer the attached, completely untested hunks.
>> Please apply if it works for you.
>
> I'd drop the STRIP_FILES, as only STRIP_T_FILES really makes sense here.
>
> Also, I noticed that libpthread isn't the only place that does this, so  
> we'll have to expand this a little :-/

Meanwhile i've adjusted those to strip the archives and not their
prerequisites.

I attach my corrent improvement WRT header dependencies, installation
and printing prettyness (prettiness? who knows):

1) There was a wrong dependency "include/bits" for the config targets
which tricked make into
-extra/config/conf extra/config/mconf: include/bits
-# TODO: this results in "make[1]: `conf' is up to date" printed
-# on every rebuild, because extra/config/conf is already built
-# on previous make run. Make it "test -x $@ || ..." (simple & a bit wrong)
-# or "make -q -C extra/config $(notdir $@) || ..." (less readable)?

I've renamed it to $(suspicious_dependency) and set it to empty. We will
remove this later.

2) reasons to re-generate include/bits/uClibc_config.h
the script which generates it has to be a prereq, too.
Added a nice disp_gen while at it.

3) libc/sysdeps
mess.
libc/sysdeps/linux/{$(TARGET_ARCH,common}/ #excuse that sh+make slang
are linked to include/. _linked_. This means that make(1) will ignore
any symlink's timestamp unless
-L, --check-symlink-times
is specified. Since the sysdep headers are usually older than the
.config, we cannot make include/* depend on uClibc_config.h but do some
kind of indirection.
I solved this the easy (and friendly to eventually broken make(1)s) way
by saying that iff we have to regenerate uClibc_config.h then in this
very rule, we make headers-y.
This is IMHO the cleanest and simplest solution without relying on -L.
Several helper variables were added to Makefile.in that contain
ALL_HEADERS_*. These are in a helper variable target-headers-sysdep and
are added to headers-y (but that's obvious from the patch).

4) header symlinks
Somehow related to 3) above, add pretty-printing for LN
Provide explicit rules to symlink common, arch, subarch specific headers
into include/
This is the block in Makefile.in perusing do_ln

5) headers_clean
The links from 3) and 4) above are put on a prune-list scheduled for
removal. There is a small problem with threads in this respect, goto
EOM for details.

6) pregen and install_dev
pregen generates the stringently important sysnum.h
Versions up to and including 0.9.29-release needed
        # older uClibc without the signum.h generation fix
        set -x && $(MAKE1) -C $(UCLIBC_DIR) \
                PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
                DEVEL_PREFIX=/usr/ \
                RUNTIME_PREFIX=$(TOOL_BUILD_DIR)/uClibc_dev/ \
                HOSTCC="$(HOSTCC)" \
                BUILD_CFLAGS="$(HOST_CFLAGS)" \
                BUILD_LDFLAGS="$(HOST_LDFLAGS)" \
                UCLIBC_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
                UCLIBC_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
                pregen install_dev

Since a couple of hundred revisions that pregen is not needed anymore, a
"simple" install_dev will do.
This patch verified that the pure install_dev works fine so one can
build a proper stageN compiler with these headers.

7) other cosmetics
Preparation of do_unifdef, do_mkdir, do_ln
do_ln, disp_ln, cmd_ln could need a cosmetic cleanup to work with it's
arguments. The current patch leaves this as an exercise for the curious
reader (or helpful janitor) and works well otherwise.

I intend to apply this patch in the next few days since it seems
to be correct (afaics) but i'd be happy if somebody who uses powerpc or
bfin regularly could test it. There are two corner-cases that i couldn't
test and i wouldn't be surprised if they wouldn't work out of the box,
although they are supposed to.

---------

The linuxthreads hickup (no pun intended WRT mythological NPTL ;)

Turning off threads doesn't wipe threads-headers from include/
This is a real problem but doesn't affect me since i'm not doing
threads. Nice, eh?
libpthread/Makefile should hardcode clean targets for all available
thread impls.

thanks for taking the time to read that far && cheers,
Index: uClibc/Makefile.in
===================================================================
--- uClibc/Makefile.in	(revision 22237)
+++ uClibc/Makefile.in	(working copy)
@@ -15,6 +15,8 @@ noconfig_targets := menuconfig config ol
 include $(top_builddir)Rules.mak
 sub_headers := headers
 
+#suspicious_dependency:=include/bits
+
 ifeq ($(HAVE_DOT_CONFIG),y)
 
 all: pregen libs
@@ -36,11 +38,17 @@ include $(top_srcdir)extra/locale/Makefi
 # last included to catch all the objects added by others (locales/threads)
 include $(top_srcdir)libc/Makefile.in
 
-include/bits/uClibc_config.h: extra/config/conf .config
-	$(Q)$(INSTALL) -d $(dir $@)
-	$(Q)@$< -o $(top_srcdir)extra/Configs/Config.in
-	$(top_srcdir)extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h
-
+# If the .config changes then we have to make sure that our includes are
+# updated properly. This would normally work by saying that the headers
+# 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
+	@$(disp_gen)
+	@#superfluous: $(Q)$(INSTALL) -d $(dir $@)
+	$(Q)@$< -s $(top_srcdir)extra/Configs/Config.in
+	$(Q)$(top_srcdir)extra/scripts/conf-header.sh .config > $@
+	$(Q)$(MAKE) headers-y
 
 # For the moment, we have to keep re-running this target
 # because the fix includes scripts rely on pre-processers
@@ -59,49 +67,82 @@ ifneq ($(TARGET_SUBARCH),)
 HEADERS_BITS_SUBARCH := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/*.h))
 endif
 HEADERS_BITS_COMMON := $(filter-out $(HEADERS_BITS_ARCH) $(HEADERS_BITS_SUBARCH),$(HEADERS_BITS_COMMON))
-headers: include/bits/uClibc_config.h
-	$(Q)$(MAKE) headers-y
-	$(Q)\
-	set -e; \
-	if [ -e libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h ] ; then \
-		$(LN) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/fpu_control.h include/ ; \
-	else \
-		$(LN) -fs ../libc/sysdeps/linux/common/fpu_control.h include/ ; \
-	fi; \
-	for f in dl-osinfo.h hp-timing.h ; do \
-		$(LN) -fs ../libc/sysdeps/linux/common/$$f include/ ; \
-	done
-	$(Q)\
-	cd include/bits; \
-	set -e; \
-	for i in $(HEADERS_BITS_COMMON) ; do \
-		$(LN) -fs ../../libc/sysdeps/linux/common/bits/$$i .; \
-	done; \
-	for i in $(HEADERS_BITS_ARCH) ; do \
-		$(LN) -fs ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$$i .; \
-	done; \
-	for i in $(HEADERS_BITS_SUBARCH) ; do \
-		$(LN) -fs ../../libc/sysdeps/linux/$(TARGET_ARCH)/bits/$(TARGET_SUBARCH)/$$i .; \
-	done
-	$(Q)\
-	cd include/sys; \
-	set -e; \
-	for i in `ls ../../libc/sysdeps/linux/common/sys/*.h` ; do \
-		$(LN) -fs $$i .; \
-	done; \
-	if [ -d ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys ] ; then \
-		for i in `ls ../../libc/sysdeps/linux/$(TARGET_ARCH)/sys/*.h` ; do \
-			$(LN) -fs $$i .; \
-		done; \
-	fi
-ifeq ($(UCLIBC_HAS_LOCALE),y)
-	$(MAKE) -C extra/locale locale_headers
+
+HEADERS_SYS_COMMON := $(notdir $(wildcard $(top_srcdir)libc/sysdeps/linux/common/sys/*.h))
+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))
+ifneq ($(TARGET_SUBARCH),)
+ALL_HEADERS_BITS_SUBARCH := $(addprefix 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))
+
+target-headers-sysdep := \
+	$(ALL_HEADERS_COMMON) \
+	$(ALL_HEADERS_BITS_COMMON) \
+	$(ALL_HEADERS_BITS_ARCH) \
+	$(ALL_HEADERS_BITS_SUBARCH) \
+	$(ALL_HEADERS_SYS_COMMON) \
+	$(ALL_HEADERS_SYS_ARCH)
+
+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) $@
+
+include/dl-osinfo.h include/hp-timing.h:
+	$(do_ln) ../libc/sysdeps/linux/common/$(@F) $@
+
+$(ALL_HEADERS_BITS_COMMON):
+	$(do_ln) ../../libc/sysdeps/linux/common/bits/$(@F) $@
+
+$(ALL_HEADERS_BITS_ARCH):
+	$(do_ln) ../../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) $@
+endif
+
+ifneq ($(strip $(ALL_HEADERS_SYS_COMMON)),)
+$(ALL_HEADERS_SYS_COMMON):
+	$(do_ln) ../../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) $@
+endif
+
+$(target-headers-sysdep): | include/bits
+
+sysdep_common_headers-clean:
+	$(RM) $(ALL_HEADERS_COMMON)
+headers_clean-y += sysdep_common_headers-clean
+
+# The headers. Arch specific headers are specified via ARCH_HEADERS in
+# libc/sysdeps/linux/$(TARGET_ARCH)/Makefile.arch which appends those via
+# libc/sysdeps/linux/Makefile.commonarch to headers-y
+headers-y += $(target-headers-sysdep)
+
+headers: include/bits/uClibc_config.h
+	$(Q)$(if $(UCLIBC_HAS_LOCALE),$(MAKE) -C extra/locale locale_headers)
 
+pregen: include/bits/sysnum.h headers
 
-pregen: headers
-	$(Q)\
-	set -e; \
+include/bits/sysnum.h: $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
+	@$(disp_mkdir)
+	$(INSTALL) -d $(@D)
+	@$(disp_gen)
+	$(Q)set -e; \
 	cd $(top_builddir); \
 	tmp=`mktemp include/bits/sysnum.h.XXXXXX 2>/dev/null`; \
 	[ -z "$$tmp" ] && tmp='include/bits/sysnum.h.new'; \
@@ -368,33 +409,30 @@ headers:
 endif # ifeq ($(HAVE_DOT_CONFIG),y)
 
 include/bits:
-	$(INSTALL) -d include/bits
+	@$(disp_mkdir)
+	$(Q)$(INSTALL) -d $@
 
 # configuration
 # ---------------------------------------------------------------------------
-extra/config/conf extra/config/mconf: include/bits
-# TODO: this results in "make[1]: `conf' is up to date" printed
-# on every rebuild, because extra/config/conf is already built
-# on previous make run. Make it "test -x $@ || ..." (simple & a bit wrong)
-# or "make -q -C extra/config $(notdir $@) || ..." (less readable)?
+extra/config/conf extra/config/mconf: $(suspicious_dependency)
 	$(Q)$(MAKE) -C extra/config $(notdir $@)
 
-menuconfig: extra/config/mconf include/bits
+menuconfig: extra/config/mconf $(suspicious_dependency)
 	$(Q)./extra/config/mconf extra/Configs/Config.in
 
-config: extra/config/conf include/bits
+config: extra/config/conf $(suspicious_dependency)
 	$(Q)./extra/config/conf extra/Configs/Config.in
 
-oldconfig: extra/config/conf include/bits
+oldconfig: extra/config/conf $(suspicious_dependency)
 	$(Q)./extra/config/conf -o extra/Configs/Config.in
 
-silentoldconfig: extra/config/conf include/bits
+silentoldconfig: extra/config/conf $(suspicious_dependency)
 	$(Q)./extra/config/conf -s extra/Configs/Config.in
 
-randconfig: extra/config/conf include/bits
+randconfig: extra/config/conf $(suspicious_dependency)
 	$(Q)./extra/config/conf -r extra/Configs/Config.in
 
-allyesconfig: extra/config/conf include/bits
+allyesconfig: extra/config/conf $(suspicious_dependency)
 	$(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
@@ -403,10 +441,10 @@ allyesconfig: extra/config/conf include/
 	sed -i -e "s/^UCLIBC_MJN3_ONLY=.*/# UCLIBC_MJN3_ONLY is not set/" .config
 	$(Q)./extra/config/conf -o extra/Configs/Config.in
 
-allnoconfig: extra/config/conf include/bits
+allnoconfig: extra/config/conf $(suspicious_dependency)
 	$(Q)./extra/config/conf -n extra/Configs/Config.in
 
-defconfig: extra/config/conf include/bits
+defconfig: extra/config/conf $(suspicious_dependency)
 	$(Q)./extra/config/conf -d extra/Configs/Config.in \
 		-D extra/Configs/defconfigs/$(ARCH)
 
@@ -414,8 +452,7 @@ clean:
 	$(Q)$(RM) -r lib include/bits
 	$(RM) ldso/*/*.a libpthread/*/*.a libc/*.a libcrypt/*.a libintl/*.a \
 		libm/*.a libnsl/*.a libpthread/*.a libresolv/*.a librt/*.a \
-		libutil/*.a lib/*.a \
-		include/fpu_control.h include/dl-osinfo.h include/hp-timing.h
+		libutil/*.a lib/*.a
 	$(MAKE) objclean-y headers_clean-y
 	$(MAKE) -s -C test clean
 	$(MAKE) -C utils utils_clean
Index: uClibc/Makerules
===================================================================
--- uClibc/Makerules	(revision 22237)
+++ uClibc/Makerules	(working copy)
@@ -71,6 +71,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 $@
 
 sil_disp_compile.c = true
 sil_disp_compile.i = true
@@ -83,6 +87,10 @@ sil_disp_strip     = true
 sil_disp_t_strip   = true
 sil_disp_ar        = true
 sil_disp_ld        = true
+sil_disp_ln        = true
+sil_disp_mkdir     = true
+sil_disp_gen       = true
+sil_disp_unifdef   = true
 
 ver_disp_compile.c = echo $(cmd_compile.c)
 ver_disp_compile.i = echo $(cmd_compile.i)
@@ -95,6 +103,10 @@ ver_disp_strip     = echo $(cmd_strip)
 ver_disp_t_strip   = echo $(cmd_t_strip)
 ver_disp_ar        = echo $(cmd_ar)
 ver_disp_ld        =
+ver_disp_ln        =
+ver_disp_mkdir     =
+ver_disp_gen       =
+ver_disp_unifdef   = echo $(cmd_unifdef)
 
 disp_compile.c = $($(DISP)_disp_compile.c)
 disp_compile.i = $($(DISP)_disp_compile.i)
@@ -107,6 +119,10 @@ disp_strip     = $($(DISP)_disp_strip)
 disp_t_strip   = $($(DISP)_disp_t_strip)
 disp_ar        = $($(DISP)_disp_ar)
 disp_ld        = $($(DISP)_disp_ld)
+disp_ln        = $($(DISP)_disp_ln)
+disp_mkdir     = $($(DISP)_disp_mkdir)
+disp_gen       = $($(DISP)_disp_gen)
+disp_unifdef   = $($(DISP)_disp_unifdef)
 
 any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
 
@@ -143,6 +159,13 @@ cmd_strip     = $(STRIPTOOL) $(STRIP_FLA
 cmd_t_strip   = $(STRIPTOOL) $(STRIP_FLAGS) $@
 cmd_ar        = $(AR) $(ARFLAGS) $@ $^
 
+# special suckage alert. We try to avoid --check-symlink-times thus we touch
+# the link-target.
+define do_ln
+	@$(disp_ln)
+	$(Q)$(LN) -fs
+endef
+
 compile.c = @$(call maybe_exec,compile.c)
 compile.i =  $(call maybe_exec,compile.i)
 compile.s =  $(call maybe_exec,compile.s)
@@ -152,6 +175,7 @@ compile-m = @$(disp_compile-m) ; $(cmd_c
 do_strip  = @$(disp_strip)     ; $(cmd_strip)
 do_t_strip= @$(disp_t_strip)   ; $(cmd_t_strip)
 do_ar     = @$(disp_ar)        ; $(cmd_ar)
+do_unifdef= @$(disp_unifdef)   ; $(cmd_unifdef)
 
 define compile.u
 	@$(disp_compile.u) ; $(cmd_compile.u)
@@ -244,9 +268,6 @@ $(ldso):
 $(libc):
 	@cd $(top_builddir); $(MAKE) lib/$(patsubst %.$(MAJOR_VERSION),%,$(notdir $@))
 
-$(headers_dep): $(top_srcdir)extra/scripts/gen_bits_syscall_h.sh
-	$(Q)cd $(top_builddir); $(MAKE) pregen
-
 CRT := crt1
 
 ifeq ($(HAVE_SHARED)$(UCLIBC_FORMAT_SHARED_FLAT),y)
Index: uClibc/Rules.mak
===================================================================
--- uClibc/Rules.mak	(revision 22237)
+++ uClibc/Rules.mak	(working copy)
@@ -44,6 +44,8 @@ TAR        = tar
 
 STRIP_FLAGS ?= -x -R .note -R .comment
 
+UNIFDEF := $(top_builddir)extra/scripts/unifdef -UUCLIBC_INTERNAL
+
 # Select the compiler needed to build binaries for your development system
 HOSTCC     = gcc
 BUILD_CFLAGS = -O2 -Wall
Index: uClibc/libc/sysdeps/linux/Makefile.commonarch
===================================================================
--- uClibc/libc/sysdeps/linux/Makefile.commonarch	(revision 22238)
+++ uClibc/libc/sysdeps/linux/Makefile.commonarch	(working copy)
@@ -28,13 +28,10 @@ ifneq ($(ARCH_HEADERS),)
 ARCH_HEADERS_IN  := $(patsubst %,../libc/sysdeps/linux/$(TARGET_ARCH)/%,$(ARCH_HEADERS))
 ARCH_HEADERS_OUT := $(patsubst %,$(top_builddir)include/%,$(ARCH_HEADERS))
 
-headers-y += arch_headers
-arch_headers:
-	$(SECHO) $(LN) -fs $(ARCH_HEADERS) $(top_builddir)include/
-	@for h in $(ARCH_HEADERS_IN) ; do \
-		$(LN) -fs $$h $(top_builddir)include/ ; \
-	done
+$(ARCH_HEADERS_OUT):
+	$(do_ln) -fs ../libc/sysdeps/linux/$(TARGET_ARCH)/$(@F) $@
 
+headers-y += $(ARCH_HEADERS_OUT)
 headers_clean-y += arch_headers_clean
 arch_headers_clean:
 	$(RM) $(ARCH_HEADERS_OUT)
Index: uClibc/libpthread/linuxthreads.old/Makefile.in
===================================================================
--- uClibc/libpthread/linuxthreads.old/Makefile.in	(revision 22237)
+++ uClibc/libpthread/linuxthreads.old/Makefile.in	(working copy)
@@ -108,14 +108,18 @@ $(top_builddir)lib/libpthread.a: $(libpt
 	$(do_ar)
 	$(do_t_strip)
 
-linuxthreads_headers:
-	$(Q)$(LN) -sf ../$(PTDIR)/sysdeps/pthread/pthread.h $(top_builddir)include/
-	$(Q)$(LN) -sf ../$(PTDIR)/semaphore.h $(top_builddir)include/
-	$(Q)$(INSTALL) -d $(top_builddir)include/bits
-	$(Q)$(LN) -sf ../../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/
+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_clean:
-	$(RM) $(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \
+	$(RM) $(top_builddir)include/pthread.h \
+		$(top_builddir)include/semaphore.h \
 		$(top_builddir)include/bits/pthreadtypes.h
 
 libpthread_clean:
Index: uClibc/libpthread/linuxthreads/Makefile.in
===================================================================
--- uClibc/libpthread/linuxthreads/Makefile.in	(revision 22237)
+++ uClibc/libpthread/linuxthreads/Makefile.in	(working copy)
@@ -121,14 +121,18 @@ $(top_builddir)lib/libpthread.a: $(libpt
 	$(do_ar)
 	$(do_t_strip)
 
-linuxthreads_headers:
-	$(Q)$(LN) -sf ../$(PTDIR)/sysdeps/pthread/pthread.h $(top_builddir)include/
-	$(Q)$(LN) -sf ../$(PTDIR)/semaphore.h $(top_builddir)include/
-	$(Q)$(INSTALL) -d $(top_builddir)include/bits
-	$(Q)$(LN) -sf ../../$(PTDIR)/sysdeps/pthread/bits/pthreadtypes.h $(top_builddir)include/bits/
+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_clean:
-	$(RM) $(top_builddir)include/pthread.h $(top_builddir)include/semaphore.h \
+	$(RM) $(top_builddir)include/pthread.h \
+		$(top_builddir)include/semaphore.h \
 		$(top_builddir)include/bits/pthreadtypes.h
 
 libpthread_clean:
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Reply via email to