Files
s390-tools/zconf/Makefile
Marc Hartmayer 0c1a5069d9 Rename ARCH to HOST_ARCH
Use a common naming convention for the variable [1][2][3]. In an
upcoming patch the Makefile variable `BUILD_ARCH` will be introduced.

[1] https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html
[2] https://docs.yoctoproject.org/ref-manual/variables.html#term-HOST_ARCH
[3] https://mesonbuild.com/Cross-compilation.html#cross-compilation

Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Reviewed-by: Benjamin Block <bblock@linux.ibm.com>
Reviewed-by: Jan Höppner <hoeppner@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2023-05-30 13:31:53 +02:00

66 lines
2.0 KiB
Makefile

#==============================================================================
# Makefile for zSeries configuration utilities.
#==============================================================================
include ../common.mak
SCRIPTS = lsdasd lstape chccwdev lszfcp cio_ignore znetconf dasdstat
USRSBIN_SCRIPTS = lsluns
MANPAGES= lsdasd.8 lstape.8 chccwdev.8 lszfcp.8 lsluns.8 \
cio_ignore.8 znetconf.8 dasdstat.8
SUB_DIRS = zcrypt scm chp css qeth
all: $(SUB_DIRS)
clean: $(SUB_DIRS)
install: install-scripts install-manpages install-usrsbin-scripts $(SUB_DIRS)
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 lsznet.raw \
$(DESTDIR)$(TOOLS_LIBDIR)
$(INSTALL) -g $(GROUP) -o $(OWNER) -m 755 znetcontrolunits \
$(DESTDIR)$(TOOLS_LIBDIR)
install-scripts: $(SCRIPTS)
@for i in $^; do \
cat $$i | \
sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(BINDIR)/$$i; \
chown $(OWNER):$(GROUP) $(DESTDIR)$(BINDIR)/$$i; \
chmod 755 $(DESTDIR)$(BINDIR)/$$i; \
done
install-usrsbin-scripts: $(USRSBIN_SCRIPTS)
@for i in $^; do \
cat $$i | \
sed -e 's/%S390_TOOLS_VERSION%/$(S390_TOOLS_RELEASE)/' \
>$(DESTDIR)$(USRSBINDIR)/$$i; \
chown $(OWNER):$(GROUP) $(DESTDIR)$(USRSBINDIR)/$$i; \
chmod 755 $(DESTDIR)$(USRSBINDIR)/$$i; \
done
install-manpages: $(MANPAGES)
@if [ ! -d $(DESTDIR)$(MANDIR) ]; then \
mkdir -p $(DESTDIR)$(MANDIR)/man8; \
chown $(OWNER):$(GROUP) $(DESTDIR)$(MANDIR); \
chown $(OWNER):$(GROUP) $(DESTDIR)$(MANDIR)/man8; \
chmod 755 $(DESTDIR)$(MANDIR); \
chmod 755 $(DESTDIR)$(MANDIR)/man8; \
fi; \
for i in $^; do \
install -o $(OWNER) -g $(GROUP) -m 644 $$i $(DESTDIR)$(MANDIR)/man8; \
done
#
# For simple "make" we explicitly set the MAKECMDGOALS to "all".
#
ifeq ($(MAKECMDGOALS),)
MAKECMDGOALS = all
endif
$(SUB_DIRS):
$(foreach goal,$(MAKECMDGOALS), \
$(MAKE) -C $@ TOPDIR=$(TOPDIR) HOST_ARCH=$(HOST_ARCH) $(goal) ;)
.PHONY: $(SUB_DIRS)
.PHONY: all install clean install-scripts install-manpages install-usrsbin-scripts