changeset 626:eb0c533e7c48 trunk

[svn] do not forkbomb if we have a malformed makefile
author nenolod
date Tue, 07 Feb 2006 06:40:04 -0800
parents 0a73d1faeb4e
children 287a588f2852
files mk/objective.mk
diffstat 1 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mk/objective.mk	Mon Feb 06 17:10:47 2006 -0800
+++ b/mk/objective.mk	Tue Feb 07 06:40:04 2006 -0800
@@ -109,19 +109,25 @@
 	$(CXX) $(CXXFLAGS) -c $< -o $@
 
 %.so: $(OBJECTS)
-	make $(OBJECTS)
-	printf "%10s     %-20s\n" LINK $@
-	$(CC) -fPIC -DPIC -shared -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD)
+	if test "x$(OBJECTS)" != "x"; then \
+		make $(OBJECTS);		\
+		printf "%10s     %-20s\n" LINK $@; \
+		$(CC) -fPIC -DPIC -shared -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
+	fi
 
 %.a: $(OBJECTS)
-	make $(OBJECTS)
-	printf "%10s     %-20s\n" LINK $@
-	$(AR) cq $@ $(OBJECTS)
+	if test "x$(OBJECTS)" != "x"; then \
+		make $(OBJECTS);		\
+		printf "%10s     %-20s\n" LINK $@; \
+		$(AR) cq $@ $(OBJECTS); \
+	fi
 
 $(OBJECTIVE_BINS): $(OBJECTS)
-	make $(OBJECTS)
-	printf "%10s     %-20s\n" LINK $@
-	$(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD)
+	if test "x$(OBJECTS)" != "x"; then \
+		make $(OBJECTS);		\
+		printf "%10s     %-20s\n" LINK $@; \
+		$(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LIBADD); \
+	fi
 
 clean-prehook:
 clean-posthook: