PATCH: only generate dependencies if using gcc

"Bostock James" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <84E219D8B81E5F4688C4A8992426CD83013178F0@fr-par-mail01.comverse.com>
Hi,

The attached patch changes the build process so that dependencies are
only generated if gcc is being used. The patch only includes the changes
to configure.in and Makefile.in - I left out the changes to configure
because I have a different version of autoconf.

-james
kannel_depend.patch (application/octet-stream, 1.3 KB)
Index: configure.in
===================================================================
RCS file: /home/cvs/gateway/configure.in,v
retrieving revision 1.177
diff -u -r1.177 configure.in
--- configure.in	2 Jul 2008 14:56:31 -0000	1.177
+++ configure.in	7 Jul 2008 09:16:08 -0000
@@ -105,6 +105,7 @@
 dnl Checks for programs.
 
 AC_PROG_CC
+AC_SUBST(GCC)
 AC_PROG_INSTALL
 AC_PROG_RANLIB
 AC_PROG_YACC
Index: Makefile.in
===================================================================
RCS file: /home/cvs/gateway/Makefile.in,v
retrieving revision 1.85
diff -u -r1.85 Makefile.in
--- Makefile.in	24 Jun 2008 15:05:24 -0000	1.85
+++ Makefile.in	7 Jul 2008 09:16:08 -0000
@@ -79,6 +79,7 @@
 CFLAGS=-D_REENTRANT=1 -I. -Igw @CFLAGS@
 LDFLAGS=@LDFLAGS@
 
+GCC=@GCC@
 MKDEPEND=$(CC) $(CFLAGS) -MM
 
 JADE=@JADE@
@@ -329,9 +330,13 @@
 	utils/find-long-lines
 
 depend .depend: wmlscript/wsgram.h gw-config.h
-	for dir in $(srcdirs); do \
-	for file in $$dir/*.c; do \
-	    $(MKDEPEND) $$file -MT $$dir/`basename $$file .c`.o -MT $$dir/`basename $$file .c`.i; done; done > .depend  
+	if test "$GCC" = "yes"; then \
+	    for dir in $(srcdirs); do \
+	        for file in $$dir/*.c; do \
+	            $(MKDEPEND) $$file -MT $$dir/`basename $$file .c`.o -MT $$dir/`basename $$file .c`.i; done; done > .depend; \
+	else \
+	    touch .depend; \
+	fi
 include .depend
 
 libgw.a: $(gwobjs)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.