about summary refs log tree commit diff
path: root/common.mk
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-09-23 15:41:11 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2010-09-23 15:41:11 +0000
commite0127ffbf9440f7fa4042eab3bbf741f1185153e (patch)
treeaf571482b745c25e7bff06258314f470c118667b /common.mk
parent6ab48c2924e4db063bdf0073ebf52bae6545eb2c (diff)
downloadnetpbm-mirror-e0127ffbf9440f7fa4042eab3bbf741f1185153e.tar.gz
netpbm-mirror-e0127ffbf9440f7fa4042eab3bbf741f1185153e.tar.xz
netpbm-mirror-e0127ffbf9440f7fa4042eab3bbf741f1185153e.zip
neaten make messages
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1300 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk32
1 files changed, 21 insertions, 11 deletions
diff --git a/common.mk b/common.mk
index 4b905ad4..0c10cbe3 100644
--- a/common.mk
+++ b/common.mk
@@ -150,6 +150,11 @@ importinc: \
   $(IMPORTINC_LIB_FILES) \
   $(IMPORTINC_LIB_UTIL_FILES) \
 
+# The reason we mkdir importinc/netpbm every time instead of just having
+# importinc depend on it and a rule to make it is that as a dependency, it
+# would force importinc to rebuild when importinc/netpbm has a more recent
+# modification date, which it sometimes would.
+
 $(IMPORTINC_ROOT_FILES):importinc/netpbm/%:$(BUILDDIR)/%
 	mkdir -p importinc/netpbm
 	rm -f $@
@@ -211,6 +216,14 @@ config:
 
 # Rule to make regular object files, e.g. pnmtojpeg.o.
 
+# The NDEBUG macro says to build code that assumes there are no bugs.
+# This makes the code go faster.  The main thing it does is tell the C library
+# to make assert() a no-op as opposed to generating code to check the
+# assertion and crash the program if it isn't really true.  You can add
+# -UNDEBUG (in any of various ways) to override this.
+#
+CFLAGS_ALL =  -DNDEBUG $(CPPFLAGS) $(CFLAGS) $(CFLAGS_PERSONAL) $(CADD)
+
 $(OBJECTS): %.o: %.c importinc
 #############################################################################
 # Note that the user may have configured -I options into CFLAGS or CPPFLAGS.
@@ -223,14 +236,8 @@ $(OBJECTS): %.o: %.c importinc
 # the space is no longer a problem for anyone.
 #############################################################################
 #
-# The NDEBUG macro says not to build code that assumes there are no bugs.
-# This makes the code go faster.  The main thing it does is tell the C library
-# to make assert() a no-op as opposed to generating code to check the
-# assertion and crash the program if it isn't really true.  You can add
-# -UNDEBUG (in any of various ways) to override this.
-#
-	$(CC) -c $(INCLUDES) -DNDEBUG \
-	    $(CPPFLAGS) $(CFLAGS) $(CFLAGS_PERSONAL) $(CADD) -o $@ $<
+# We have to get this all on one line to make make messages neat
+	$(CC) -c $(INCLUDES) $(CFLAGS_ALL) -o $@ $<
 
 # libopt is a utility program used in the make file below.
 LIBOPT = $(BUILDDIR)/buildtools/libopt
@@ -334,11 +341,14 @@ endif
 # Earlier ones do it regardless of __FAST_MATH__.
 
 MATHLIB ?= -lm
-$(PORTBINARIES) $(MATHBINARIES): %: %.o $(NETPBMLIB) $(LIBOPT)
+
 # Note that LDFLAGS might contain -L options, so order is important.
 # LDFLAGS is commonly set as an environment variable.
-	$(LD) -o $@ $@.o $(MATHLIB) $(shell $(LIBOPT) $(NETPBMLIB)) \
-	  $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD)
+LDFLAGS_ALL = $(MATHLIB) $(shell $(LIBOPT) $(NETPBMLIB)) \
+ $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD)
+
+$(PORTBINARIES) $(MATHBINARIES): %: %.o $(NETPBMLIB) $(LIBOPT)
+	$(LD) -o $@ $@.o $(LDFLAGS_ALL)
 
 
 # MERGE STUFF