-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathMakefile
125 lines (107 loc) · 4.95 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#*=====================================================================*/
#* serrano/prgm/project/bigloo/bigloo/api/text/Makefile */
#* ------------------------------------------------------------- */
#* Author : Manuel Serrano */
#* Creation : Wed Oct 3 05:37:54 2001 */
#* Last change : Tue Mar 24 12:21:54 2020 (serrano) */
#* Copyright : 2001-20 Manuel Serrano */
#* ------------------------------------------------------------- */
#* This Makefile *requires* GNU-Make. */
#* ------------------------------------------------------------- */
#* The Makefile for Text */
#*=====================================================================*/
include ../../Makefile.buildconfig
include ../../Makefile.config
#*---------------------------------------------------------------------*/
#* The name of the API (used by Makefile.api). */
#*---------------------------------------------------------------------*/
API = text
#*---------------------------------------------------------------------*/
#* Directories where to find the files composing a revision */
#*---------------------------------------------------------------------*/
POPDIR = src
POPULATION = Makefile README \
data/gb2312.sch data/en-hyphens.sch data/fr-hyphens.sch
#*---------------------------------------------------------------------*/
#* all */
#*---------------------------------------------------------------------*/
all: boot build
boot: build
build:
@ $(MAKE) build-c && $(MAKE) build-jvm
c: build-c
jvm: build-jvm
build-c:
@ if [ "$(NATIVEBACKEND)" = "yes" ]; then \
echo "[0m[1;32m>>> C[0m"; \
(cd src && $(MAKE) build-c); \
fi
build-jvm:
@ if [ "$(JVMBACKEND)" = "yes" ]; then \
echo "[0m[1;31m>>> JVM[0m"; \
(cd src && $(MAKE) build-jvm); \
fi
#*---------------------------------------------------------------------*/
#* pop */
#* ------------------------------------------------------------- */
#* This entry is used by the bigloo/Makefile (the main Bigloo */
#* makefile) to get the list of file that populate a revision. */
#*---------------------------------------------------------------------*/
.PHONY: pop
pop:
@ echo $(POPULATION:%=$(API)/%)
@ for d in $(POPDIR); do \
(cd $$d && $(MAKE) -s pop) \
done;
#*---------------------------------------------------------------------*/
#* Clean */
#*---------------------------------------------------------------------*/
clean:
(cd src && $(MAKE) clean)
distclean: clean
(cd src && $(MAKE) distclean)
cleanall: distclean
(cd src && $(MAKE) cleanall)
$(RM) -f lib/*calendar* >/dev/null 2>&1
$(RM) -f *~ >/dev/null 2>&1
#*---------------------------------------------------------------------*/
#* Installation */
#*---------------------------------------------------------------------*/
.PHONY: install text-install-data text-uninstall-data
install: api-install-init text-install-data
@ if [ "$(NATIVEBACKEND)" = "yes" ]; then \
$(MAKE) api-install-c; \
fi
@ if [ "$(JVMBACKEND)" = "yes" ]; then \
$(MAKE) api-install-jvm; \
fi
text-install-data:
if [ ! -d $(DESTDIR)$(LIBDIR)/$(FILDIR)/text ]; then \
mkdir -p $(DESTDIR)$(LIBDIR)/$(FILDIR)/text \
&& chmod $(MODDIR) $(DESTDIR)$(LIBDIR)/$(FILDIR)/text \
&& mkdir -p $(DESTDIR)$(LIBDIR)/$(FILDIR)/text/data \
&& chmod $(MODDIR) $(DESTDIR)$(LIBDIR)/$(FILDIR)/text/data; \
elif [ ! -d $(DESTDIR)$(LIBDIR)/text/data ]; then \
mkdir -p $(DESTDIR)$(LIBDIR)/$(FILDIR)/text/data \
&& chmod $(MODDIR) $(DESTDIR)$(LIBDIR)/$(FILDIR)/text/data; \
fi
for p in data/*; do \
cp $$p $(DESTDIR)$(LIBDIR)/$(FILDIR)/text/data \
&& chmod $(MODFILE) $(DESTDIR)$(LIBDIR)/$(FILDIR)/text/$$p; \
done
uninstall: api-uninstall-init \
api-uninstall-c \
api-uninstall-jvm \
text-uninstall-data
text-uninstall-data:
-$(RM) -rf $(DESTDIR)$(LIBDIR)/$(FILDIR)/text
#*---------------------------------------------------------------------*/
#* distrib */
#*---------------------------------------------------------------------*/
distrib:
(cd src && $(MAKE) ude)
#*---------------------------------------------------------------------*/
#* Common rules */
#*---------------------------------------------------------------------*/
include ../../Makefile.misc
include ../Makefile.api