-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
63 lines (57 loc) · 1.63 KB
/
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
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
# $Id: Makefile,v 1.6.2.1 2008/11/09 07:48:18 izto Exp $
# Where to install.
PREFIX=/usr/local
BINDIR=$(PREFIX)/sbin
LCDIR=$(PREFIX)/lib/checkinstall/locale
CONFDIR=$(PREFIX)/lib/checkinstall
all:
for file in locale/checkinstall-*.po ; do \
case $${file} in \
locale/checkinstall-template.po) ;; \
*) \
out=`echo $$file | sed -s 's/po/mo/'` ; \
msgfmt -o $${out} $${file} ; \
if [ $$? != 0 ] ; then \
exit 1 ; \
fi ; \
;; \
esac ; \
done
sed 's%MAKEFILE_PREFIX%$(PREFIX)%g' checkinstall.in > checkinstall
$(MAKE) -C installwatch
install: all
export
$(MAKE) -C installwatch install
mkdir -p $(BINDIR)
mkdir -p $(LCDIR)
install -m 0755 -o root -g root checkinstall makepak $(BINDIR)
for file in locale/*.mo ; do \
CKLNG=`echo $$file | sed -e 's|locale/checkinstall-||' \
-e 's|\.mo||'` && \
mkdir -p $(LCDIR)/$${CKLNG}/LC_MESSAGES && \
cp $$file $(LCDIR)/$${CKLNG}/LC_MESSAGES/checkinstall.mo || \
exit 1 ; \
done
mkdir -p $(CONFDIR)
install -m644 checkinstallrc-dist $(CONFDIR)
@if ! [ -f $(CONFDIR)/checkinstallrc ]; then \
mv $(CONFDIR)/checkinstallrc-dist $(CONFDIR)/checkinstallrc; \
else \
echo; \
echo; \
echo ======================================================== ;\
echo; \
echo An existing checkinstallrc file has been found. ;\
echo The one from this distribution can be found at: ; \
echo; \
echo -e \\t$(CONFDIR)/checkinstallrc-dist ; \
echo; \
echo; \
echo ======================================================== ;\
echo; \
fi
clean:
for file in locale/checkinstall-*.mo checkinstall ; do \
rm -f $${file} ; \
done
$(MAKE) -C installwatch clean