cd subdir && $(MAKE) targets -> $(MAKE) -C subdir targets

- first step towards parallel building
This commit is contained in:
Tomas Hruby 2010-06-22 12:03:09 +00:00
parent 3eed5d3bdb
commit 21725c107d
6 changed files with 82 additions and 70 deletions

View file

@ -39,11 +39,11 @@ mkfiles:
cp etc/mk/*.mk /etc/mk/ cp etc/mk/*.mk /etc/mk/
includes: includes:
cd include && $(MAKE) includes $(MAKE) -C include includes
cd lib && $(MAKE) includes $(MAKE) -C lib includes
libraries: libraries: includes
cd lib && sh ack_build.sh obj depend all install $(MAKE) -C lib build_ack
MKHEADERS411=/usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/install-tools/mkheaders MKHEADERS411=/usr/gnu/libexec/gcc/i386-pc-minix/4.1.1/install-tools/mkheaders
MKHEADERS443=/usr/gnu/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders MKHEADERS443=/usr/gnu/libexec/gcc/i686-pc-minix/4.4.3/install-tools/mkheaders
@ -51,43 +51,43 @@ gnu-includes: includes
SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi
SHELL=/bin/sh; if [ -f $(MKHEADERS443) ] ; then sh -e $(MKHEADERS443) ; fi SHELL=/bin/sh; if [ -f $(MKHEADERS443) ] ; then sh -e $(MKHEADERS443) ; fi
gnu-libraries: gnu-libraries: includes
cd lib && sh gnu_build.sh obj depend all install $(MAKE) -C lib build_gnu
commands: commands: includes libraries
cd commands && $(MAKE) all $(MAKE) -C commands all
depend:: depend::
cd boot && $(MAKE) depend $(MAKE) -C boot depend
cd commands && $(MAKE) depend $(MAKE) -C commands depend
cd kernel && $(MAKE) depend $(MAKE) -C kernel depend
cd servers && $(MAKE) depend $(MAKE) -C servers depend
cd drivers && $(MAKE) depend $(MAKE) -C drivers depend
etcfiles:: etcfiles::
cd etc && $(MAKE) install $(MAKE) -C etc install
all:: all::
cd boot && $(MAKE) all $(MAKE) -C boot all
cd commands && $(MAKE) all $(MAKE) -C commands all
cd tools && $(MAKE) all $(MAKE) -C tools all
install:: install::
cd boot && $(MAKE) install $(MAKE) -C boot install
cd man && $(MAKE) install makedb $(MAKE) -C man install makedb
cd commands && $(MAKE) install $(MAKE) -C commands install
cd share && $(MAKE) install $(MAKE) -C share install
cd tools && $(MAKE) install $(MAKE) -C tools install
clean:: clean::
cd boot && $(MAKE) clean $(MAKE) -C boot clean
cd commands && $(MAKE) clean $(MAKE) -C commands clean
cd tools && $(MAKE) clean $(MAKE) -C tools clean
cd lib && sh ack_build.sh clean $(MAKE) -C lib clean_gnu
cd lib && sh gnu_build.sh clean $(MAKE) -C lib clean_ack
cd test && $(MAKE) clean $(MAKE) -C test clean
cleandepend:: cleandepend::
cd boot && $(MAKE) cleandepend $(MAKE) -C boot cleandepend
cd commands && $(MAKE) cleandepend $(MAKE) -C commands cleandepend
cd tools && $(MAKE) cleandepend $(MAKE) -C tools cleandepend

View file

@ -29,73 +29,73 @@ at_wini: ../at_wini/at_wini
install -s ../$@/$@ $@ install -s ../$@/$@ $@
../at_wini/at_wini: ../at_wini/at_wini:
cd ../at_wini && make $(MAKE) -C ../at_wini
bios_wini: ../bios_wini/bios_wini bios_wini: ../bios_wini/bios_wini
install -s ../$@/$@ $@ install -s ../$@/$@ $@
../bios_wini/bios_wini: ../bios_wini/bios_wini:
cd ../bios_wini && make $(MAKE) -C ../bios_wini
floppy: ../floppy/floppy floppy: ../floppy/floppy
install -s ../$@/$@ $@ install -s ../$@/$@ $@
../floppy/floppy: ../floppy/floppy:
cd ../floppy && make $(MAKE) -C ../floppy
pci: ../pci/pci pci: ../pci/pci
install -s ../$@/$@ $@ install -s ../$@/$@ $@
../pci/pci: ../pci/pci:
cd ../pci && make $(MAKE) -C ../pci
cdprobe: ../../commands/cdprobe/cdprobe cdprobe: ../../commands/cdprobe/cdprobe
install -s ../../commands/$@/$@ $@ install -s ../../commands/$@/$@ $@
../../commands/cdprobe: ../../commands/cdprobe:
cd ../../commands/cdprobe && make $(MAKE) -C ../../commands/cdprobe
dev2name: ../../commands/dev2name/dev2name dev2name: ../../commands/dev2name/dev2name
install -s ../../commands/$@/$@ $@ install -s ../../commands/$@/$@ $@
../../commands/dev2name/dev2name: ../../commands/dev2name/dev2name:
cd ../../commands/dev2name && make $(MAKE) -C ../../commands/dev2name
loadramdisk: ../../commands/loadramdisk/loadramdisk loadramdisk: ../../commands/loadramdisk/loadramdisk
install -s ../../commands/$@/$@ $@ install -s ../../commands/$@/$@ $@
../../commands/loadramdisk/loadramdisk: ../../commands/loadramdisk/loadramdisk:
cd ../../commands/loadramdisk && make $(MAKE) -C ../../commands/loadramdisk
newroot: ../../commands/newroot/newroot newroot: ../../commands/newroot/newroot
install -s ../../commands/$@/$@ $@ install -s ../../commands/$@/$@ $@
../../commands/newroot/newroot: ../../commands/newroot/newroot:
cd ../../commands/newroot && make $(MAKE) -C ../../commands/newroot
sysenv: ../../commands/sysenv/sysenv sysenv: ../../commands/sysenv/sysenv
install -s ../../commands/$@/$@ $@ install -s ../../commands/$@/$@ $@
../../commands/sysenv: ../../commands/sysenv:
cd ../../commands/sysenv && make $(MAKE) -C ../../commands/sysenv
sh: ../../commands/ash/sh sh: ../../commands/ash/sh
install -s ../../commands/ash/$@ $@ install -s ../../commands/ash/$@ $@
../../commands/ash/sh: ../../commands/ash/sh:
cd ../../commands/ash && make sh $(MAKE) -C ../../commands/ash sh
service: ../../commands/service/service service: ../../commands/service/service
install -s ../../commands/service/$@ $@ install -s ../../commands/service/$@ $@
../../commands/service: ../../commands/service:
cd ../../commands/service && make $(MAKE) -C ../../commands/service
mfs: ../../servers/mfs/mfs mfs: ../../servers/mfs/mfs
install -s ../../servers/mfs/$@ $@ install -s ../../servers/mfs/$@ $@
../../servers/mfs/mfs: ../../servers/mfs/mfs:
cd ../../servers/mfs && make $(MAKE) -C ../../servers/mfs
system.conf: ../../etc/system.conf system.conf: ../../etc/system.conf
install -s ../../etc/$@ $@ install -s ../../etc/$@ $@

View file

@ -8,3 +8,15 @@ SUBDIR+= ack/libd ack/libe ack/libfp ack/liby
.endif .endif
.include <minix.subdir.mk> .include <minix.subdir.mk>
build_ack:
sh ack_build.sh obj depend all install
build_gnu:
sh gnu_build.sh obj depend all install
clean_ack:
sh ack_build.sh clean
clean_gnu:
sh gnu_build.sh clean

View file

@ -39,7 +39,7 @@ $(ROOTOBJ):
@rm a.out @rm a.out
clean: clean:
cd select && make clean $(MAKE) -C select clean
-rm -rf *.o *.s *.bak test? test?? test??-gcc t10a t11a t11b \ -rm -rf *.o *.s *.bak test? test?? test??-gcc t10a t11a t11b \
t40a t40b t40c t40d t40e t40f t43 DIR* t40a t40b t40c t40d t40e t40f t43 DIR*

View file

@ -17,15 +17,15 @@
# #
all test clean: all test clean:
# cd ./msgctl && $(MAKE) $@ # $(MAKE) -C ./msgctl $@
# cd ./msgget && $(MAKE) $@ # $(MAKE) -C ./msgget $@
# cd ./msgrcv && $(MAKE) $@ # $(MAKE) -C ./msgrcv $@
# cd ./msgsnd && $(MAKE) $@ # $(MAKE) -C ./msgsnd $@
cd ./semctl && $(MAKE) $@ $(MAKE) -C ./semctl $@
cd ./semget && $(MAKE) $@ $(MAKE) -C ./semget $@
cd ./semop && $(MAKE) $@ $(MAKE) -C ./semop $@
cd ./shmat && $(MAKE) $@ $(MAKE) -C ./shmat $@
cd ./shmctl && $(MAKE) $@ $(MAKE) -C ./shmctl $@
cd ./shmdt && $(MAKE) $@ $(MAKE) -C ./shmdt $@
cd ./shmget && $(MAKE) $@ $(MAKE) -C ./shmget $@
cd ./shmt && $(MAKE) $@ $(MAKE) -C ./shmt $@

View file

@ -43,22 +43,22 @@ usage:
all: services image all: services image
image: includes image: includes
cd ../kernel && $(MAKE) $(MAKE) -C ../kernel
cd ../servers && $(MAKE) all $(MAKE) -C ../servers all
cd ../drivers && $(MAKE) all $(MAKE) -C ../drivers all
installboot -image $@ $(PROGRAMS) installboot -image $@ $(PROGRAMS)
# rebuild the program or system libraries # rebuild the program or system libraries
includes: includes:
cd .. && $(MAKE) includes $(MAKE) -C .. includes
depend: includes depend: includes
cd ../ && $(MAKE) depend $(MAKE) -C ../ depend
services: includes services: includes
cd ../kernel && $(MAKE) $(MAKE) -C ../kernel
cd ../servers && $(MAKE) install $(MAKE) -C ../servers install
cd ../drivers && $(MAKE) install $(MAKE) -C ../drivers install
libraries: includes libraries: includes
cd ../lib && sh ack_build.sh clean obj depend all install cd ../lib && sh ack_build.sh clean obj depend all install
@ -79,12 +79,12 @@ install: includes services hdboot
# clean up compile results # clean up compile results
clean: clean:
cd ../kernel && $(MAKE) $@ $(MAKE) -C ../kernel $@
cd ../servers && $(MAKE) $@ $(MAKE) -C ../servers $@
cd ../drivers && $(MAKE) $@ $(MAKE) -C ../drivers $@
rm -rf *.bak image *.iso *.iso.gz cdfdimage rootimage src rm -rf *.bak image *.iso *.iso.gz cdfdimage rootimage src
cleandepend:: cleandepend::
cd ../kernel && $(MAKE) $@ $(MAKE) -C ../kernel $@
cd ../servers && $(MAKE) $@ $(MAKE) -C ../servers $@
cd ../drivers && $(MAKE) $@ $(MAKE) -C ../drivers $@