File: Makefile.in

package info (click to toggle)
gprolog 1.3.0-6.1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 13,512 kB
  • ctags: 8,954
  • sloc: ansic: 57,431; perl: 16,620; sh: 5,900; makefile: 1,284
file content (238 lines) | stat: -rw-r--r-- 6,544 bytes parent folder | download | duplicates (2)
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
#                               MAIN MAKEFILE
#                               -------------

ROOT_DIR       = @ROOT_DIR@
PKG_NAME       = @PKG_NAME@

INSTALL_DIR    = $(DESTDIR)@INSTALL_DIR@
INSTALL_BIN    = $(INSTALL_DIR)/bin
INSTALL_LIB    = $(INSTALL_DIR)/lib/@PROLOG_NAME1@
INSTALL_INC    = $(INSTALL_DIR)/include/@PROLOG_NAME1@
LINKS_DIR      = $(DESTDIR)@LINKS_DIR@
DOC_DIR        = $(DESTDIR)@DOC_DIR@
HTML_DIR       = $(DESTDIR)@HTML_DIR@
EXAMPLES_DIR   = $(DESTDIR)@EXAMPLES_DIR@

TXT_FILES      = @TXT_FILES@
BIN_FILES      = @BIN_FILES@
OBJ_FILES      = @OBJ_FILES@
LIB_FILES      = @LIB_FILES@
INC_FILES      = @INC_FILES@
DOC_FILES      = @DOC_FILES@
HTML_FILES     = @HTML_FILES@
EXPL_FILES     = @EXPL_FILES@
EXC_FILES      = @EXC_FILES@
EXFD_FILES     = @EXFD_FILES@

INSTALL        = @INSTALL@
INSTALL_PROGRAM= @INSTALL_PROGRAM@
INSTALL_DATA   = @INSTALL_DATA@

TOP_LEVEL      = @TOP_LEVEL@

LN_S           = @LN_S@
RANLIB         = @RANLIB@

LE_DIRS        = Linedit
W32GC_DIRS     = W32GUICons
FD_DIRS        = Fd2C EngineFD BipsFD
SUB_DIRS       = TopComp EnginePl Wam2Ma Ma2Asm @MAKE_LE_DIRS@ @MAKE_W32GC_DIRS@ \
                 BipsPl Pl2Wam @MAKE_FD_DIRS@
SUB_DIRS_ALL   = TopComp EnginePl Wam2Ma Ma2Asm $(LE_DIRS) $(W32GC_DIRS) \
                 BipsPl Pl2Wam $(FD_DIRS)


# --- COMPILE --- #

all:
	(cd EnginePl; $(MAKE) config)
	. ./SETVARS;for i in $(SUB_DIRS);do (cd $$i; $(MAKE)) || exit 1; done;\
	(cd TopComp; $(MAKE) $(TOP_LEVEL)@EXE_SUFFIX@)


# --- INSTALL --- #

install-strip:
	$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install

install: install-system install-doc install-html install-examples install-links

install-system:
	./mkinstalldirs $(INSTALL_DIR) $(INSTALL_BIN) \
	$(INSTALL_INC) $(INSTALL_LIB)
	for i in $(TXT_FILES); do $(INSTALL_DATA) ../$$i $(INSTALL_LIB); done
	for i in $(BIN_FILES); do $(INSTALL_PROGRAM) */$$i $(INSTALL_BIN); done
	for i in $(OBJ_FILES); do $(INSTALL_DATA) */$$i $(INSTALL_LIB); done
	for i in $(LIB_FILES); do $(INSTALL_DATA) */$$i $(INSTALL_LIB); done
	for i in $(INC_FILES); do $(INSTALL_DATA) */$$i $(INSTALL_INC); done
	for i in $(INSTALL_LIB)/*.a; do $(RANLIB) $$i; done


uninstall: uninstall-links uninstall-html uninstall-doc uninstall-examples
	for i in $(BIN_FILES); do rm -f $(INSTALL_BIN)/$$i; done
	rmdir -p $(INSTALL_BIN) 2>/dev/null || exit 0
	for i in $(LIB_FILES) $(OBJ_FILES); do rm -f $(INSTALL_LIB)/$$i; done
	rmdir -p $(INSTALL_LIB) 2>/dev/null || exit 0
	for i in $(INC_FILES); do rm -f $(INSTALL_INC)/$$i; done
	rmdir -p $(INSTALL_INC) 2>/dev/null || exit 0
	for i in $(TXT_FILES); do rm -f $(INSTALL_LIB)/$$i; done
	rmdir -p $(INSTALL_LIB) 2>/dev/null || exit 0
	rmdir $(INSTALL_DIR) 2>/dev/null || exit 0


# --- Links --- #

install-links: uninstall-links
	if test $(LINKS_DIR) != none; then \
	   ./mkinstalldirs $(LINKS_DIR); \
	   (cd $(LINKS_DIR) ; $(LN_S) $(INSTALL_BIN)/* .); \
	fi

uninstall-links:
	-if test $(LINKS_DIR) != none; then \
	   (cd $(LINKS_DIR) 2>/dev/null && rm -f $(BIN_FILES)); \
	   rmdir $(LINKS_DIR) 2>/dev/null; \
	fi || exit 0;


# --- Documentation --- #

install-doc:
	if test $(DOC_DIR) != none; then \
	   ./mkinstalldirs $(DOC_DIR); \
	   (F=`cd ../doc; echo $(DOC_FILES)`; \
	   for i in $$F; do $(INSTALL_DATA) ../doc/$$i $(DOC_DIR); done); \
	fi

uninstall-doc:
	-if test $(DOC_DIR) != none; then \
	   (cd $(DOC_DIR); rm -f $(DOC_FILES)); \
	   rmdir $(DOC_DIR) 2>/dev/null; \
	fi || exit 0;


# --- HTML --- #

install-html:
	if test $(HTML_DIR) != none; then \
	   ./mkinstalldirs $(HTML_DIR); \
	   (F=`cd ../doc/html_node; echo $(HTML_FILES)`; \
	   for i in $$F; do $(INSTALL_DATA) ../doc/html_node/$$i $(HTML_DIR); done); \
	fi

uninstall-html:
	-if test $(HTML_DIR) != none; then \
	   (cd $(HTML_DIR); rm -f $(HTML_FILES)); \
	   rmdir $(HTML_DIR) 2>/dev/null; \
	fi || exit 0;


# --- Examples --- #

install-examples:
	if test $(EXAMPLES_DIR) != none; then \
	   ./mkinstalldirs $(EXAMPLES_DIR)/ExamplesPl; \
	   (F=`cd ../ExamplesPl; echo $(EXPL_FILES)`; \
	   for i in $$F; do $(INSTALL_DATA) ../ExamplesPl/$$i $(EXAMPLES_DIR)/ExamplesPl; done); \
	   ./mkinstalldirs $(EXAMPLES_DIR)/ExamplesC; \
	   (F=`cd ../ExamplesC; echo $(EXC_FILES)`; \
	   for i in $$F; do $(INSTALL_DATA) ../ExamplesC/$$i $(EXAMPLES_DIR)/ExamplesC; done); \
	   ./mkinstalldirs $(EXAMPLES_DIR)/ExamplesFD; \
	   (F=`cd ../ExamplesFD; echo $(EXFD_FILES)`; \
	   for i in $$F; do $(INSTALL_DATA) ../ExamplesFD/$$i $(EXAMPLES_DIR)/ExamplesFD; done); \
	fi

uninstall-examples:
	rm -rf $(EXAMPLES_DIR)/ExamplesPl
	rm -rf $(EXAMPLES_DIR)/ExamplesC
	rm -rf $(EXAMPLES_DIR)/ExamplesFD
	-rmdir $(EXAMPLES_DIR) 2>/dev/null || exit 0


# --- CHECKS --- #

check:
	(cd EnginePl; make check) && \
	(cd Ma2Asm; make check) && \
	(cd Pl2Wam; make check) && \
	(cd BipsPl; make check) && \
	echo All tests succeeded


# --- CLEAN --- #

RUN_PL_DIRS = EnginePl BipsPl 
RUN_FD_DIRS = EngineFD BipsFD
RUN_SUB_DIRS= $(RUN_PL_DIRS) $(RUN_PL_DIRS)



clean:
	for i in $(SUB_DIRS_ALL); do (cd $$i; $(MAKE) clean); done

clean-pl:
	for i in $(RUN_PL_DIRS); do (cd $$i; $(MAKE) clean); done

clean-fd:
	for i in $(RUN_FD_DIRS); do (cd $$i; $(MAKE) clean); done

clean-pl-fd: clean-pl clean-fd


distclean:
	rm -rf config.status config.log config.cache autom4te.cache
	for i in $(SUB_DIRS_ALL); do (cd $$i; $(MAKE) distclean); done


# --- DISTRIBUTION --- #

distdir=./$(PKG_NAME)

dist: check_doc $(PKG_NAME).tar.gz

check_doc:
	(cd ../doc; make all)

$(PKG_NAME).tar.gz:
	-rm -rf $(distdir)
	mkdir $(distdir)
	-chmod 777 $(distdir)
	(while read f; do \
	    if [ x$$f != x ]; then \
		subdir=`dirname $$f`; \
		if test "$$subdir" = .; then :; else \
		    test -d $(distdir)/$$subdir \
		    || mkdir $(distdir)/$$subdir \
	    	    || exit 1; \
	    	    chmod 777 $(distdir)/$$subdir; \
		fi; \
	        cp -pr ../$$f $(distdir)/$$subdir; \
	    fi; \
	 done <DISTRIB_FILES)
	tar cf $(PKG_NAME).tar $(distdir)
	gzip -f $(PKG_NAME).tar
	-rm -rf $(distdir)
	@banner="$(distdir).tar.gz is ready for distribution"; \
	dashes=`echo "$$banner" | sed s/./=/g`; \
	echo "$$dashes"; \
	echo "$$banner"; \
	echo "$$dashes"

old$(PKG_NAME).tar.gz:
	-rm -rf $(distdir)
	mkdir $(distdir)
	-chmod 777 $(distdir)
	(while read f;do \
	    if [ x$$f != x ]; then \
	       files="$$files $$f"; \
	    fi; \
	 done <DISTRIB_FILES; \
	 cd $(ROOT_DIR); \
	 tar cf - $$files | (cd $(ROOT_DIR)/src/$(distdir) ;  tar xf -))
	tar cf $(PKG_NAME).tar $(distdir)
	gzip -f $(PKG_NAME).tar
	-rm -rf $(distdir)
	@echo "distribution file: $(PKG_NAME).tar.gz"