This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
Re: [ECOS] PKGconf.mak problem
- To: tlr@netinsight.se
- Subject: Re: [ECOS] PKGconf.mak problem
- From: jlarmour@cygnus.co.uk (Jonathan Larmour)
- Date: Wed, 18 Aug 1999 16:23:57 +0100
- Cc: ecos-discuss@sourceware.cygnus.com
- Newsgroups: cygnus.sourceware.ecos.d
- Organization: Cygnus Solutions Ltd, UK
In article <37BAA355.76EDE274@netinsight.se> you write:
>I found a (minor) problem with the ecos make system.
>Even if I explicitly name file 'testfile.S' in the COMPILE entry of
>PKGconf.mak, the file 'testfile.c' will be compiled instead (if it exists).
Hmm... yes. This is because we rely on the default build rules for GNU make.
So it is just told to build "testfile.o", and GNU make will just rebuild
the one it thinks of first :-/.
We're currently revamping the build system, so unless someone out there
thinks it is worth submitting a patch, there won't be an outright fix.
As a workaround you should be able to add a specific make rule to build
testfile.S. This is completely off the top of my head with the aid of cut and
paste, and therefore likely to be wrong, but here's an outline of what's
probably needed:
OTHER_TARGETS := testfile_s.stamp
OTHER_DEPS := testfile_s.d
OTHER_CLEAN := testfile_s.clean
.PHONY: testfile_s.clean
testfile_s.stamp: testfile_s.o
$(AR) rcs $(PREFIX)/lib/$(LIBRARY) $?
$(TOUCH) $@
testfile_s.o: testfile.S
$(CXX) -c $(INCLUDE_PATH) $(CFLAGS) -Wp,-MD,$(@:.o=.tmp) -o $@ $<
@echo > $(@:.o=.d)
@echo $@ ':' $< '\' >> $(@:.o=.d)
@$(TAIL) +2 $(@:.o=.tmp) >> $(@:.o=.d)
@$(RM) $(@:.o=.tmp)
testfile_s.clean:
$(RM) testfile_s.stamp
$(RM) testfile_s.o
Jifl
--
Cygnus Solutions, 35 Cambridge Place, Cambridge, UK. Tel: +44 (1223) 728762
"I used to have an open mind but || Get yer free open source RTOS's here...
my brains kept falling out." || http://sourceware.cygnus.com/ecos
Help fight spam! http://spam.abuse.net/ These opinions are all my own fault