]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use better tricks in mod_cdr Makefile.am so we don't get warnings about duplicate...
authorMichael Jerris <mike@jerris.com>
Thu, 29 Mar 2007 02:58:02 +0000 (02:58 +0000)
committerMichael Jerris <mike@jerris.com>
Thu, 29 Mar 2007 02:58:02 +0000 (02:58 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4786 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/event_handlers/mod_cdr/Makefile.am

index 20512688d03753a37d1b902943f7bec5deca3e16..4d708aeb84ffbb9e0cdafefcf78380c2aa51538d 100644 (file)
@@ -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 @@ LINK_OUTPUT_REDIR=> $(MODNAME).log || error="yes" ; \
 
 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 @@ endif
 #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)