-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
61 lines (55 loc) · 1.5 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
# $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
$(MAKE) -C installwatch
install: all
export
$(MAKE) -C installwatch install
mkdir -p $(BINDIR)
install checkinstall makepak $(BINDIR)
for file in locale/*.mo ; do \
LANG=`echo $$file | sed -e 's|locale/checkinstall-||' \
-e 's|\.mo||'` && \
mkdir -p $(LCDIR)/$${LANG}/LC_MESSAGES && \
cp $$file $(LCDIR)/$${LANG}/LC_MESSAGES/checkinstall.mo || \
exit 1 ; \
done
mkdir -p $(CONFDIR)
install -m644 checkinstallrc-dist $(CONFDIR)
if ! [ -f $(CONFDIR)/checkinstallrc ]; then \
cp $(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 ; do \
rm -f $${file} ; \
done
$(MAKE) -C installwatch clean