1
0
mirror of https://github.com/golang/go synced 2024-11-19 02:14:43 -07:00

make Makefiles safe for parallel make

use -j4 (4-way parallel) in make.bash.

halves time for make.bash on r45

also add libregexp, acid to default build

R=r
DELTA=90  (39 added, 37 deleted, 14 changed)
OCL=15485
CL=15487
This commit is contained in:
Russ Cox 2008-09-18 15:06:43 -07:00
parent 899c5281da
commit 76036192b9
15 changed files with 49 additions and 50 deletions

View File

@ -3,7 +3,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
for i in lib9 libbio libmach_amd64 syscall
for i in lib9 libbio libmach_amd64 libregexp syscall
do
cd $i
make clean

View File

@ -29,9 +29,12 @@ $(OFILES): $(HFILES)
lex.$O: ../cc/macbody ../cc/lexbody
y.tab.c: $(YFILES)
y.tab.h: $(YFILES)
yacc $(YFLAGS) $(YFILES)
y.tab.c: y.tab.h
# do nothing
clean:
rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c

View File

@ -38,9 +38,12 @@ $(LIB): $(OFILES)
$(OFILES): $(HFILES)
y.tab.c: $(YFILES)
y.tab.h: $(YFILES)
yacc $(YFLAGS) $(YFILES)
y.tab.c: y.tab.h
# do nothing
clean:
rm -f $(OFILES) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB)

View File

@ -3,7 +3,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
for i in 6l 6a 6c 6g gc cc ar db
for i in 6l 6a 6c 6g gc cc ar db nm acid
do
cd $i
make clean

View File

@ -33,9 +33,12 @@ $(LIB): $(OFILES)
$(OFILES): $(HFILES)
y.tab.c: $(YFILES)
y.tab.h: $(YFILES)
yacc $(YFLAGS) $(YFILES)
y.tab.c: y.tab.h
# do nothing
sysimport.c: sys.go mksys.bash
bash mksys.bash

View File

@ -3,6 +3,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
bash clean.bash
@ -11,47 +12,10 @@ bash mkenam
make enam.o
cd ..
echo; echo; echo %%%% making cc %%%%; echo
cd cc
make install
cd ..
echo; echo; echo %%%% making 6l %%%%; echo
cd 6l
make install
cd ..
echo; echo; echo %%%% making 6a %%%%; echo
cd 6a
make install
cd ..
echo; echo; echo %%%% making 6c %%%%; echo
cd 6c
make install
cd ..
echo; echo; echo %%%% making gc %%%%; echo
cd gc
make install
cd ..
echo; echo; echo %%%% making 6g %%%%; echo
cd 6g
make install
cd ..
echo; echo; echo %%%% making ar %%%%; echo
cd ar
make install
cd ..
echo; echo; echo %%%% making db %%%%; echo
cd db
make install
cd ..
echo; echo; echo %%%% making nm %%%%; echo
cd nm
make install
cd ..
for i in cc 6l 6a 6c gc 6g ar db nm acid
do
echo; echo; echo %%%% making $i %%%%; echo
cd $i
make install
cd ..
done

View File

@ -4,6 +4,8 @@
#!/bin/bash
set -e
echo; echo; echo %%%% making lib %%%%; echo
for i in os math

View File

@ -37,6 +37,11 @@ a3: $(O3)
a4: $(O4)
$(O)ar grc $(PKG) $(O4)
$(O1): nuke
$(O2): a1
$(O3): a2
$(O4): a3
nuke:
rm -f *.$(O) *.a $(PKG)

View File

@ -4,6 +4,8 @@
#!/bin/bash
set -e
make install
# old way: bash g1 && cp math.a $GOROOT/pkg/math.a

View File

@ -22,8 +22,11 @@ $(NET): $(NETO)
$(NETO): $(IP) $(SOCKET)
$(SOCKETO): $(IP)
$(SOCKET): $(SOCKETO)
$(O)ar grc $(SOCKET) $(SOCKETO)
rm $(SOCKETO)
$(GOROOT)/pkg/%.$O: %.$O
cp $*.$O $(GOROOT)/pkg/$*.$O

View File

@ -23,6 +23,9 @@ a1: $(O1)
a2: $(O2)
$(O)ar grc $(PKG) $(O2)
$(O1): nuke
$(O2): a1
nuke:
rm -f *.$(O) *.a $(PKG)

View File

@ -22,6 +22,9 @@ a1: $(O1)
a2: $(O2)
$(O)ar grc $(PKG) $(O2)
$(O1): nuke
$(O2): a1
nuke:
rm -f *.$(O) *.a $(PKG)

View File

@ -3,9 +3,12 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
export MAKEFLAGS=-j4
bash clean.bash
for i in lib9 libbio libmach_amd64
for i in lib9 libbio libmach_amd64 libregexp
do
cd $i
make install

View File

@ -4,6 +4,8 @@
#!/bin/bash
set -e
# clean
rm -f *.6 6.out test_integer

View File

@ -32,6 +32,9 @@ a2: $(O2)
$(O)ar grc $(PKG) $(O2)
rm *.6
$(O1): nuke
$(O2): a1
nuke:
rm -f *.$(O) *.a $(PKG)