Makefile: Fix parallel build (2nd try)

Commit 851f685993 ("Makefile: Add dependency between libvmcp and
libutil to fix -j builds") introduced the following regression

  $ make clean
  CLEAN   /home2/holzheu/src/s390-tools
  ...
  CLEAN   libccw
  CC      libutil/util_base.o
  CC      libutil/util_path.o

For the "clean" target the new library dependency triggers a build
of libutil.

So remove the dependency again.

To fix the parallel build issue, no longer build the examples with
"make all" and add a new target "examples" that can now be used for building
the example programs.

Fixes: 851f685993 ("Makefile: Add dependency between libvmcp and libutil to fix -j builds")
Signed-off-by: Michael Holzheu <holzheu@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Michael Holzheu
2018-11-29 12:38:23 +01:00
committed by Jan Höppner
parent 4951044213
commit 8cbdfebc4f
3 changed files with 4 additions and 5 deletions

View File

@@ -343,9 +343,6 @@ $(rootdir)/libvmcp/libvmcp.a: $(rootdir)/libvmcp
$(MAKE) -C $(rootdir)/libvmcp/ libvmcp.a
.PHONY: $(rootdir)/libvmcp
# Dependencies between libraries
$(rootdir)/libvmcp: $(rootdir)/libutil/libutil.a
$(rootdir)/zipl/boot/data.o:
$(MAKE) -C $(rootdir)/zipl/boot/ data.o

View File

@@ -13,7 +13,8 @@ examples = util_base_example \
util_prg_example \
util_rec_example
all: $(lib) $(examples)
all: $(lib)
examples: $(lib) $(examples)
objects = util_base.o \
util_path.o \

View File

@@ -4,7 +4,8 @@ lib = libvmcp.a
examples = vmcp_example
all: $(lib) $(examples)
all: $(lib)
examples: $(lib) $(examples)
objects = vmcp.o