This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: proposal modification to ecosconfig
- From: Jonathan Larmour <jlarmour at redhat dot com>
- To: Donnat Eric <e dot donnat at ri dot silicomp dot fr>
- Cc: ecos-discuss at sources dot redhat dot com, Bart Veer <bartv at redhat dot com>
- Date: Wed, 30 Jan 2002 00:00:27 +0000
- Subject: Re: [ECOS] proposal modification to ecosconfig
- References: <3C56B911.C92CCC50@ri.silicomp.fr>
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