[asterisk-commits] kpfleming: trunk r157167 - /trunk/Makefile.rules

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Nov 15 13:51:29 CST 2008


Author: kpfleming
Date: Sat Nov 15 13:51:29 2008
New Revision: 157167

URL: http://svn.digium.com/view/asterisk?view=rev&rev=157167
Log:
ensure that if a .i file (preprocessed source) is present, the .o file is made from it, not from the .c file (this only works because GNU makes respects the order the rules are defined)

Modified:
    trunk/Makefile.rules

Modified: trunk/Makefile.rules
URL: http://svn.digium.com/view/asterisk/trunk/Makefile.rules?view=diff&rev=157167&r1=157166&r2=157167
==============================================================================
--- trunk/Makefile.rules (original)
+++ trunk/Makefile.rules Sat Nov 15 13:51:29 2008
@@ -43,12 +43,12 @@
 endif
 
 # build rules for various targets
+%.o: %.i
+	$(ECHO_PREFIX) echo "   [CCi] $< -> $@"
+	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) $(MAKE_DEPS)
+
 %.o: %.c
 	$(ECHO_PREFIX) echo "   [CC] $< -> $@"
-	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) $(MAKE_DEPS)
-
-%.o: %.i
-	$(ECHO_PREFIX) echo "   [CCi] $< -> $@"
 	$(CMD_PREFIX) $(CC) -o $@ -c $< $(PTHREAD_CFLAGS) $(ASTCFLAGS) $(MAKE_DEPS)
 
 %.i: %.c




More information about the asterisk-commits mailing list