public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: jlarmour@cygnus.co.uk (Jonathan Larmour)
To: tlr@netinsight.se
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] PKGconf.mak problem
Date: Wed, 18 Aug 1999 08:24:00 -0000	[thread overview]
Message-ID: <199908181523.QAA13579@peshwari.cygnus.co.uk> (raw)
In-Reply-To: <37BAA355.76EDE274@netinsight.se>

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

      reply	other threads:[~1999-08-18  8:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-18  5:13 Daniel Kahlin
1999-08-18  8:24 ` Jonathan Larmour [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199908181523.QAA13579@peshwari.cygnus.co.uk \
    --to=jlarmour@cygnus.co.uk \
    --cc=ecos-discuss@sourceware.cygnus.com \
    --cc=tlr@netinsight.se \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).