File: Makefile.am

package info (click to toggle)
rapache 1.2.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,248 kB
  • sloc: sh: 18,629; ansic: 10,417; perl: 5,675; javascript: 2,800; makefile: 307
file content (80 lines) | stat: -rw-r--r-- 2,180 bytes parent folder | download | duplicates (4)
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
# DARWIN has to be different than everyone else
# and define their autoconf $shlibpath_var to be DYLD_LIBRARY_PATH
SHLIBPATH_VAR=@SHLIBPATH_VAR@

ACLOCAL_AMFLAGS = -I m4

APXS=@APXS@
HTTPD=@HTTPD@
DOCROOT=@DOCROOT@

APREQ=@APREQ@
APREQ_COMPILE=@APREQ_COMPILE@
APREQ_INSTALL=@APREQ_INSTALL@
APREQ_CLEAN=@APREQ_CLEAN@
APREQ_LIB_DIR=@APREQ_LIB_DIR@
APREQ_INCLUDES=@APREQ_INCLUDES@
APREQ_LINKLD=@APREQ_LINKLD@

RPROG=@RPROG@
RPROGBATCH=R_DEFAULT_PACKAGES=NULL @RPROG@ --vanilla --no-readline --slave -f
R_HOME = `$(RPROG) RHOME`
R_LD_LIBRARY_PATH = $(R_HOME)/lib
RINCLUDES=@RINCLUDES@
RLINKLD=@RLINKLD@

INCLUDES = $(RINCLUDES) $(APREQ_INCLUDES)
LDFLAGS = $(RLINKLD) $(APREQ_LINKLD)
LD_LIBRARY_PATH=$(R_LD_LIBRARY_PATH):$(APREQ_LIB_DIR)

all: mod_R.so $(DOCROOT)/httpd.conf

mod_R.so: .apreq-config mod_R.c mod_R.h
	@echo
	@echo Compiling mod_R
	@echo
	$(APXS) $(INCLUDES) -c mod_R.c $(LDFLAGS)

.apreq-config:
	@echo
	@echo Configuring libapreq2
	@echo
	$(APREQ_COMPILE)
	touch .apreq-config

install: all
	$(APXS) -i -n R mod_R.la
	$(APREQ_INSTALL)

$(DOCROOT)/httpd.conf: $(DOCROOT)/httpd.conf.in
	$(RPROGBATCH) tools/config_http.R --args $(APXS) $(HTTPD)

itest: all
	@echo
	@echo Point your browser to http://localhost:8181/index.html
	@echo
	$(SHLIBPATH_VAR)=$(LD_LIBRARY_PATH) R_HOME=$(R_HOME) $(HTTPD) -X -f $(DOCROOT)/httpd.conf

test: all $(DOCROOT)/httpd.conf

stop: all
	$(SHLIBPATH_VAR)=$(LD_LIBRARY_PATH) R_HOME=$(R_HOME) $(HTTPD) -X -f $(DOCROOT)/httpd.conf -k stop

valgrind: all
	$(SHLIBPATH_VAR)=$(LD_LIBRARY_PATH) R_HOME=$(R_HOME) valgrind $(HTTPD) -X -f $(DOCROOT)/httpd.conf

debug: all
	@echo
	@echo Copy/paste the following line to gdb
	@echo
	@echo run -X -f $(DOCROOT)/httpd.conf 
	@echo
	$(SHLIBPATH_VAR)=$(LD_LIBRARY_PATH) R_HOME=$(R_HOME) gdb $(HTTPD)

clean:
	rm -rf $(OBJS) core mod_R.o mod_R.so *~ .libs *.o *.slo *.lo *.la .apreq-config
	$(APREQ_CLEAN)

distclean: clean
	rm -rf mod_R.h Makefile .depend .install libtool config.log config.status test/httpd.conf test/access_log test/error_log test/httpd.pid test/accept.lock* aclocal.m4 autom4te.cache libapreq2/library/t/Makefile libapreq2/config.nice libapreq2/module/apache/Makefile
	$(APREQ_CLEAN)