forked from kalbasit/MultiWmXinitrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
38 lines (31 loc) · 875 Bytes
/
Makefile
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
VERSION=1.0
prefix=/usr/local
bindir=$(prefix)/bin
libdir=$(prefix)/lib
sharedir=$(prefix)/share
bashlibdir=$(libdir)/bash
INSTALL=install
MAKE=make
all: targets;
targets: make-bin-targets make-lib-targets
sed -e "s:@VERSION@:$(VERSION):g" \
-e "s:@BASHLIBDIR@:$(bashlibdir):g" \
Xinitrc.in > Xinitrc
make-bin-targets:
sed -e "s:\(VERSION=\).*:\1$(VERSION):g" bin/Makefile.in > bin/Makefile
$(MAKE) -C bin targets
make-lib-targets:
$(MAKE) -C lib targets
install:
$(INSTALL) -d -m 755 $(DESTDIR)$(bindir)
$(INSTALL) -d -m 755 $(DESTDIR)$(sharedir)
$(INSTALL) -d -m 755 $(DESTDIR)$(bashlibdir)
$(INSTALL) -m 644 Xinitrc $(DESTDIR)$(sharedir)/Xinitrc
$(MAKE) -C bin install
$(MAKE) -C lib install
clean:
sed -e "s:\(VERSION=\).*:\1$(VERSION):g" bin/Makefile.in > bin/Makefile
$(MAKE) -C bin clean
$(MAKE) -C lib clean
rm -f Xinitrc
rm -f bin/Makefile