Bug 1796 - print directories where make enters
Summary: print directories where make enters
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: rpm-build (show other bugs)
Version: unstable
Hardware: all Linux
: P5 enhancement
Assignee: placeholder@altlinux.org
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-30 20:38 MSK by imz
Modified: 2007-03-15 22:46 MSK (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description imz 2002-12-30 20:38:58 MSK
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 Dmitry V. Levin 2003-01-02 23:05:25 MSK
Added setting of MAKEFLAGS=\"--print-directory\" variable to %___build_pre macro.
Will be available in next rpm-build release.
Comment 2 Dmitry V. Levin 2003-01-02 23:05:25 MSK
Added setting of MAKEFLAGS=\"--print-directory\" variable to %___build_pre macro.
Will be available in next rpm-build release.
Comment 3 Dmitry V. Levin 2003-02-05 21:37:52 MSK
Implemented in 4.0.4-alt13
Comment 4 Dmitry V. Levin 2003-02-05 21:37:52 MSK
Implemented in 4.0.4-alt13
Comment 5 imz 2003-02-06 16:46:50 MSK
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 imz 2003-02-06 16:46:50 MSK
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 Dmitry V. Levin 2003-02-07 16:00:54 MSK
Indeed.
Comment 8 Dmitry V. Levin 2003-02-07 16:00:54 MSK
Indeed.
Comment 9 Dmitry V. Levin 2003-02-10 09:20:09 MSK
Will be fixed in upcoming release.
Comment 10 Dmitry V. Levin 2003-02-10 09:20:09 MSK
Will be fixed in upcoming release.