Denys Vlasenko wrote:
As I said, I am not obsessed with build system replacement.
I started it as a necessity because I was bitten several times with
the modification of files not being detected.
I thought that it is a sign that build system is not maintained
and is bit rotting.
After recent events (your fix and my testing) I now see that
1. There are people (you) who understand and maintain
current build system;
I wouldn't go that far. It's just that whenever I've had to look at it
I've found it quite easy to work with - there are much worse ones out
there (cough glibc cough). My point is simply that being able to
understand and modify existing code is a necessity; a rewrite from
scratch is likely to introduce more problems in the short term than it
can solve.
2. The breakage is not as widespread as I thought - actually,
all .c files are properly tracked. Or almost all -
I did not check all possibilities, maybe there are a few more
obscure .config's with problems.
Adding header file dependencies would be a good thing. IMO, if it can
be done within the existing framework, that's better than throwing
everything out.
Are you willing to look into it?
I'm not really a make expert, and I didn't intend to become maintainer
when I submitted a patch...
The patch below copies over just enough parts of the glibc dependency
system to make it work on simple cases in uClibc (tested by touching
include/mntent.h and watching it rebuild only five files). It's
probably uglier and less efficient than it needs to be; I doubt it
tracks all object files, and it doesn't integrate with "make clean".
Finishing the job is left as an exercise for the reader :-)
Bernd
--
This footer brought to you by insane German lawmakers.
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft Muenchen, Registergericht Muenchen HRB 40368
Geschaeftsfuehrer Thomas Wessel, William A. Martin, Margaret Seif
Index: Makerules
===================================================================
--- Makerules (revision 22146)
+++ Makerules (working copy)
@@ -99,7 +99,9 @@ disp_t_strip = $($(DISP)_disp_t_strip)
disp_ar = $($(DISP)_disp_ar)
disp_ld = $($(DISP)_disp_ld)
-cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(^D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@))
+compile-mkdep-flags = -MD -MP -MF [EMAIL PROTECTED] -MT $@
+
+cmd_compile.c = $(CC) -c $< -o $@ $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(filter-out $(CFLAGS-OMIT-$(notdir $<)),$(CFLAGS-$(notdir $(^D)))) $(CFLAGS-$(subst $(top_srcdir),,$(dir $<))) $(CFLAGS-$(notdir $<)) $(CFLAGS-$(notdir $@)) $(compile-mkdep-flags)
cmd_compile.u = $(CC) $^ $(DEPS-$(notdir $@)) -o $@ $(CFLAGS) $(CFLAGS-$(notdir $(^D))) $(CFLAGS-$(notdir $@))
cmd_compile.S = $(filter-out -std=gnu99, $(cmd_compile.c)) -D__ASSEMBLER__ $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$(notdir $<)) $(ASFLAGS-$(notdir $@))
cmd_compile.m = $(cmd_compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
@@ -292,6 +294,14 @@ $(top_builddir)lib/libpthread_nonshared.
$(do_strip)
$(do_ar)
++depfiles := $(patsubst %.o,%.o.dt,$(filter %.o,$(libc-a-y) $(libc-so-y))) \
+ $(patsubst %.os,%.os.dt,$(filter %.os,$(libc-a-y) $(libc-so-y))) \
+ $(patsubst %.oS,%.oS.dt,$(filter %.oS,$(libc-a-y) $(libc-so-y)))
+
+ifdef +depfiles
+-include $(+depfiles)
+endif
+
.PHONY: dummy create
clean: objclean-y headers_clean-y
_______________________________________________
uClibc mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/uclibc