# Install header files
-oilsincludedir = $(DESTDIR)@includedir@/openils
+oilsincludedir = @includedir@/openils
headsdir = @top_srcdir@/Open-ILS/include/openils
oilsinclude_HEADERS = $(headsdir)/idl_fieldmapper.h $(headsdir)/oils_constants.h $(headsdir)/oils_event.h $(headsdir)/oils_idl.h $(headsdir)/oils_utils.h
#perl-install and string-templates-install
ilscore-install:
@echo $@
- $(MKDIR_P) $(TEMPLATEDIR)
- cp -r @srcdir@/templates/marc $(TEMPLATEDIR)
- cp -r @srcdir@/templates/password-reset $(TEMPLATEDIR)
- @echo "Installing string templates to $(TEMPLATEDIR)"
- $(MKDIR_P) $(TEMPLATEDIR)
- $(MKDIR_P) $(datadir)/overdue/
- cp -r @srcdir@/templates/strings $(TEMPLATEDIR)
+ $(MKDIR_P) $(DESTDIR)$(TEMPLATEDIR)
+ cp -r @srcdir@/templates/marc $(DESTDIR)$(TEMPLATEDIR)
+ cp -r @srcdir@/templates/password-reset $(DESTDIR)$(TEMPLATEDIR)
+ @echo "Installing string templates to $(DESTDIR)$(TEMPLATEDIR)"
+ $(MKDIR_P) $(DESTDIR)$(TEMPLATEDIR)
+ $(MKDIR_P) $(DESTDIR)$(datadir)/overdue/
+ cp -r @srcdir@/templates/strings $(DESTDIR)$(TEMPLATEDIR)
sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
sed -i 's|SYSCONFDIR|@sysconfdir@|g' '$(DESTDIR)@sysconfdir@/oils_sip.xml.example'
sed -i 's|LOCALSTATEDIR|@localstatedir@|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
AM_CFLAGS = -D_LARGEFILE64_SOURCE -Wall -I@abs_top_srcdir@/Open-ILS/include/ -I$(LIBXML2_HEADERS) -I$(APACHE2_HEADERS) -I$(APR_HEADERS) -I$(OPENSRF_HEADERS)
AM_LDFLAGS = -L$(LIBDIR) -L$(OPENSRF_LIBS)
+AP_LIBEXECDIR = `$(APXS2) -q LIBEXECDIR`
if BUILDAPACHEMODS
OILSAPACHEINST = apachemods
install-exec-local: $(OILSAPACHEINST)
apachemods:
+ $(MKDIR_P) $(DESTDIR)$(AP_LIBEXECDIR)
$(APXS2) -c $(AM_LDFLAGS) -lxml2 -lopensrf -lxslt -lexpat $(AM_CFLAGS) @srcdir@/mod_xmlent.c
- $(APXS2) -i -a @srcdir@/mod_xmlent.la
+ $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) -a @srcdir@/mod_xmlent.la
$(APXS2) -c $(AM_LDFLAGS) -lxml2 -lopensrf -lxslt -lexpat $(AM_CFLAGS) @srcdir@/mod_idlchunk.c
- $(APXS2) -i -a @srcdir@/mod_idlchunk.la
+ $(APXS2) -i -S LIBEXECDIR=$(DESTDIR)$(AP_LIBEXECDIR) -a @srcdir@/mod_idlchunk.la
clean-local:
rm -f @srcdir@/mod_xmlent.la @srcdir@/mod_xmlent.lo @srcdir@/mod_xmlent.slo
CLEANFILES = Build
DISTCLEANFILES = Makefile.in Makefile
-all:
- perl Build.PL || make -s build-perl-fail
+all: build-perl
./Build || make -s build-perl-fail
-check:
+check: build-perl
./Build test || make -s build-perl-fail
-install:
+install: build-perl
./Build install
+build-perl:
+ perl Build.PL --destdir $(DESTDIR) || make -s build-perl-fail
+
build-perl-fail:
echo
echo ">>> Build/test of Perl modules has failed. The most likely"
distclean-local:
rm -rf ./_build
- rm -rf ./blib
\ No newline at end of file
+ rm -rf ./blib
jsdojodir = $(DESTDIR)$(WEBDIR)/js/dojo
jsdojoosrfdir = $(DESTDIR)$(WEBDIR)/js/dojo/opensrf
opacextrasdir = $(DESTDIR)$(WEBDIR)/opac/extras/xsl/
-reportsdir = $(DESTDIR)$(WEBDIR)/reports/
+reportsdir = $(WEBDIR)/reports/
if BUILDILSWEB
OILSWEB_INST = webcore-install offline-install
@echo "Installing offline CGIs to $(CGIDIR)/offline";
$(MKDIR_P) $(TMP)
$(MKDIR_P) $(DESTDIR)$(CGIDIR)/offline;
- $(MKDIR_P) $(datadir)/offline;
+ $(MKDIR_P) $(DESTDIR)$(datadir)/offline;
perl -pe "s{##CONFIG##}{@sysconfdir@}" < @top_srcdir@/Open-ILS/src/offline/offline.pl > $(TMP)/offline.pl;
cp $(TMP)/offline.pl $(DESTDIR)$(CGIDIR)/offline/
chmod +x $(DESTDIR)$(CGIDIR)/offline/offline.pl
server-xul: needwebdir build
@echo $@
- mkdir -p $(WEBDIR)
- mkdir -p $(WEBDIR)/xul/
+ mkdir -p $(DESTDIR)$(WEBDIR)
+ mkdir -p $(DESTDIR)$(WEBDIR)/xul/
@echo "STAMP_ID = $(STAFF_CLIENT_STAMP_ID)"
- @echo "Copying xul into $(WEBDIR)/xul/$(STAFF_CLIENT_STAMP_ID)"
- mkdir -p "$(WEBDIR)/xul/$(STAFF_CLIENT_STAMP_ID)"
- cp -R @top_srcdir@/Open-ILS/xul/staff_client/build/server "${WEBDIR}/xul/${STAFF_CLIENT_STAMP_ID}/"
+ @echo "Copying xul into $(DESTDIR)$(WEBDIR)/xul/$(STAFF_CLIENT_STAMP_ID)"
+ mkdir -p "$(DESTDIR)$(WEBDIR)/xul/$(STAFF_CLIENT_STAMP_ID)"
+ cp -R @top_srcdir@/Open-ILS/xul/staff_client/build/server "$(DESTDIR)${WEBDIR}/xul/${STAFF_CLIENT_STAMP_ID}/"
compress-javascript: build
@echo "Size of build/ before compression = " `du -sh build/`