File: Makefile.in

package info (click to toggle)
swi-prolog 7.2.3%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 84,180 kB
  • ctags: 45,684
  • sloc: ansic: 330,358; perl: 268,104; sh: 6,795; java: 4,904; makefile: 4,561; cpp: 4,153; ruby: 1,594; yacc: 843; xml: 82; sed: 12; sql: 6
file content (215 lines) | stat: -rw-r--r-- 5,564 bytes parent folder | download
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
################################################################
# This Makefile is created from Makefile.in by the main Prolog
# configuration in .../pl/src/configure.
#
# It can be used to configure and make the add-on packages.
################################################################
.EXPORT_ALL_VARIABLES:

# Define the packages you wish to build.  Please note that xpce requires
# libXPM and libjpeg to compile.  This   variable  is normally overruled
# from the configure script.  MUST be on one line

PKG=	clib cpp odbc table xpce sgml RDF semweb http chr clpqr nlp ssl tipc pldoc plunit jpl zlib protobufs windows PDT utf8proc archive pengines cql

# Define additional config options shared by all packages here.

CNFG=@CNFG@

################################################################
# Normally, all should be fine below here
################################################################

# Values filled from the main SWI-Prolog configure

MAKE=@MAKE@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
PL=@PL@
PLVERSION=@PLVERSION@
PLBASE=@PLBASE@
PKGDOC=$(PLBASE)/doc/packages
PLLIBS=@LIBS@
PLARCH=@PLARCH@
PLLDFLAGS=@LDFLAGS@
PLDIR=$(shell dirname `pwd`)
PLINCL=$(PLDIR)/include
LIBDIR=$(PLDIR)/lib/$(PLARCH)
PLSHARED=@PLSHARED@
PLTHREADS=@PLTHREADS@
INSTALL=@INSTALL@
INSTALL_DATA=@INSTALL_DATA@
SO=@SO_EXT@
SO_PATH=@DLLIBVAR@
BUILDDIR=@BUILDDIR@
PLLIB=$(PLBASE)/library

# These programs should use prolog from the (already installed) $(bindir)

PATH=$(bindir):$(shell echo $$PATH)

# How to run configure.  We pass the information required from SWI-Prolog
# in the environment.  All configure scripts in the packages are designed
# to trust the environment if they find $PLINCL.  Otherwise they run Prolog
# to find the required parameters.
#
# BUILDDIR passes the relative location of the directory SWI-Prolog was
# build (i.e. linux, solaris, ...)  This means packages can find information
# on the installed Prolog using ../../$BUILDDIR

CONFIG=	env PL="$(PL)" PLBASE="$(PLBASE)" PLARCH="$(PLARCH)" \
	    PLLIBS="$(PLLIBS)" PLLDFLAGS="$(PLLDFLAGS)" \
	    PLINCL="$(PLINCL)" PLSHARED="$(PLSHARED)" \
	    PLTHREADS="$(PLSHARED)" \
	    PLSOEXT="$(SO)" PLSOPATH="$(SO_PATH)" BUILDDIR="$(BUILDDIR)" \
	    LD_LIBRARY_PATH="$(LIBDIR):$$LD_LIBRARY_PATH" \
	    MAKE="$(MAKE)" \
	    ./configure $(CNFG) $(CNFGPASSED) --prefix=$(prefix)

define FORCE_MKINDEX
	@echo "*** Forcing update of library index ***"
	rm -f $(DESTDIR)$(PLLIB)/INDEX.pl
	./swipl.sh -C "$(DESTDIR)$(PLLIB)" -f none -F none \
			-g "make_library_index(.)" -t halt
	./swipl.sh -C "$(DESTDIR)$(PLBASE)" --home=. -f none -g make -t halt
endef

define BEGIN_FORPKG
	@rm -f .failed.$@
endef

define END_FORPKG
	@if [ -f .failed.$@ ]; then \
	    echo "ERROR: The following packages.failed.$@: `cat .failed.$@`"; \
	fi
endef

all:	objects

objects::
	$(BEGIN_FORPKG)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(END_FORPKG)

html::
	$(BEGIN_FORPKG)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p $@ || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(END_FORPKG)

install::
	$(BEGIN_FORPKG)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p $@ || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(FORCE_MKINDEX)
	$(END_FORPKG)

rpm-install: html-install
	$(BEGIN_FORPKG)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p $@ || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(FORCE_MKINDEX)
	$(END_FORPKG)

pdf-install::
	$(BEGIN_FORPKG)
	mkdir -p $(DESTDIR)$(PKGDOC)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p $@ || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(END_FORPKG)

html-install::
	$(BEGIN_FORPKG)
	mkdir -p $(DESTDIR)$(PKGDOC)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p $@ || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(INSTALL_DATA) index.html $(DESTDIR)$(PKGDOC)
	$(END_FORPKG)

ln-install::
	$(BEGIN_FORPKG)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p $@ || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(FORCE_MKINDEX)
	$(END_FORPKG)

configure::
	$(BEGIN_FORPKG)
	@echo "**********************"
	@echo "* Configuring packages $(PKG)"
	@echo "**********************"
	@for p in $(PKG); do \
	    if [ -r $$p/configure ]; then \
	      echo "**********************"; \
	      echo "* Package $$p"; \
	      echo "**********************"; \
	      if [ ! -r $$p/config.status -o $$p/config.status -ot $$p/configure ]; then \
	        ( cd $$p && $(CONFIG) ) || echo $$p >> .failed.$@; \
	      else \
		( cd $$p && ./config.status ) || echo $$p >> .failed.$@; \
	      fi; \
	    fi; \
	done
	$(END_FORPKG)

doc::
	$(BEGIN_FORPKG)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p pdf html || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(END_FORPKG)

distclean::
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then $(MAKE) -C $$p $@ || true; fi; \
	done
	rm -f swipl.sh swipl-ld.sh
	rm -f Makefile configure Dialect.defs Makefile.defs

clean::
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then $(MAKE) -C $$p $@ || true; fi; \
	done

check::
	$(BEGIN_FORPKG)
	for p in $(PKG); do \
	    if [ -r $$p/Makefile ]; then \
	        $(MAKE) -C $$p $@ || echo $$p >> .failed.$@; \
	    fi; \
	done
	$(END_FORPKG)

report-failed::
	@./report-failed
	rm -f .failed.*

# test environment

printenv::
	printenv