[Freeswitch-svn] [commit] r4786 - freeswitch/trunk/src/mod/event_handlers/mod_cdr

Freeswitch SVN mikej at freeswitch.org
Wed Mar 28 22:58:03 EDT 2007


Author: mikej
Date: Wed Mar 28 22:58:02 2007
New Revision: 4786

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile.am

Log:
use better tricks in mod_cdr Makefile.am so we don't get warnings about duplicate targets, and so we can move all our tricks into configure soon

Modified: freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile.am
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile.am	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_cdr/Makefile.am	Wed Mar 28 22:58:02 2007
@@ -1,7 +1,16 @@
 #we should set all these vars from configure, no reason to have these in each Makefile.am
-LIBTOOL=`if test -z "$(VERBOSE)" ; then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(switch_builddir)/libtool;  fi;`
+#LIBTOOL = compile=`echo $<|grep .c`;link=`echo $@|grep .la;echo $@|grep .so;echo $@|grep .dll`; if test -n "$$compile"; then echo Compiling $<;fi; if test -n "$$link"; then echo Creating $@;fi; `if test -z "$(VERBOSE)" ; then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(switch_builddir)/libtool;  fi;`
+#LIBTOOL=`if test -z "$(VERBOSE)" ; then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(switch_builddir)/libtool;  fi;`
+LIBTOOL = 	link=`echo $@|grep .la;echo $@|grep .so;echo $@|grep .dll`; \
+		if test -n "$$link"; then echo Creating $@;fi; \
+		`if test -z "$(VERBOSE)" ; \
+		then echo $(SHELL) $(switch_builddir)/quiet_libtool ;\
+		else echo $(switch_builddir)/libtool;  fi;`
+
 AM_MAKEFLAGS=`test -n "$(VERBOSE)" || echo -s`
-LINK_OUTPUT_REDIR=> $(MODNAME).log || error="yes" ; \
+
+# Dirty trick to override the link output
+LIBS+=> $(MODNAME).log || error="yes" ; \
 			if test -n "$(VERBOSE)" -o "$$error" = "yes"; then \
 			  cat $(MODNAME).log ; \
 			fi ;\
@@ -11,8 +20,6 @@
 
 moddir=$(prefix)/mod
 
-
-
 MODNAME=mod_cdr
 mod_LTLIBRARIES = mod_cdr.la
 mod_cdr_la_SOURCES = mod_cdr.cpp cdrcontainer.cpp basecdr.cpp baseregistry.cpp pddcdr.cpp csvcdr.cpp xmlcdr.cpp sqlitecdr.cpp
@@ -30,12 +37,6 @@
 #mod_cdr_la_CFLAGS  += -DSWITCH_QUEUE_ENHANCED
 #mod_cdr_la_LDFLAGS += -lcurl
 
-#Override link target so we can control the output
-
-$(MODNAME).la: $(mod_cdr_la_OBJECTS) $(mod_cdr_la_DEPENDENCIES)
-	@echo Creating $(MODNAME).$(DYNAMIC_LIB_EXTEN)...
-	@$(CXXLINK) -rpath $(moddir) $(mod_cdr_la_LDFLAGS) $(mod_cdr_la_OBJECTS) $(mod_cdr_la_LIBADD) $(LIBS) $(LINK_OUTPUT_REDIR)
-
 #Override the linstall target so we just install the .so/.dylib
 
 install-data-am: $(DESTDIR)$(PREFIX)/$(moddir)/$(MODNAME).$(DYNAMIC_LIB_EXTEN)



More information about the Freeswitch-svn mailing list