diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2012-07-04 10:12:30 +0100 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2012-07-09 14:04:04 +0100 |
commit | aab0fcb8ae7386475598fd2bef887cf0f9f3b65a (patch) | |
tree | 0e870806daf521177b370ce917b4680e10f10c02 /Makefile | |
parent | 47c9a2a0db829711d4bd6959122400fe85548b83 (diff) | |
download | btrfs-progs-aab0fcb8ae7386475598fd2bef887cf0f9f3b65a.tar.gz |
MAKEFILE: Fix parallelism capability
Fix the parallelism capability of the Makefile by ensuring that
version.h is built appropriately.
Without this change, version.sh is run in parallel with compiles which
can fail as a result.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -30,10 +30,24 @@ endif $(check) $< $(CC) $(DEPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c $< +MAKE:=$(MAKE) --no-print-directory -all: version $(progs) manpages +ifeq ($(SUB),) -version: +.DEFAULT_GOAL := all + +clean: + @$(MAKE) SUB=1 $@ + +%: + @$(MAKE) SUB=1 version + @$(MAKE) SUB=1 $@ + +else + +all: $(progs) manpages + +version: version.sh bash version.sh btrfs: $(objects) btrfs.o btrfs_cmds.o scrub.o @@ -114,3 +128,5 @@ install: $(progs) install-man if [ -e btrfs-convert ]; then $(INSTALL) btrfs-convert $(DESTDIR)$(bindir); fi -include .*.d + +endif |