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/
includes:
cd include && $(MAKE) includes
cd lib && $(MAKE) includes
$(MAKE) -C include includes
$(MAKE) -C lib includes
libraries:
cd lib && sh ack_build.sh obj depend all install
libraries: includes
$(MAKE) -C lib build_ack
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
@ -51,43 +51,43 @@ gnu-includes: includes
SHELL=/bin/sh; if [ -f $(MKHEADERS411) ] ; then sh -e $(MKHEADERS411) ; fi
SHELL=/bin/sh; if [ -f $(MKHEADERS443) ] ; then sh -e $(MKHEADERS443) ; fi
gnu-libraries:
cd lib && sh gnu_build.sh obj depend all install
gnu-libraries: includes
$(MAKE) -C lib build_gnu
commands:
cd commands && $(MAKE) all
commands: includes libraries
$(MAKE) -C commands all
depend::
cd boot && $(MAKE) depend
cd commands && $(MAKE) depend
cd kernel && $(MAKE) depend
cd servers && $(MAKE) depend
cd drivers && $(MAKE) depend
$(MAKE) -C boot depend
$(MAKE) -C commands depend
$(MAKE) -C kernel depend
$(MAKE) -C servers depend
$(MAKE) -C drivers depend
etcfiles::
cd etc && $(MAKE) install
$(MAKE) -C etc install
all::
cd boot && $(MAKE) all
cd commands && $(MAKE) all
cd tools && $(MAKE) all
$(MAKE) -C boot all
$(MAKE) -C commands all
$(MAKE) -C tools all
install::
cd boot && $(MAKE) install
cd man && $(MAKE) install makedb
cd commands && $(MAKE) install
cd share && $(MAKE) install
cd tools && $(MAKE) install
$(MAKE) -C boot install
$(MAKE) -C man install makedb
$(MAKE) -C commands install
$(MAKE) -C share install
$(MAKE) -C tools install
clean::
cd boot && $(MAKE) clean
cd commands && $(MAKE) clean
cd tools && $(MAKE) clean
cd lib && sh ack_build.sh clean
cd lib && sh gnu_build.sh clean
cd test && $(MAKE) clean
$(MAKE) -C boot clean
$(MAKE) -C commands clean
$(MAKE) -C tools clean
$(MAKE) -C lib clean_gnu
$(MAKE) -C lib clean_ack
$(MAKE) -C test clean
cleandepend::
cd boot && $(MAKE) cleandepend
cd commands && $(MAKE) cleandepend
cd tools && $(MAKE) cleandepend
$(MAKE) -C boot cleandepend
$(MAKE) -C commands cleandepend
$(MAKE) -C tools cleandepend

View file

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

View file

@ -8,3 +8,15 @@ SUBDIR+= ack/libd ack/libe ack/libfp ack/liby
.endif
.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
clean:
cd select && make clean
$(MAKE) -C select clean
-rm -rf *.o *.s *.bak test? test?? test??-gcc t10a t11a t11b \
t40a t40b t40c t40d t40e t40f t43 DIR*

View file

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

View file

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