1 # Copyright (C) 2008 Equinox Software, Inc.
2 # Kevin Beswick <kevinbeswick00@gmail.com>
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
15 # Declare some directory variables
17 export OPENSRF = opensrf
18 export BINDIR = @bindir@
19 export LIBDIR = @libdir@
22 DISTCLEANFILES = Makefile.in Makefile
24 AM_LDFLAGS = $(DEF_LDFLAGS)
25 AM_CFLAGS = $(DEF_CFLAGS)
28 MAYBE_JAVASCRIPT = javascript
29 jsdir = $(prefix)/lib/javascript
30 js_SCRIPTS = javascript/DojoSRF.js javascript/JSON_v1.js javascript/md5.js javascript/opensrf.js javascript/opensrf_xhr.js javascript/opensrf_xmpp.js javascript/opensrf_ws.js javascript/opensrf_ws_shared.js
34 MAYBE_CORE = libopensrf c-apps router srfsh gateway perl websocket-stdio
35 dist_bin_SCRIPTS = @top_srcdir@/bin/opensrf-perl.pl
36 bin_SCRIPTS = @top_srcdir@/bin/osrf_config
37 dist_sysconf_DATA = @top_srcdir@/examples/opensrf.xml.example @top_srcdir@/examples/opensrf_core.xml.example @top_srcdir@/examples/srfsh.xml.example
40 SUBDIRS = $(MAYBE_CORE) $(MAYBE_PY) $(MAYBE_JA)
43 $(MKDIR_P) $(DESTDIR)$(VAR)
44 $(MKDIR_P) $(DESTDIR)$(PID)
45 $(MKDIR_P) $(DESTDIR)$(LOG)
46 $(MKDIR_P) $(DESTDIR)$(SOCK)
47 $(MKDIR_P) $(DESTDIR)$(jsdir)
50 if [ "$(MAYBE_CORE)" ]; then \
51 for f in opensrf.xml.example opensrf_core.xml.example srfsh.xml.example ; do \
52 mv "$(DESTDIR)@sysconfdir@/$${f}" "$(DESTDIR)@sysconfdir@/$${f}.bak" ; \
53 sed -e 's|LOCALSTATEDIR|$(VAR)|g' -e 's|SYSCONFDIR|$(ETCDIR)|g' \
54 "$(DESTDIR)@sysconfdir@/$${f}.bak" > "$(DESTDIR)@sysconfdir@/$${f}" ; \
55 rm "$(DESTDIR)@sysconfdir@/$${f}.bak" ; \
58 if [ ! -e "$(DESTDIR)@bindir@/osrf_control" ]; then \
59 ln -s "opensrf-perl.pl" "$(DESTDIR)@bindir@/osrf_control"; \
63 rm -f "$(DESTDIR)@includedir@/opensrf/apachetools.h"