mirror of
https://github.com/golang/go
synced 2024-11-26 17:07:09 -07:00
fix race with fresh perforce checkouts
R=r DELTA=15 (9 added, 0 deleted, 6 changed) OCL=20977 CL=20981
This commit is contained in:
parent
cb64ec5bb6
commit
fa945d5bf8
@ -39,13 +39,22 @@ y.tab.h: $(YFILES)
|
|||||||
y.tab.c: y.tab.h
|
y.tab.c: y.tab.h
|
||||||
test -f y.tab.c && touch y.tab.c
|
test -f y.tab.c && touch y.tab.c
|
||||||
|
|
||||||
|
# the test here checks whether we have 6g at all.
|
||||||
|
# if so, use it. if not, just use the sysimport.c we have.
|
||||||
|
# this happens on fresh perforce checkouts where
|
||||||
|
# sysimport.c ends up with an older time stamp
|
||||||
|
# than sys.go (or unsafe.go or mksys.c).
|
||||||
sysimport.c: sys.go unsafe.go mksys.c
|
sysimport.c: sys.go unsafe.go mksys.c
|
||||||
gcc -o mksys mksys.c
|
if test -x $(BIN)/6g; then \
|
||||||
6g sys.go
|
gcc -o mksys mksys.c; \
|
||||||
6g unsafe.go
|
6g sys.go; \
|
||||||
|
6g unsafe.go; \
|
||||||
./mksys sys >_sysimport.c && \
|
./mksys sys >_sysimport.c && \
|
||||||
./mksys unsafe >>_sysimport.c && \
|
./mksys unsafe >>_sysimport.c && \
|
||||||
mv _sysimport.c sysimport.c
|
mv _sysimport.c sysimport.c; \
|
||||||
|
elif test -f sysimport.c; then \
|
||||||
|
touch sysimport.c; \
|
||||||
|
fi
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OFILES) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB) _sysimport.c
|
rm -f $(OFILES) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB) _sysimport.c
|
||||||
|
Loading…
Reference in New Issue
Block a user