[go: up one dir, main page]

File: Makefile

package info (click to toggle)
s390-tools 2.3.0-2~deb10u1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 6,188 kB
  • sloc: ansic: 87,755; sh: 8,398; cpp: 8,384; perl: 3,783; makefile: 1,476; asm: 654
file content (65 lines) | stat: -rw-r--r-- 2,001 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#==============================================================================
# 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) ARCH=$(ARCH) $(goal) ;)
.PHONY: $(SUB_DIRS)

.PHONY: all install clean install-scripts install-manpages install-usrsbin-scripts