Files
s390-tools/zipl/dracut/Makefile
Benjamin Block 71461d80bf Makefile: use common Make definition for DRACUTDIR
The dracut installation directory is referenced from `chreipl-fcp-mpath`,
`zdev`, and `zipl`; in each with its own individual definition and
variable name. This makes it unnecessarily hard to change it when
installing from the top level directory of s390-tools and passing
variable overwrites via the command line.

Fix this by defining a common `DRACUTDIR` variable in the shared
`common.mak` file, and referencing this in each tool as base directory.
With this a user can simply pass `DRACUTDIR=/foo/bar/baz` on the
commandline and change the installation for all three tools.

Further, also derive common `DRACUTCONFDIR` and `DRACUTMODDIR` variables
from `DRACUTDIR` in `common.mak`, so that `zdev` and `zipl` don't use
different variable names for the same directory anymore, and all these
are defined together in a common place.

Semantically nothing changes for a default build/installation.

Signed-off-by: Benjamin Block <bblock@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
2022-08-16 18:28:21 +02:00

30 lines
1002 B
Makefile

include ../../common.mak
NGDUMPDIR := 99ngdump
# HAVE_DRACUT
#
# This install time parameter determines whether the ngdump dracut module is
# installed (HAVE_DRACUT=1) or not (default). When installed, the module
# performs the following functions when dracut is run:
#
# - install the systemd service that initiates the dump at boot
# - install the dump script that is run by the new systemd service at boot
#
ifeq ($(HAVE_DRACUT),1)
install:
$(INSTALL) -m 755 zipl_helper.prepare-ngdump \
$(DESTDIR)$(TOOLS_LIBDIR)
$(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/
$(INSTALL) -m 755 -d $(DESTDIR)$(DRACUTMODDIR)/$(NGDUMPDIR)
$(INSTALL) -m 755 $(NGDUMPDIR)/module-setup.sh \
$(DESTDIR)$(DRACUTMODDIR)/$(NGDUMPDIR)/
$(INSTALL) -m 644 $(NGDUMPDIR)/ngdump.service \
$(DESTDIR)$(DRACUTMODDIR)/$(NGDUMPDIR)/
$(INSTALL) -m 755 $(NGDUMPDIR)/ngdump.sh \
$(DESTDIR)$(DRACUTMODDIR)/$(NGDUMPDIR)/
$(INSTALL) -m 755 $(NGDUMPDIR)/ngdump-reipl.sh \
$(DESTDIR)$(DRACUTMODDIR)/$(NGDUMPDIR)/
endif