forked from SWI-Prolog/packages-pengines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
94 lines (74 loc) · 2.52 KB
/
Makefile.in
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
################################################################
# SWI-Prolog Pengines package
# Author: Torbjörn Lager, Jan Wielemaker
# Copyright: LGPL (see COPYING or www.gnu.org
################################################################
PACKAGE=pengines
DOC=pengines
DOCIMG=penarch.png pltpruncolour.png pltpsynch.png
include ../Makefile.defs
JSDIR=$(DESTDIR)$(PLLIBDIR)/http/web/js
CSSDIR=$(DESTDIR)$(PLLIBDIR)/http/web/css
EXDIR=$(DESTDIR)$(PKGEXDIR)/pengines
PHANTOMJS=@PHANTOMJS@
LIBPL= pengines.pl pengines_io.pl term_to_json.pl
HTTPPL= term_html.pl
JS= web/js/pengines.js
CSS= web/css/plterm.css
all::
@echo "Nothing to be done for this package"
install: $(LIBPL) $(JS)
mkdir -p $(JSDIR) $(CSSDIR)
for f in $(LIBPL); do \
$(INSTALL_DATA) $$f $(DESTDIR)$(PLLIBDIR); \
done
for f in $(HTTPPL); do \
$(INSTALL_DATA) http/$$f $(DESTDIR)$(PLLIBDIR)/http; \
done
for f in $(JS); do \
$(INSTALL_DATA) $$f $(JSDIR); \
done
for f in $(CSS); do \
$(INSTALL_DATA) $$f $(CSSDIR); \
done
$(MKINDEX)
ln-install::
$(MAKE) INSTALL_DATA="../ln-install" INSTALL_PROGRAM="../ln-install" install
rpm-install: install
pdf-install: install-examples
$(INSTALL_DATA) $(DOC).pdf $(DESTDIR)$(PKGDOCDIR)
html-install: install-examples
$(INSTALL_DATA) $(DOC).html $(DOCIMG) $(DESTDIR)$(PKGDOCDIR)
install-examples::
mkdir -p $(EXDIR)/web
(cd examples && $(INSTALL_DATA) *.pl $(EXDIR))
(cd examples/web && $(INSTALL_DATA) *.html *.png $(EXDIR)/web)
uninstall:
(cd $(PLLIBDIR) && rm -f $(LIBPL))
(cd $(JSDIR) && rm -f $(JS))
check::
$(PL) -q -f test_pengines.pl -g test_pengines,halt -t 'halt(1)'
$(PL) -q -f test_term_html.pl -g test_term_html,halt -t 'halt(1)'
ifneq ($(PHANTOMJS),:)
$(PL) -q -f test_js.pl -g test_js,halt -t 'halt(1)'
endif
################################################################
# Documentation
################################################################
TEXEXTRA= pendoc.tex penlib.tex termtojson.tex
$(TEX): $(TEXEXTRA)
pendoc.tex: pendoc.md
$(PLTOTEX) --out=pendoc.tex pendoc.md
penlib.tex: pengines.pl
$(PLTOTEX) --subsection --out=penlib.tex 'library(pengines)'
termtojson.tex: term_to_json.pl
$(PLTOTEX) --subsection 'library(term_to_json)'
################################################################
# Clean
################################################################
clean:
rm -f *~ *% config.log
rm -f pendoc.tex pengines.tex penlib.tex termtojson.tex
distclean: clean
rm -f config.h config.cache config.status Makefile
rm -rf autom4te.cache