Bug 1796 - print directories where make enters
: print directories where make enters
Status: CLOSED FIXED
: Sisyphus
(All bugs in Sisyphus/rpm-build)
: unstable
: all Linux
: P5 enhancement
Assigned To:
:
:
:
:
:
  Show dependency tree
 
Reported: 2002-12-30 20:38 by
Modified: 2007-03-15 22:46 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2002-12-30 20:38:58
When examining build failures, it is useful to know in which directory the
compilation failed. 

When looking on some programs\' build output, it is not clear in which
directory it happened, because the top-level make doesn\'t print the initial
directory. 

I suggest that rpmbuild appends --print-directory to MAKEFLAGS environment
variable (or some alternative way to get the same beahviour).

---
For example, pine build:

Making Pine and rpload/rpdump.
make CC=cc DEBUG= OPTIMIZE=-pipe -Wundef -Wformat -O2 -fexpensive-optimizations
-march=i686 EXTRADRIVERS=mbox maildir EXTRASPECIALS=MAILSPOOL=/var/mail
SSLDIR=/var/lib/ssl SSLINCLUDE=/usr/include SSLLIB=/usr/lib
SSLCERTS=/var/lib/ssl/certs -f makefile.lnx
cc -pipe -Wundef -Wformat -O2 -fexpensive-optimizations -march=i686     -DLNX
-DSYSTYPE=\\\"LNX\\\" -DMOUSE -Imy_util -Ipure_recode -DRECODEG_PINE 
 -c -o mailview.o mailview.c
mailview.c: In function `encoding_editorial\':
mailview.c:2002: `ENCODING_DISCLAIMER\' undeclared (first use in this function)
mailview.c:2002: (Each undeclared identifier is reported only once
mailview.c:2002: for each function it appears in.)
mailview.c:4086:9: warning: \"_WINDOWS\" is not defined
make: *** [mailview.o] Error 1
error: Bad exit status from /home/ivan/rpm/tmp/rpm-tmp.33535 (%build)

After appending --print-directory to MAKEFLAGS in pine.spec like this:

%build

MAKEFLAGS=\"$MAKEFLAGS --print-directory\" \\
./build ....

the output contains more information:

Making Pine and rpload/rpdump.
make CC=cc DEBUG= OPTIMIZE=-pipe -Wundef -Wformat -O2 -fexpensive-optimizations
-march=i686 EXTRADRIVERS=mbox maildir EXTRASPECIALS=MAILSPOOL=/var/mail
SSLDIR=/var/lib/ssl SSLINCLUDE=/usr/include SSLLIB=/usr/lib
SSLCERTS=/var/lib/ssl/certs -f makefile.lnx
make: Entering directory `/var/SRC/ivan/rpm/BUILD/pine4.51/pine\'
cc -pipe -Wundef -Wformat -O2 -fexpensive-optimizations -march=i686     -DLNX
-DSYSTYPE=\\\"LNX\\\" -DMOUSE -Imy_util -Ipure_recode -DRECODEG_PINE 
 -c -o mailview.o mailview.c
mailview.c: In function `encoding_editorial\':
mailview.c:2002: `ENCODING_DISCLAIMER\' undeclared (first use in this function)
mailview.c:2002: (Each undeclared identifier is reported only once
mailview.c:2002: for each function it appears in.)
mailview.c:4086:9: warning: \"_WINDOWS\" is not defined
make: *** [mailview.o] Error 1
make: Leaving directory `/var/SRC/ivan/rpm/BUILD/pine4.51/pine\'
error: Bad exit status from /home/ivan/rpm/tmp/rpm-tmp.33535 (%build)

---
The directory information can be parsed by Emacs compilation mode, and the
places can be found.

rpm-build-4.0.4-alt12
------- Comment #1 From 2003-01-02 23:05:25 -------
Added setting of MAKEFLAGS=\"--print-directory\" variable to
%___build_pre macro.
Will be available in next rpm-build release.
------- Comment #2 From 2003-01-02 23:05:25 -------
Added setting of MAKEFLAGS=\"--print-directory\" variable to
%___build_pre macro.
Will be available in next rpm-build release.
------- Comment #3 From 2003-02-05 21:37:52 -------
Implemented in 4.0.4-alt13
------- Comment #4 From 2003-02-05 21:37:52 -------
Implemented in 4.0.4-alt13
------- Comment #5 From 2003-02-06 16:46:50 -------
I see it:

rpm --eval=%dump 2>&1 | grep MAKEFLAGS
        MAKEFLAGS=\"--print-directory\"

but it doesn\'t seem to work (tested on pine.spec). Perhaps, the variable should exported. (In pine.spec, make is called as a subprocess of a script.)
------- Comment #6 From 2003-02-06 16:46:50 -------
I see it:

rpm --eval=%dump 2>&1 | grep MAKEFLAGS
        MAKEFLAGS=\"--print-directory\"

but it doesn\'t seem to work (tested on pine.spec). Perhaps, the variable should exported. (In pine.spec, make is called as a subprocess of a script.)
------- Comment #7 From 2003-02-07 16:00:54 -------
Indeed.
------- Comment #8 From 2003-02-07 16:00:54 -------
Indeed.
------- Comment #9 From 2003-02-10 09:20:09 -------
Will be fixed in upcoming release.
------- Comment #10 From 2003-02-10 09:20:09 -------
Will be fixed in upcoming release.