[ECOS] proposal modification to ecosconfig

Jonathan Larmour jlarmour@redhat.com
Tue Jan 29 16:01:00 GMT 2002


Donnat Eric wrote:
> 
> In most cases the "ecosconfig tree" is an happy command that does
> all the necessary to update your makefiles and libraru. However
> an optional compile is somewhat treated buggy IMHO by the build system.

Yep, we know about this, and there's a bugzilla bug open to "rewrite the
build system" :-).
 
> The rule generated by ecosconfig is:
> 
> $(LIBRARY).stamp: $(OBJECTS)
>         $(AR) rcs $(PREFIX)/lib/$(@:.stamp=) $(foreach obj,$?,$(dir $(obj))$(OBJECT_PREFIX)_$(notdir $(obj:.o.d=.o)))
>         @cat $^ > $(@:.stamp=.deps)
>         @touch $@
> 
> why not use:
> 
> $(LIBRARY).stamp: $(OBJECTS) makefile
>         $(AR) rcs $(PREFIX)/lib/$(@:.stamp=) $(foreach obj,$(filter-out makefile,$?),$(dir $(obj))$(OBJECT_PREFIX)_$(notdir $(obj:.o.d=.o)))
>         $(AR) d $(PREFIX)/lib/$(@:.stamp=) $(filter-out $(foreach obj,$(filter-out makefile,$^),$(OBJECT_PREFIX)_$(notdir $(obj:.o.d=.o))),$(filter $(OBJECT_PREFIX)_%,$(shell $(AR) t $(PREFIX)/lib/$(@:.stamp=))))
>         @cat $(filter-out makefile,$^) > $(@:.stamp=.deps)
>         @touch $@
> 
> that order (when the makefile is changed after the "ecosconfig tree")
> the librarian to clean all unwanted objects with the package prefix ?

While looking quite tricky, this doesn't seem unreasonable. Subject to
testing of course :-). I'd be interested in Bart's opinion before making
this change though. Bart?

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine



More information about the Ecos-discuss mailing list