Commit 76036192 authored by Russ Cox's avatar Russ Cox

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
parent 899c5281
......@@ -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
......
......@@ -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
......
......@@ -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)
......
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -4,6 +4,8 @@
#!/bin/bash
set -e
echo; echo; echo %%%% making lib %%%%; echo
for i in os math
......
......@@ -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)
......
......@@ -4,6 +4,8 @@
#!/bin/bash
set -e
make install
# old way: bash g1 && cp math.a $GOROOT/pkg/math.a
......@@ -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
......
......@@ -23,6 +23,9 @@ a1: $(O1)
a2: $(O2)
$(O)ar grc $(PKG) $(O2)
$(O1): nuke
$(O2): a1
nuke:
rm -f *.$(O) *.a $(PKG)
......
......@@ -22,6 +22,9 @@ a1: $(O1)
a2: $(O2)
$(O)ar grc $(PKG) $(O2)
$(O1): nuke
$(O2): a1
nuke:
rm -f *.$(O) *.a $(PKG)
......
......@@ -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
......
......@@ -4,6 +4,8 @@
#!/bin/bash
set -e
# clean
rm -f *.6 6.out test_integer
......
......@@ -32,6 +32,9 @@ a2: $(O2)
$(O)ar grc $(PKG) $(O2)
rm *.6
$(O1): nuke
$(O2): a1
nuke:
rm -f *.$(O) *.a $(PKG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment