This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gprof doesn't build from cvs


gprof doesn't build from cvs.  This is a an out of tree build.  GNU make 3.82 has then entire path in $*, so one cannot just add $(srcdir) to it.

$ make
awk -f ../../binutils/binutils/gprof/gen-c-prog.awk > ./../../binutils/binutils/gprof/flat_bl.c \
    FUNCTION=`(echo ../../binutils/binutils/gprof/flat_bl|sed -e 's,.*/,,g' -e 's/_bl//')`_blurb \
    FILE=../../binutils/binutils/gprof/flat_bl.m ../../binutils/binutils/gprof/../../binutils/binutils/gprof/flat_bl.m
awk: ../../binutils/binutils/gprof/gen-c-prog.awk:29: fatal: cannot open file `../../binutils/binutils/gprof/../../binutils/binutils/gprof/flat_bl.m' for reading (No such file or directory)
make: *** [../../binutils/binutils/gprof/flat_bl.c] Error 2

When I add the patch below, it then works.  I don't know what motived the original, so, I don't know what this solution breaks, if anything.  A make expert should review this.

If one adds these generated files to a tar ball, then, trivially, the problem doesn't appear.  I've switched from tar ball to cvs checkout; so I hit it.

Ok?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]