Closed Bug 523691 Opened 11 years ago Closed 11 years ago

Pymake -include command doesn't try to build the file it's including

Categories

(Firefox Build System :: General, defect)

x86
Windows XP
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bent.mozilla, Assigned: benjamin)

Details

Attachments

(1 file)

I don't get .all.pp files on windows because pymake isn't trying to build the file it's including. Building .all.pp manually works just fine.
We apparently have a test that tests a slightly different behavior here:
http://hg.mozilla.org/users/bsmedberg_mozilla.com/pymake/file/10f0ddef6938/tests/include-regen.mk

That tests this behavior:
"In the case of makefiles, a makefile that has a double-colon rule with commands but no prerequisites will be remade every time make is run, and then again after make starts over and reads the makefiles in again. This would cause an infinite loop: make would constantly remake the makefile, and never do anything else. So, to avoid this, make will not attempt to remake makefiles which are specified as targets of a double-colon rule with commands but no prerequisites. "
http://www.gnu.org/software/make/manual/make.html#Remaking-Makefiles

However, in the normal case, make is in fact supposed to regenerate makefiles, per:
http://www.gnu.org/software/make/manual/make.html#Include

Attached is a test for this behavior, which gmake passes and pymake fails.
http://hg.mozilla.org/users/bsmedberg_mozilla.com/pymake/rev/0aa14be496b3
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee: nobody → benjamin
Trying a clean build of electrolysis 6894db5c84a1, I get the following error

$ mkdir ../mp-dbg
[snip]
$ autoconf-2.13
$ cd js/src
$ autoconf-2.13
$ cd ../../nsprpub
$ autoconf-2.13
$ cd ../../m-dbg
$ ../electrolysis/configure
[snip]
cjones@SCHIZOPHRENIA /c/mozilla/mp-dbg
$ python -O ../electrolysis/build/pymake/make.py -j4
make.py[0]: Entering directory 'c:\mozilla\mp-dbg'
No rule to make target '../electrolysis/browser/app-config.mk' needed by ['../el
ectrolysis/browser/app-config.mk']
No rule to make target './config/myconfig.mk' needed by ['./config/myconfig.mk']

No rule to make target '../electrolysis/browser/app-rules.mk' needed by ['../ele
ctrolysis/browser/app-rules.mk']
No rule to make target './config/myrules.mk' needed by ['./config/myrules.mk']
c:\mozilla\mp-dbg\Makefile:92:0$ rm -f -rf ./dist/sdk
c:\mozilla\mp-dbg\Makefile:93:0$ rm -f -rf ./dist/include
c:\mozilla\mp-dbg\Makefile:94:0$ rm -f -rf ./dist/private
c:\mozilla\mp-dbg\Makefile:95:0$ rm -f -rf ./dist/public
c:\mozilla\mp-dbg\Makefile:96:0$ rm -f -rf ./dist/bin/components
c:\mozilla\mp-dbg\Makefile:97:0$ rm -f -rf _tests
make.py[1]: Entering directory 'c:\mozilla\mp-dbg'
No rule to make target '../electrolysis/browser/app-config.mk' needed by ['../el
ectrolysis/browser/app-config.mk']
No rule to make target './config/myconfig.mk' needed by ['./config/myconfig.mk']

No rule to make target '../electrolysis/browser/app-rules.mk' needed by ['../ele
ctrolysis/browser/app-rules.mk']
No rule to make target './config/myrules.mk' needed by ['./config/myrules.mk']
tier_base:  config build probes
make.py[2]: Entering directory 'c:\mozilla\mp-dbg'
No rule to make target '../electrolysis/browser/app-config.mk' needed by ['../el
ectrolysis/browser/app-config.mk']
No rule to make target './config/myconfig.mk' needed by ['./config/myconfig.mk']

No rule to make target '../electrolysis/browser/app-rules.mk' needed by ['../ele
ctrolysis/browser/app-rules.mk']
No rule to make target './config/myrules.mk' needed by ['./config/myrules.mk']
export_tier_base
make.py[3]: Entering directory 'c:\mozilla\mp-dbg'
No rule to make target '../electrolysis/browser/app-config.mk' needed by ['../el
ectrolysis/browser/app-config.mk']
No rule to make target './config/myconfig.mk' needed by ['./config/myconfig.mk']

No rule to make target '../electrolysis/browser/app-rules.mk' needed by ['../ele
ctrolysis/browser/app-rules.mk']
No rule to make target './config/myrules.mk' needed by ['./config/myrules.mk']
make.py[3]: Leaving directory 'c:\mozilla\mp-dbg'
make.py[3]: Entering directory 'c:\mozilla\mp-dbg\config'
No rule to make target '../../electrolysis/browser/app-config.mk' needed by ['..
/../electrolysis/browser/app-config.mk']
No rule to make target '../../electrolysis/browser/app-rules.mk' needed by ['../
../electrolysis/browser/app-rules.mk']
No rule to make target '../../electrolysis/browser/app-config.mk' needed by ['..
/../electrolysis/browser/app-config.mk']
No rule to make target '../../electrolysis/browser/app-rules.mk' needed by ['../
../electrolysis/browser/app-rules.mk']
make.py[4]: Entering directory 'c:\mozilla\mp-dbg\config\mkdepend'
c:\mozilla\electrolysis\config\rules.mk:1475:0$ rm -f nfspwd
No rule to make target '../../../electrolysis/browser/app-config.mk' needed by [
'../../../electrolysis/browser/app-config.mk']
No rule to make target '../../../electrolysis/browser/app-rules.mk' needed by ['
../../../electrolysis/browser/app-rules.mk']
nsinstall_win.c
ifparser.c
main.c
cppsetup.c
c:\mozilla\electrolysis\config\rules.mk:1476:0$ cp ../../electrolysis/config/nfs
pwd.pl nfspwd
include.c
parse.c
pr.c
c:\mozilla\electrolysis\config\rules.mk:1366:0$ cl -Fohost_nsinstall_win.obj -c
-TC -nologo -Fdhost_nsinstall_win.pdb -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_
X11 -MDd          -DUNICODE -D_UNICODE  -I../../electrolysis/config -I. -I../dis
t/include -I../dist/include/nsprpub  -Ic:/mozilla/mp-dbg/dist/include/nspr -Ic:/
mozilla/mp-dbg/dist/include/nss      -Ic:/mozilla/mp-dbg/dist/include/nspr c:/mo
zilla/mp-dbg/config/../../electrolysis/config/nsinstall_win.c
c:\mozilla\electrolysis\config\rules.mk:1366:0$ cl -Fohost_ifparser.obj -c -TC -
nologo -Fdhost_ifparser.pdb -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -MTd
        -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".obj\"  -I../../../electroly
sis/config/mkdepend -I. -I../../dist/include -I../../dist/include/nsprpub  -Ic:/
mozilla/mp-dbg/dist/include/nspr -Ic:/mozilla/mp-dbg/dist/include/nss      -Ic:/
mozilla/mp-dbg/dist/include/nspr c:/mozilla/mp-dbg/config/mkdepend/../../../elec
trolysis/config/mkdepend/ifparser.c
c:\mozilla\electrolysis\config\rules.mk:1366:0$ cl -Fohost_main.obj -c -TC -nolo
go -Fdhost_main.pdb -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -MTd
-DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".obj\"  -I../../../electrolysis/conf
ig/mkdepend -I. -I../../dist/include -I../../dist/include/nsprpub  -Ic:/mozilla/
mp-dbg/dist/include/nspr -Ic:/mozilla/mp-dbg/dist/include/nss      -Ic:/mozilla/
mp-dbg/dist/include/nspr c:/mozilla/mp-dbg/config/mkdepend/../../../electrolysis
/config/mkdepend/main.c
nsinstall_win.c
ifparser.c
main.c
c:\mozilla\electrolysis\config\rules.mk:1366:0$ cl -Fohost_cppsetup.obj -c -TC -
nologo -Fdhost_cppsetup.pdb -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -MTd
        -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".obj\"  -I../../../electroly
sis/config/mkdepend -I. -I../../dist/include -I../../dist/include/nsprpub  -Ic:/
mozilla/mp-dbg/dist/include/nspr -Ic:/mozilla/mp-dbg/dist/include/nss      -Ic:/
mozilla/mp-dbg/dist/include/nspr c:/mozilla/mp-dbg/config/mkdepend/../../../elec
trolysis/config/mkdepend/cppsetup.c
cpc:\mozilla\electrolysis\config\rules.mk:1366:0$ cl -Fohost_include.obj -c -TC
-nologo -Fdhost_include.pdb -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -MTd
        -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".obj\"  -I../../../electroly
sis/config/mkdepend -I. -I../../dist/include -I../../dist/include/nsprpub  -Ic:/
mozilla/mp-dbg/dist/include/nspr -Ic:/mozilla/mp-dbg/dist/include/nss      -Ic:/
mozilla/mp-dbg/dist/include/nspr c:/mozilla/mp-dbg/config/mkdepend/../../../elec
trolysis/config/mkdepend/include.c
psetup.c
c:\mozilla\electrolysis\config\rules.mk:1366:0$ cl -Fohost_parse.obj -c -TC -nol
ogo -Fdhost_parse.pdb -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -MTd
  -DINCLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".obj\"  -I../../../electrolysis/co
nfig/mkdepend -I. -I../../dist/include -I../../dist/include/nsprpub  -Ic:/mozill
a/mp-dbg/dist/include/nspr -Ic:/mozilla/mp-dbg/dist/include/nss      -Ic:/mozill
a/mp-dbg/dist/include/nspr c:/mozilla/mp-dbg/config/mkdepend/../../../electrolys
is/config/mkdepend/parse.c
include.c
parse.c
c:\mozilla\electrolysis\config\rules.mk:1366:0$ cl -Fohost_pr.obj -c -TC -nologo
 -Fdhost_pr.pdb -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -MTd          -DIN
CLUDEDIR=\"/usr/include\" -DOBJSUFFIX=\".obj\"  -I../../../electrolysis/config/m
kdepend -I. -I../../dist/include -I../../dist/include/nsprpub  -Ic:/mozilla/mp-d
bg/dist/include/nspr -Ic:/mozilla/mp-dbg/dist/include/nss      -Ic:/mozilla/mp-d
bg/dist/include/nspr c:/mozilla/mp-dbg/config/mkdepend/../../../electrolysis/con
fig/mkdepend/pr.c
c:\mozilla\electrolysis\config\rules.mk:1477:0$ chmod +x nfspwd
C:\Program Files\Microsoft SDKs\Windows\v7.0\\include\wingdi.h(112) : warning C4
005: 'ERROR' : macro redefinition
        c:\mozilla\electrolysis\config\mkdepend\def.h(67) : see previous definit
ion of 'ERROR'
pr.c
c:\mozilla\electrolysis\config\rules.mk:1039:0$ link -NOLOGO -OUT:mkdepend.exe -
PDB:mkdepend.pdb host_cppsetup.obj host_ifparser.obj host_include.obj host_main.
obj host_parse.obj host_pr.obj
c:\mozilla\electrolysis\config\rules.mk:1039:0$ link -NOLOGO -OUT:nsinstall.exe
-PDB:nsinstall.pdb host_nsinstall_win.obj
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I pointed out to bsmedberg that he landed the fix for this on the 'parser-reperf' branch in the pymake repo:
http://hg.mozilla.org/users/bsmedberg_mozilla.com/pymake/rev/0aa14be496b3
That's what got synced to m-c.

He said that wasn't what he intended to do, so perhaps that branch has some other bug that's causing this.
cjones: is that build actually failing? I don't see any error messages there.
I reproduced the hang: it's a result of not exporting SHELL, and AFAICT unrelated to the changes here.
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
(In reply to comment #6)
> cjones: is that build actually failing? I don't see any error messages there.

I killed it as soon as I saw the errors, so I don't know.  Oops.  But I haven't seen those error messages on any other build I've done, on any platform.
They're harmless, it turns out. bsmedberg landed a change to silence them.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.