This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gprof doesn't build from cvs
- From: Mike Stump <mikestump at comcast dot net>
- To: Alan Modra <amodra at gmail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 4 Sep 2013 20:08:53 -0700
- Subject: Re: gprof doesn't build from cvs
- Authentication-results: sourceware.org; auth=none
- References: <2FAE10CF-24E2-4BFF-87A8-8AEE6877C912 at comcast dot net> <20130905021258 dot GZ3430 at bubble dot grove dot modra dot org>
On Sep 4, 2013, at 7:12 PM, Alan Modra <amodra@gmail.com> wrote:
> On Wed, Sep 04, 2013 at 06:02:04PM -0700, Mike Stump wrote:
>> diff --git a/binutils/gprof/Makefile.am b/binutils/gprof/Makefile.am
>> index 97d8c17..cf19cb1 100644
>> --- a/binutils/gprof/Makefile.am
>> +++ b/binutils/gprof/Makefile.am
>> @@ -68,7 +68,7 @@ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
>> .m.c:
>> awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
>> FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
>> - FILE=$*.m $(srcdir)/$*.m
>> + FILE=$*.m $*.m
>>
>> POTFILES = $(sources) $(noinst_HEADERS)
>> po/POTFILES.in: @MAINT@ Makefile
>
> Not OK. Breaks building with an absolute source dir and make 3.81.
>
> make[2]: Entering directory `/home/alan/build/gas/all/gprof'
> awk -f /src/binutils-current/gprof/gen-c-prog.awk > ./flat_bl.c \
> FUNCTION=`(echo flat_bl|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
> FILE=flat_bl.m flat_bl.m
> awk: /src/binutils-current/gprof/gen-c-prog.awk:29: fatal: cannot open file `flat_bl.m' for reading (No such file or directory)
Ah, that's what I was missing… That's easy to fix:
diff --git a/binutils/gprof/Makefile.am b/binutils/gprof/Makefile.am
index 97d8c17..b272771 100644
--- a/binutils/gprof/Makefile.am
+++ b/binutils/gprof/Makefile.am
@@ -68,7 +68,7 @@ CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/configure.in
.m.c:
awk -f $(srcdir)/gen-c-prog.awk > ./$*.c \
FUNCTION=`(echo $*|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
- FILE=$*.m $(srcdir)/$*.m
+ FILE=$(notdir $*.m) $(srcdir)/$(notdir $*.m)
POTFILES = $(sources) $(noinst_HEADERS)
po/POTFILES.in: @MAINT@ Makefile
This trims out unconditionally the directory part, and then re-adds the directory to the part that matters.
Ok?