[Freeswitch-svn] [commit] r4652 - in freeswitch/trunk: build src/mod/event_handlers/mod_cdr

Freeswitch SVN mikej at freeswitch.org
Mon Mar 19 08:16:47 EDT 2007


Author: mikej
Date: Mon Mar 19 08:16:46 2007
New Revision: 4652

Modified:
   freeswitch/trunk/build/modmake.rules.in
   freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile

Log:
remove gmakeisms from the mod_cdr makefile

Modified: freeswitch/trunk/build/modmake.rules.in
==============================================================================
--- freeswitch/trunk/build/modmake.rules.in	(original)
+++ freeswitch/trunk/build/modmake.rules.in	Mon Mar 19 08:16:46 2007
@@ -52,7 +52,7 @@
 MAKE_OPTS = `test -n "$(VERBOSE)" || echo -s`
 RECURSE_MODNAME=`pwd | sed -e 's|^.*/||'`
 RECURSE_SOURCEFILE=`if test -f $$modname.cpp; then echo $$modname.cpp; else echo $$modname.c; fi`
-RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi`
+RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi `
 RECURSE_OUR_CFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS) ; $(LOCAL_INSERT_CFLAGS) `
 RECURSE_OUR_LDFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL) ; $(LOCAL_INSERT_LDFLAGS) `
 RECURSE_MAKE=modname="$(RECURSE_MODNAME)" ; \
@@ -61,7 +61,9 @@
 		ourdefs="$(RECURSE_OUR_DEPS)" ; \
 		ourcflags="$(RECURSE_OUR_CFLAGS)" ; \
 		ourldflags="$(RECURSE_OUR_LDFLAGS)" ; \
-		$(MAKE) $(MAKE_OPTS) MODNAME="$$modname" SOURCEFILE="$$sourcefile" OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" 
+		insertobjs="`$(LOCAL_INSERT_OBJS)`" ; \
+		$(MAKE) $(MAKE_OPTS) MODNAME="$$modname" SOURCEFILE="$$sourcefile" \
+			OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" OUR_OBJS="$$insertobjs"
 
 all: Makefile
 	@$(RECURSE_MAKE) all-modules || exit 1
@@ -104,14 +106,14 @@
 			  exit 1 ;\
 			 fi 
 
-$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(SOURCEFILE) $(MODNAME).o 
+$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(OUR_OBJS) $(SOURCEFILE) $(MODNAME).o 
 	@echo Creating $@...
 	@test -d .libs || mkdir .libs
 	@error="";\
 	if test -f $(CSOURCEFILE); then \
-	$(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\
+	$(LINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(OUR_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\
 	else \
-	$(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\
+	$(CXXLINK) $(SOLINK) $(MODNAME).o -o $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(LIBS) $(LOCAL_LDFLAGS) $(LOCAL_OBJS) $(OUR_OBJS) $(LOCAL_LIBADD) $(LINK_OUTPUT_REDIR) ;\
 	fi;
 
 mod_clean:

Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile	Mon Mar 19 08:16:46 2007
@@ -10,10 +10,8 @@
 #LOCAL_CFLAGS  += -DSWITCH_QUEUE_ENHANCED
 #LOCAL_LDFLAGS += -lcurl
 
-ifneq ($(shell which mysql_config),)
-  LOCAL_CFLAGS  += $(shell mysql_config --include)
-  LOCAL_LDFLAGS += $(shell mysql_config --libs)
-  LOCAL_OBJS    += mysqlcdr.o
-endif
+LOCAL_INSERT_CFLAGS=mysql_config="\`which mysql-config 2>/dev/null \`"; if test -n "$$mysql_config"; then echo "\`mysql_config --include\`" ; fi 
+LOCAL_INSERT_LDFLAGS=mysql_config="\`which mysql-config 2>/dev/null \`"; if test -n "$$mysql_config"; then echo "\`mysql_config --libs\`" ; fi 
+LOCAL_INSERT_OBJS=mysql_config="\`which mysql-config 2>/dev/null \`"; if test -n "$$mysql_config"; then echo "mysqlcdr.o" ; fi 
 
 include ../../../../build/modmake.rules



More information about the Freeswitch-svn mailing list