This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
proposal modification to ecosconfig
- From: Donnat Eric <e dot donnat at ri dot silicomp dot fr>
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 29 Jan 2002 16:00:33 +0100
- Subject: [ECOS] proposal modification to ecosconfig
- Organization: Silicomp RI
Hi folks,
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.
For instance, if you are playing with network, without fileio, and
after that fileio, there are chances that your application won't
link without a make clean.
The issue, is that the makefile never uses $(AR) in order to do
cleanings. Librarian is only use incrementally.
IMHO, this is a source of in-understanding for most exp. users,
and newbies, since this situation could happen due to:
- an increasing scenario (one more package)
- a change of a single option/component
Why cleaning if you're only increasing the configuration ?
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 ?
Thanks, for any comments.
Best regards.
--
Eric DONNAT
Silicomp Research Institute
2 avenue de Vignate, 38610 Gieres, France.
Phone +33 476 63 48 85 Fax +33 476 51 05 32
http://www.ri.silicomp.com