zfcpdump: Add HAVE_LIBC_STATIC check

For systems that do not have glibc-static installed, print the
following error message when building zfcpdump:

 s390-tools/zfcpdump # make
   REQCHK  zfcpdump (stdio.h)
 ****************************************************************
 * Missing build requirement for: zfcpdump                      *
 * Install package..............: glibc-static or libc-dev      *
 * You can skip build with......: make HAVE_LIBC_STATIC=0       *
 ****************************************************************

To allow the check add a new compiler/linker option to the "check_dep"
macro and do full compile/link instead of a simple compile.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
Michael Holzheu
2017-11-22 13:41:19 +01:00
parent 780133f825
commit 3908725d3b
3 changed files with 32 additions and 11 deletions
+22 -2
View File
@@ -2,7 +2,25 @@ include ../common.mak
CPIOINIT = $(call echocmd," CPIOINI ",/$@)./cpioinit
all: $(ZFCPDUMP_PART_RD)
ifeq (${HAVE_LIBC_STATIC},0)
all:
$(SKIP) HAVE_LIBC_STATIC=0
install:
$(SKIP) HAVE_LIBC_STATIC=0
else
check_dep:
$(call check_dep, \
"zfcpdump", \
"stdio.h", \
"glibc-static or libc-dev", \
"HAVE_LIBC_STATIC=0", \
"-static")
all: check_dep $(ZFCPDUMP_PART_RD)
cpioinit: cpioinit.c
$(HOSTCC) $(HOSTCFLAGS) -o $@ $^
@@ -19,7 +37,9 @@ $(ZFCPDUMP_PART_RD): cpioinit zfcpdump_part
install: all
$(INSTALL) -m 611 $(ZFCPDUMP_PART_RD) $(DESTDIR)$(ZFCPDUMP_DIR)
endif
clean:
rm -f *.o *.gz *.tmp *~ zfcpdump_part cpioinit $(ZFCPDUMP_PART_RD)
.PHONY: all clean install
.PHONY: all clean install check_dep