-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile.acr
81 lines (73 loc) · 2.99 KB
/
Makefile.acr
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
VPATH=@VPATH@
VERSION=@VERSION@
DESTDIR?=
INSTALL_SCRIPT?=@INSTALL_SCRIPT@
INSTALL_DATA?=@INSTALL_DATA@
INSTALL_MAN?=@INSTALL_DATA@
BINDIR=${DESTDIR}/@BINDIR@
MANDIR=${DESTDIR}/@MANDIR@
DATADIR=${DESTDIR}/@DATADIR@
VERSION=@VERSION@
.PHONY: all todo test install deinstall dist clean mrproper
all:
@echo void build
todo:
cat TODO
cat src/*.orig | grep -e TODO -e XXX
test:
cd tests/ && sh test.sh
install:
mkdir -p "$(BINDIR)"
sed -e 's,@''VERSION@,$(VERSION),g' "$(VPATH)/src/acr" > "$(BINDIR)/acr"
chmod +x "$(BINDIR)/acr"
sed -e 's,@''VERSION@,$(VERSION),g' "$(VPATH)/src/acr-cat" > "$(BINDIR)/acr-cat"
chmod +x "$(BINDIR)/acr-cat"
sed -e 's,@''VERSION@,$(VERSION),g' "$(VPATH)/src/acr-sh" > "$(BINDIR)/acr-sh"
chmod +x "$(BINDIR)/acr-sh"
$(INSTALL_SCRIPT) "$(VPATH)/src/amr" "$(BINDIR)/amr"
$(INSTALL_SCRIPT) "$(VPATH)/src/acr-wrap" "$(BINDIR)/acr-wrap"
$(INSTALL_SCRIPT) "$(VPATH)/src/acr-install" "$(BINDIR)/acr-install"
mkdir -p "$(MANDIR)/man1/" "$(MANDIR)/man5/"
${INSTALL_MAN} "$(VPATH)/man/man1/acr.1" "$(MANDIR)/man1/"
${INSTALL_MAN} "$(VPATH)/man/man1/acr-wrap.1" "$(MANDIR)/man1/"
${INSTALL_MAN} "$(VPATH)/man/man1/amr.1" "$(MANDIR)/man1/"
${INSTALL_MAN} "$(VPATH)/man/man1/acr-cat.1" "$(MANDIR)/man1/"
#${INSTALL_MAN} "${VPATH}/man/man1/install-acr.1 $(MANDIR)/man1/"
${INSTALL_MAN} "$(VPATH)/man/man5/configure.acr.5" "$(MANDIR)/man5/"
${INSTALL_MAN} "$(VPATH)/man/man5/configure.amr.5" "$(MANDIR)/man5/"
mkdir -p "$(DATADIR)/doc/acr/examples"
for A in `find "$(VPATH)/examples" -maxdepth 1 -type f`; do \
$(INSTALL_DATA) "$${A}" "$(DATADIR)/doc/acr/examples" ; done
mkdir -p "$(DATADIR)/doc/acr/developers"
for A in `find "$(VPATH)/doc" -maxdepth 1 -type f`; do \
$(INSTALL_DATA) "$${A}" "$(DATADIR)/doc/acr" ; done
for A in `find "$(VPATH)/doc/developers" -maxdepth 1 -type f`; do \
$(INSTALL_DATA) "$${A}" "$(DATADIR)/doc/acr/developers" ; done
mkdir -p "$(DATADIR)/doc/acr/vim/ftplugin"
mkdir -p "$(DATADIR)/doc/acr/vim/syntax"
$(INSTALL_SCRIPT) "$(VPATH)/src/vim/install.sh" "$(DATADIR)/doc/acr/vim/install.sh"
$(INSTALL_DATA) "$(VPATH)/src/vim/ftplugin/acr.vim" "$(DATADIR)/doc/acr/vim/ftplugin/acr.vim"
$(INSTALL_DATA) "$(VPATH)/src/vim/syntax/acr.vim" "$(DATADIR)/doc/acr/vim/syntax/acr.vim"
$(INSTALL_DATA) "$(VPATH)/src/vim/vimrc" "$(DATADIR)/doc/acr/vim/vimrc"
mkdir -p "$(DATADIR)/acr/modules/"
-$(INSTALL_DATA) "$(VPATH)/modules"/* "$(DATADIR)/acr/modules/"
uninstall deinstall:
-rm -f $(BINDIR)/acr-sh $(BINDIR)/acr $(BINDIR)/amr
-rm -f $(BINDIR)/acr-cat $(BINDIR)/acr-install
-rm -f $(BINDIR)/acr-wrap
-rm -f $(MANDIR)/man1/acr.1 $(MANDIR)/man5/configure.acr.5
-rm -f $(MANDIR)/man1/acr-cat.1 $(MANDIR)/man1/amr.1
-rm -f $(MANDIR)/man1/acr-wrap.1
-rm -f $(MANDIR)/man5/configure.amr.5
-rm -rf $(DATADIR)/doc/acr/examples $(DATADIR)/doc/acr
-rm -rf $(DATADIR)/acr
dist:
rm -rf acr-$(VERSION)
git clone . acr-$(VERSION)
rm -rf acr-$(VERSION)/.git
tar czvf acr-$(VERSION).tar.gz acr-$(VERSION)
clean:
rm -f src/vim/install.sh
rm -f Makefile
mrproper: clean
rm -f configure