summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2008-09-18 15:06:43 -0700
committerRuss Cox <rsc@golang.org>2008-09-18 15:06:43 -0700
commit576747d0f9d9bcffd228fa69542da9caf5a91b79 (patch)
tree630f7c28e6159848a87164cf9be53cca1c985b5b /src
parentca9a8d591e52bf6f5a4f3f3f25657224d27ea54d (diff)
downloadgolang-576747d0f9d9bcffd228fa69542da9caf5a91b79.tar.gz
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
Diffstat (limited to 'src')
-rwxr-xr-xsrc/clean.bash2
-rw-r--r--src/cmd/6a/Makefile5
-rw-r--r--src/cmd/cc/Makefile5
-rw-r--r--src/cmd/clean.bash2
-rw-r--r--src/cmd/gc/Makefile5
-rw-r--r--src/cmd/make.bash52
-rwxr-xr-xsrc/lib/make.bash2
-rw-r--r--src/lib/math/Makefile5
-rw-r--r--src/lib/math/make.bash2
-rw-r--r--src/lib/net/Makefile3
-rw-r--r--src/lib/os/Makefile3
-rw-r--r--src/lib/time/Makefile3
-rwxr-xr-xsrc/make.bash5
-rw-r--r--src/pkg/make.bash2
-rw-r--r--src/syscall/Makefile3
15 files changed, 49 insertions, 50 deletions
diff --git a/src/clean.bash b/src/clean.bash
index dd727ac60..cba2129cf 100755
--- a/src/clean.bash
+++ b/src/clean.bash
@@ -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
diff --git a/src/cmd/6a/Makefile b/src/cmd/6a/Makefile
index be34e99d3..d4bfd210c 100644
--- a/src/cmd/6a/Makefile
+++ b/src/cmd/6a/Makefile
@@ -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
diff --git a/src/cmd/cc/Makefile b/src/cmd/cc/Makefile
index 5d21241c4..4247a8b97 100644
--- a/src/cmd/cc/Makefile
+++ b/src/cmd/cc/Makefile
@@ -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)
diff --git a/src/cmd/clean.bash b/src/cmd/clean.bash
index e516e872c..3537b835c 100644
--- a/src/cmd/clean.bash
+++ b/src/cmd/clean.bash
@@ -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
diff --git a/src/cmd/gc/Makefile b/src/cmd/gc/Makefile
index 9c3f2e977..4a7445a91 100644
--- a/src/cmd/gc/Makefile
+++ b/src/cmd/gc/Makefile
@@ -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
diff --git a/src/cmd/make.bash b/src/cmd/make.bash
index 84332440d..be8df7600 100644
--- a/src/cmd/make.bash
+++ b/src/cmd/make.bash
@@ -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
diff --git a/src/lib/make.bash b/src/lib/make.bash
index 6537f0164..5714954fa 100755
--- a/src/lib/make.bash
+++ b/src/lib/make.bash
@@ -4,6 +4,8 @@
#!/bin/bash
+set -e
+
echo; echo; echo %%%% making lib %%%%; echo
for i in os math
diff --git a/src/lib/math/Makefile b/src/lib/math/Makefile
index f1f24263c..f66cc4161 100644
--- a/src/lib/math/Makefile
+++ b/src/lib/math/Makefile
@@ -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)
diff --git a/src/lib/math/make.bash b/src/lib/math/make.bash
index cdc9a9268..66062b3fa 100644
--- a/src/lib/math/make.bash
+++ b/src/lib/math/make.bash
@@ -4,6 +4,8 @@
#!/bin/bash
+set -e
+
make install
# old way: bash g1 && cp math.a $GOROOT/pkg/math.a
diff --git a/src/lib/net/Makefile b/src/lib/net/Makefile
index 5d0802173..4788e84e1 100644
--- a/src/lib/net/Makefile
+++ b/src/lib/net/Makefile
@@ -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
diff --git a/src/lib/os/Makefile b/src/lib/os/Makefile
index 16b803031..130f62c86 100644
--- a/src/lib/os/Makefile
+++ b/src/lib/os/Makefile
@@ -23,6 +23,9 @@ a1: $(O1)
a2: $(O2)
$(O)ar grc $(PKG) $(O2)
+$(O1): nuke
+$(O2): a1
+
nuke:
rm -f *.$(O) *.a $(PKG)
diff --git a/src/lib/time/Makefile b/src/lib/time/Makefile
index f0a6f132e..d397be1f3 100644
--- a/src/lib/time/Makefile
+++ b/src/lib/time/Makefile
@@ -22,6 +22,9 @@ a1: $(O1)
a2: $(O2)
$(O)ar grc $(PKG) $(O2)
+$(O1): nuke
+$(O2): a1
+
nuke:
rm -f *.$(O) *.a $(PKG)
diff --git a/src/make.bash b/src/make.bash
index 5eeb370a1..b36d515a8 100755
--- a/src/make.bash
+++ b/src/make.bash
@@ -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
diff --git a/src/pkg/make.bash b/src/pkg/make.bash
index 71d6ccd02..3efc5a86c 100644
--- a/src/pkg/make.bash
+++ b/src/pkg/make.bash
@@ -4,6 +4,8 @@
#!/bin/bash
+set -e
+
# clean
rm -f *.6 6.out test_integer
diff --git a/src/syscall/Makefile b/src/syscall/Makefile
index 6c30d0c3e..a34c96adf 100644
--- a/src/syscall/Makefile
+++ b/src/syscall/Makefile
@@ -32,6 +32,9 @@ a2: $(O2)
$(O)ar grc $(PKG) $(O2)
rm *.6
+$(O1): nuke
+$(O2): a1
+
nuke:
rm -f *.$(O) *.a $(PKG)