public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] PKGconf.mak problem
@ 1999-08-18  5:13 Daniel Kahlin
  1999-08-18  8:24 ` Jonathan Larmour
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Kahlin @ 1999-08-18  5:13 UTC (permalink / raw)
  To: ecos-discuss

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).

/Daniel <tlr@netinsight.se>

-- 
Daniel Kahlin <daniel.kahlin@netinsight.se>
Hardware System Designer
Net Insight AB
URL: http://www.netinsight.se/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] PKGconf.mak problem
  1999-08-18  5:13 [ECOS] PKGconf.mak problem Daniel Kahlin
@ 1999-08-18  8:24 ` Jonathan Larmour
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 1999-08-18  8:24 UTC (permalink / raw)
  To: tlr; +Cc: ecos-discuss

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-08-18  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-08-18  5:13 [ECOS] PKGconf.mak problem Daniel Kahlin
1999-08-18  8:24 ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).