forked from SWI-Prolog/packages-http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
executable file
·143 lines (107 loc) · 4.51 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
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
################################################################
# SWI-Prolog `HTTP' package
# Author: Jan Wielemaker. [email protected]
# Copyright: LGPL (see COPYING or www.gnu.org
################################################################
PACKAGE=http
DOC=http
include @srcdir@/common.mk
CFLAGS+= -I.
.SUFFIXES: .txt
PKGPLLIBDIR=$(PLLIBDIR)/http
EXDIR=$(PKGEXDIR)/http
include ../Makefile.defs
STREAMOBJ= http_stream.o
JSONOBJ= json.o
SOLIBS= http_stream.@SO@ json.@SO@
LIBSRCPL= $(addprefix $(srcdir)/, $(LIBPL))
all: $(SOLIBS)
http_stream.@SO@: $(STREAMOBJ)
$(LD) $(LDSOFLAGS) -o $@ $(STREAMOBJ) @LIBS@ $(LIBPLSO)
json.@SO@: $(JSONOBJ)
$(LD) $(LDSOFLAGS) -o $@ $(JSONOBJ) @LIBS@ $(LIBPLSO)
http_stream.o: $(srcdir)/http_error.c $(srcdir)/http_chunked.c $(srcdir)/cgi_stream.c $(srcdir)/stream_range.c
install: $(LIBSRCPL) $(SOLIBS) install-examples
mkdir -p $(DESTDIR)$(SOLIBDIR)
for f in $(SOLIBS); do \
$(INSTALL_PROGRAM) $$f $(DESTDIR)$(SOLIBDIR); \
done
mkdir -p $(DESTDIR)$(PKGPLLIBDIR)
mkdir -p $(DESTDIR)$(PKGPLLIBDIR)/web/icons
mkdir -p $(DESTDIR)$(PKGPLLIBDIR)/web/css
$(INSTALL_DATA) $(LIBSRCPL) $(DESTDIR)$(PKGPLLIBDIR)
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(PKGPLLIBDIR)/README$(TXTEXT)
$(INSTALL_DATA) $(srcdir)/web/icons/*.png $(DESTDIR)$(PKGPLLIBDIR)/web/icons
$(INSTALL_DATA) $(srcdir)/web/css/*.css $(DESTDIR)$(PKGPLLIBDIR)/web/css
$(MKPKGINDEX)
$(MKINDEX)
ln-install: $(LIBPL)
$(MAKE) INSTALL_DATA="../ln-install" INSTALL_PROGRAM="../ln-install" install
rpm-install: install
pdf-install: install-examples
$(INSTALL_DATA) $(DOC).pdf $(DESTDIR)$(PKGDOC)
html-install: install-examples
$(INSTALL_DATA) $(DOC).html httpserver.gif $(DESTDIR)$(PKGDOC)
install-examples::
mkdir -p $(DESTDIR)$(EXDIR)
mkdir -p $(DESTDIR)$(EXDIR)/pwp
(cd $(srcdir)/examples && $(INSTALL_DATA) $(EXAMPLES) $(DESTDIR)$(EXDIR))
(cd $(srcdir)/examples/pwp && $(INSTALL_DATA) *.pwp *.pl $(DESTDIR)$(EXDIR)/pwp)
(cd $(srcdir)/examples && $(INSTALL_PROGRAM) $(EXAMPLEEXE) $(DESTDIR)$(EXDIR))
uninstall::
(cd $(PKGPLLIBDIR) && rm -f $(LIBPL))
$(PL) -f none -g make -t halt
check::
$(PL) -q -f test_http.pl -g test_http,halt -t 'halt(1)'
$(PL) -q -f test_json.pl -g test_json,halt -t 'halt(1)'
$(PL) -q -f test_cgi_stream.pl -g true -t test_cgi_stream
################################################################
# Documentation
################################################################
TEXEXTRA= post.tex json.tex httplog.tex httppath.tex htmlhead.tex \
httpsession.tex httpdispatch.tex httpdirindex.tex httppwp.tex \
httpopen.tex httphost.tex httpopenid.tex jswrite.tex \
httpfiles.tex httpcors.tex mimepack.tex httpunixdaemon.tex
$(TEX): $(TEXEXTRA)
json.tex: $(srcdir)/json.pl $(srcdir)/json_convert.pl $(srcdir)/http_json.pl
httplog.tex: $(srcdir)/http_log.pl
$(PLTOTEX) --subsection 'library(http/http_log)'
httphost.tex: $(srcdir)/http_host.pl
$(PLTOTEX) --subsection 'library(http/http_host)'
httppath.tex: $(srcdir)/http_path.pl
$(PLTOTEX) --subsection 'library(http/http_path)'
httpopen.tex: $(srcdir)/http_open.pl
$(PLTOTEX) --subsection 'library(http/http_open)'
httpfiles.tex: $(srcdir)/http_files.pl
$(PLTOTEX) --subsection 'library(http/http_files)'
htmlhead.tex: $(srcdir)/html_head.pl
$(PLTOTEX) --subsection 'library(http/html_head)'
httpsession.tex: $(srcdir)/http_session.pl
$(PLTOTEX) --subsection 'library(http/http_session)'
httpcors.tex: $(srcdir)/http_cors.pl
$(PLTOTEX) --subsection 'library(http/http_cors)'
httpdispatch.tex: $(srcdir)/http_dispatch.pl
$(PLTOTEX) --subsection 'library(http/http_dispatch)'
httpopenid.tex: $(srcdir)/http_openid.pl
$(PLTOTEX) --subsection 'library(http/http_openid)'
httpdirindex.tex: $(srcdir)/http_dirindex.pl
$(PLTOTEX) --subsection 'library(http/http_dirindex)'
httppwp.tex: $(srcdir)/http_pwp.pl
$(PLTOTEX) --subsection 'library(http/http_pwp)'
httpunixdaemon.tex: $(srcdir)/http_unix_daemon.pl
$(PLTOTEX) --subsubsection 'library(http/http_unix_daemon)'
jswrite.tex: $(srcdir)/js_write.pl
$(PLTOTEX) --subsection 'library(http/js_write)'
mimepack.tex: $(srcdir)/mimepack.pl
$(PLTOTEX) --subsection 'library(http/mimepack)'
################################################################
# Clean
################################################################
clean:
rm -f $(STREAMOBJ) $(JSONOBJ)
rm -f *~ *% config.log
rm -f $(TEX) $(SUBTEX)
$(RUNTEX) --clean $(DOC)
rm -rf html
distclean: clean
rm -f $(SOLIBS) config.cache config.status config.h Makefile