diff --git a/build/modmake.rules.in b/build/modmake.rules.in index ee49152771..591865055a 100644 --- a/build/modmake.rules.in +++ b/build/modmake.rules.in @@ -79,12 +79,12 @@ $(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(SOU $(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD); \ fi; - - mod_clean: rm -fr *.$(DYNAMIC_LIB_EXTEN) *.o *~ .libs -mod_install: +mod_install: $(DESTDIR)$(PREFIX)/mod/$(MODNAME).$(DYNAMIC_LIB_EXTEN) + +$(DESTDIR)$(PREFIX)/mod/$(MODNAME).$(DYNAMIC_LIB_EXTEN):$(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LTINSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/mod mod_uninstall: diff --git a/libs/libetpan/configure.gnu b/libs/libetpan/configure.gnu new file mode 100644 index 0000000000..a22f176e74 --- /dev/null +++ b/libs/libetpan/configure.gnu @@ -0,0 +1,3 @@ +#! /bin/sh +./configure "$@" --disable-shared --with-pic + diff --git a/src/mod/Makefile.am b/src/mod/Makefile.am index 99c43fa8f3..2700ddfd73 100644 --- a/src/mod/Makefile.am +++ b/src/mod/Makefile.am @@ -1,7 +1,7 @@ CONF_MODULES=$(shell grep -v "\#" $(switch_builddir)/modules.conf) FOUND_MODULES=$(shell find . -type d -name mod_\*) -OUR_MODULES=`if test -z $(MODULES) ; then echo $(CONF_MODULES) ; else echo $(MODULES) ; fi ;` -OUR_CLEAN_MODULES=`if test -z $(MODULES) ; then echo $(CONF_MODULES) $(FOUND_MODULES) ; else echo $(MODULES) ; fi ;` +OUR_MODULES=`if test -z "$(MODULES)" ; then echo $(CONF_MODULES) ; else echo $(MODULES) ; fi ;` +OUR_CLEAN_MODULES=`if test -z "$(MODULES)" ; then echo $(CONF_MODULES) $(FOUND_MODULES) ; else echo $(MODULES) ; fi ;` MOD_NAME=`echo $$i | sed -e 's|^.*/||'` MOD_DIR=`if test -d $(switch_srcdir)/src/mod/$$i ; then echo $(switch_srcdir)/src/mod/$$i ; else echo $$i ; fi;` @@ -12,7 +12,6 @@ all: @for i in $(OUR_MODULES) ; do \ echo making $$i ; \ moddir=$(MOD_DIR); \ - echo $(MOD_NAME); \ if test -f $$moddir/Makefile ; then \ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) ; else \ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules ; \ diff --git a/src/mod/Makefile.in b/src/mod/Makefile.in index 4e0c9c40ba..0e9353f8d9 100644 --- a/src/mod/Makefile.in +++ b/src/mod/Makefile.in @@ -194,8 +194,8 @@ uint64_t_fmt = @uint64_t_fmt@ voidp_size = @voidp_size@ CONF_MODULES = $(shell grep -v "\#" $(switch_builddir)/modules.conf) FOUND_MODULES = $(shell find . -type d -name mod_\*) -OUR_MODULES = `if test -z $(MODULES) ; then echo $(CONF_MODULES) ; else echo $(MODULES) ; fi ;` -OUR_CLEAN_MODULES = `if test -z $(MODULES) ; then echo $(CONF_MODULES) $(FOUND_MODULES) ; else echo $(MODULES) ; fi ;` +OUR_MODULES = `if test -z "$(MODULES)" ; then echo $(CONF_MODULES) ; else echo $(MODULES) ; fi ;` +OUR_CLEAN_MODULES = `if test -z "$(MODULES)" ; then echo $(CONF_MODULES) $(FOUND_MODULES) ; else echo $(MODULES) ; fi ;` MOD_NAME = `echo $$i | sed -e 's|^.*/||'` MOD_DIR = `if test -d $(switch_srcdir)/src/mod/$$i ; then echo $(switch_srcdir)/src/mod/$$i ; else echo $$i ; fi;` all: all-am @@ -361,7 +361,6 @@ all: @for i in $(OUR_MODULES) ; do \ echo making $$i ; \ moddir=$(MOD_DIR); \ - echo $(MOD_NAME); \ if test -f $$moddir/Makefile ; then \ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) ; else \ cd $$moddir && MODNAME=$(MOD_NAME) BASE=$(switch_builddir) $(MAKE) -f $(switch_builddir)/build/modmake.rules ; \ diff --git a/src/mod/languages/mod_spidermonkey/Makefile b/src/mod/languages/mod_spidermonkey/Makefile index e370f6398c..7b2ba3fb18 100644 --- a/src/mod/languages/mod_spidermonkey/Makefile +++ b/src/mod/languages/mod_spidermonkey/Makefile @@ -1,15 +1,17 @@ MODNAME=mod_spidermonkey -include sm.mak WANT_CURL=yes -include ../../../../build/modmake.rules -local_depend: - cd $(BASE)/libs/curl && $(MAKE) - cd $(BASE)/libs/js/nsprpub && $(MAKE) - cd $(BASE)/libs/js && $(MAKE) +LOCAL_CFLAGS= +LOCAL_LDFLAGS= +LOCAL_LIBADD= -depend_install: - cd $(BASE)/libs/js/nsprpub && $(MAKE) install - cd $(BASE)/libs/js && $(MAKE) install - $(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) +include sm.mak + +depend_install: $(DESTDIR)$(PREFIX)/lib/libjs.la + +$(DESTDIR)$(PREFIX)/lib/libjs.la: $(JS_DIR)/nsprpub/pr/src/libnspr4.so $(JS_DIR)/nsprpub/lib/ds/libplds4.so $(JS_DIR)/nsprpub/lib/libc/src/libplc4.so $(JS_DIR)/libjs.la + cd $(JS_DIR)/nsprpub/pr/src && $(INSTALL) libnspr4.so $(DESTDIR)$(PREFIX)/lib + cd $(JS_DIR)/nsprpub/lib/ds && $(INSTALL) libplds4.so $(DESTDIR)$(PREFIX)/lib + cd $(JS_DIR)/nsprpub/lib/libc/src && $(INSTALL) libplc4.so $(DESTDIR)$(PREFIX)/lib + cd $(JS_DIR) && $(LTINSTALL) libjs.la $(DESTDIR)$(PREFIX)/lib diff --git a/src/mod/languages/mod_spidermonkey/sm.mak b/src/mod/languages/mod_spidermonkey/sm.mak index 44bd73ed4c..c50e90e4ce 100644 --- a/src/mod/languages/mod_spidermonkey/sm.mak +++ b/src/mod/languages/mod_spidermonkey/sm.mak @@ -1,2 +1,13 @@ -LOCAL_CFLAGS = -I$(BASE)/libs/js/src -I$(BASE)/libs/js/nsprpub/dist/include/nspr -DXP_UNIX -I../mod_spidermonkey -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 -LOCAL_LDFLAGS = -L$(BASE)/libs/js/nsprpub/pr/src -L$(BASE)/libs/js/nsprpub/dist/lib -lnspr4 $(BASE)/libs/js/libjs.la +switch_srcdir=../../../.. +JS_DIR=$(switch_srcdir)/libs/js +JSLA=$(JS_DIR)/libjs.la + +LOCAL_CFLAGS+=-I$(JS_DIR)/src -I$(JS_DIR)/nsprpub/dist/include/nspr -DXP_UNIX -I../mod_spidermonkey -DJS_THREADSAFE -DJS_HAS_FILE_OBJECT=1 +LOCAL_LDFLAGS+=-L$(JS_DIR)/nsprpub/pr/src -L$(JS_DIR)/nsprpub/dist/lib -lnspr4 +LOCAL_LIBADD+=$(JSLA) + +include $(switch_srcdir)/build/modmake.rules + +$(JSLA): + cd $(JS_DIR)/nsprpub && $(MAKE) + cd $(JS_DIR) && $(MAKE) diff --git a/src/mod/languages/mod_spidermonkey_core_db/Makefile b/src/mod/languages/mod_spidermonkey_core_db/Makefile index e05a62716c..0c3c4df326 100644 --- a/src/mod/languages/mod_spidermonkey_core_db/Makefile +++ b/src/mod/languages/mod_spidermonkey_core_db/Makefile @@ -1,3 +1,7 @@ -include ../mod_spidermonkey/sm.mak MODNAME=mod_spidermonkey_core_db -include ../../../../build/modmake.rules +switch_srcdir=../../../.. +LOCAL_CFLAGS= +LOCAL_LDFLAGS= +LOCAL_LIBADD= +include ../mod_spidermonkey/sm.mak + diff --git a/src/mod/languages/mod_spidermonkey_etpan/Makefile b/src/mod/languages/mod_spidermonkey_etpan/Makefile index ba3ea0e311..ca767e88b8 100644 --- a/src/mod/languages/mod_spidermonkey_etpan/Makefile +++ b/src/mod/languages/mod_spidermonkey_etpan/Makefile @@ -1,14 +1,16 @@ -include ../mod_spidermonkey/sm.mak -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: - -# and define these variables to impact your build MODNAME=mod_spidermonkey_etpan -#LOCAL_CFLAGS= -LOCAL_LDFLAGS+=-letpan -#LOCAL_OBJS= -include ../../../../build/modmake.rules -local_depend: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install libetpan --prefix=$(PREFIX) +switch_srcdir=../../../.. + +ETPAN_DIR=$(switch_srcdir)/libs/libetpan +ETPANLA=$(ETPAN_DIR)/src/libetpan.la + +LOCAL_CFLAGS=-I$(ETPAN_DIR)/include +LOCAL_LDFLAGS= +LOCAL_LIBADD=$(ETPANLA) + +include ../mod_spidermonkey/sm.mak + +$(ETPANLA): + cd $(ETPAN_DIR) && $(MAKE) diff --git a/src/mod/languages/mod_spidermonkey_odbc/Makefile b/src/mod/languages/mod_spidermonkey_odbc/Makefile index 3921b0a591..f228911e1b 100644 --- a/src/mod/languages/mod_spidermonkey_odbc/Makefile +++ b/src/mod/languages/mod_spidermonkey_odbc/Makefile @@ -1,14 +1,26 @@ -include ../mod_spidermonkey/sm.mak -# define these targets in your makefile if you wish -# local_all local_depend local_clean depend_install local_install local_distclean local_extraclean: - -# and define these variables to impact your build MODNAME=mod_spidermonkey_odbc -#LOCAL_CFLAGS= -LOCAL_LDFLAGS+=-lodbc -#LOCAL_OBJS= -include ../../../../build/modmake.rules +switch_srcdir=../../../.. -local_depend: - MAKE=$(MAKE) $(BASE)/build/buildlib.sh $(BASE) install unixODBC-2.2.12.tar.gz --prefix=$(PREFIX) --disable-gui --without-x --with-pic +ODBC=unixODBC-2.2.12 +ODBC_DIR=$(switch_srcdir)/libs/$(ODBC) +ODBCLA=libodbc.la +UNINST_ODBCLA=$(ODBC_DIR)/DriverManager/$(ODBCLA) +INST_ODBCLA=$(DESTDIR)$(PREFIX)/lib/$(ODBCLA) +LOCAL_CFLAGS=-I$(ODBC_DIR)/include +LOCAL_LDFLAGS= +LOCAL_LIBADD=$(UNINST_ODBCLA) + +include ../mod_spidermonkey/sm.mak + +$(ODBC_DIR)/Makefile: + $(GETLIB) $(ODBC).tar.gz + cd $(ODBC_DIR) && ./configure --prefix=$(PREFIX) --disable-gui --without-x --with-pic + +$(UNINST_ODBCLA): $(ODBC_DIR)/Makefile + cd $(ODBC_DIR) && $(MAKE) + +depend_install: $(INST_ODBCLA) + +$(INST_ODBCLA): $(UNINST_ODBCLA) + cd $(ODBC_DIR) && $(MAKE) install diff --git a/src/mod/languages/mod_spidermonkey_skel/Makefile b/src/mod/languages/mod_spidermonkey_skel/Makefile index 5411b8f53e..c1083d199d 100644 --- a/src/mod/languages/mod_spidermonkey_skel/Makefile +++ b/src/mod/languages/mod_spidermonkey_skel/Makefile @@ -1,4 +1,7 @@ -include ../mod_spidermonkey/sm.mak MODNAME=mod_spidermonkey_skel -include ../../../../build/modmake.rules +switch_srcdir=../../../.. +LOCAL_CFLAGS= +LOCAL_LDFLAGS= +LOCAL_LIBADD= +include ../mod_spidermonkey/sm.mak diff --git a/src/mod/languages/mod_spidermonkey_teletone/Makefile b/src/mod/languages/mod_spidermonkey_teletone/Makefile index d6e744b2a6..bf7b763d3a 100644 --- a/src/mod/languages/mod_spidermonkey_teletone/Makefile +++ b/src/mod/languages/mod_spidermonkey_teletone/Makefile @@ -1,5 +1,7 @@ MODNAME=mod_spidermonkey_teletone +switch_srcdir=../../../.. +LOCAL_CFLAGS=-I$(switch_srcdir)/libs/libteletone/src +LOCAL_LDFLAGS= +LOCAL_LIBADD=$(switch_srcdir)/libs/libteletone/libteletone.la include ../mod_spidermonkey/sm.mak -LOCAL_CFLAGS+=-I$(BASE)/libs/libteletone/src -LOCAL_LDFLAGS+=$(BASE)/libs/libteletone/libteletone.la -include ../../../../build/modmake.rules +