public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@redhat.com>
To: tromey@redhat.com
Cc: frysk <frysk@sourceware.org>
Subject: Re: .DEFAULT: rule
Date: Wed, 14 Feb 2007 23:58:00 -0000	[thread overview]
Message-ID: <45D3A21C.70300@redhat.com> (raw)
In-Reply-To: <m37iuk5z9g.fsf@localhost.localdomain>

Tom,

As in the contents of the .Po file?  Reads gcc man page, the -MP 
option.  This is a typical .Po file:

frysk/proc/Id.o: ../../frysk/frysk-core/frysk/proc/Id.java \
  ../frysk-imports/jline.jar ../frysk-imports/antlr.jar \
  ../frysk-imports/junit.jar ../frysk-imports/getopt.jar \
  ../frysk-imports/jdom.jar ../frysk-imports/cdtparser.jar \
  /usr/share/java/libgcj-4.1.1.jar

below you'll see the rule being used to generate it (had to rewrite 
automake's to to work around gcj bugs).  It includes -MP option to 
generate those phony rules, but they are not there.

Andrew

# Given a .java file convert it to a .o file.
# XXX: GCJ has a bug where it totally scrambles nested classes with
# identical names.  Reject any code with duplicate class names.
# XXX: GCJ has a bug where, when given a -Werror fail, it still exits
# with success.  Hack around this by saving the message in a log file
# and then checking that it is empty.
.java.o:
        dups=`$(JV_SCAN) --list-class $< \
                | tr '[ ]' '[\n]' \
                | sed -n -e 's,^.*$$\([A-Z]\),\1,p' \
                | sort | uniq -d` ; \
        if test x"$$dups" != x ; then echo "Duplicate class names tickle 
a GCJ bug: $$dups" ; exit 1 ; fi
        depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`; \
        if $(GCJCOMPILE) -MT $@ -MD -MP -MF "$$depbase.Tpo" -c -o $@ $< 
2>&1 | tee $*.log && test ! -s $*.log ; \
        then mv -f "$$depbase.Tpo" "$$depbase.Po"; else rm -f 
"$$depbase.Tpo"; exit 1; fi
        rm -f $*.log



>
> The dependency file ought to contain dummy targets for all the headers.
> See the automake dependency tracking white paper (well, used to be a
> white paper, now moved into the manual)
>
> http://sourceware.org/automake/automake.html#Dependency-Tracking-Evolution
>
> If you aren't seeing these dummy targets, something is wrong.
>
> Tom
>   

  reply	other threads:[~2007-02-14 23:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-14 19:24 Andrew Cagney
2007-02-14 21:25 ` Tom Tromey
2007-02-14 23:58   ` Andrew Cagney [this message]
2007-02-16  1:42     ` Tom Tromey

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=45D3A21C.70300@redhat.com \
    --to=cagney@redhat.com \
    --cc=frysk@sourceware.org \
    --cc=tromey@redhat.com \
    /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).