Revision
219
Author
gstaplin@apple.com
Date
2009-02-21 17:12:06 -0800 (Sat, 21 Feb 2009)

Log Message

Fix an error that caused a mkdir to fail due to the directory existing.

This occurred when a source file was changed and the libGL targets were rebuilt.

Modified Paths

Diff

Modified: AppleSGLX/trunk/Makefile (218 => 219)


--- AppleSGLX/trunk/Makefile	2009-02-21 09:50:25 UTC (rev 218)
+++ AppleSGLX/trunk/Makefile	2009-02-22 01:12:06 UTC (rev 219)
@@ -35,11 +35,11 @@
 #This is used for building the tests.
 #The tests don't require installation.
 $(TEST_BUILD_DIR)/libGL.dylib: $(OBJECTS)
-	$(MKDIR) $(TEST_BUILD_DIR)
+	-if ! test -d $(TEST_BUILD_DIR); then $(MKDIR) $(TEST_BUILD_DIR); fi
 	$(CC) -o $@ -dynamiclib -lXplugin -framework ApplicationServices -framework CoreFoundation -L$(X11_DIR)/lib -lX11 -lXext -Wl,-exported_symbols_list,exports.list $(OBJECTS)
 
 $(BUILD_DIR)/libGL.1.2.dylib: $(OBJECTS)
-	$(MKDIR) $(BUILD_DIR)
+	-if ! test -d $(BUILD_DIR); then $(MKDIR) $(BUILD_DIR); fi
 	$(CC) $(GL_CFLAGS) -o $@ -dynamiclib -install_name $(INSTALL_DIR)/lib/libGL.1.2.dylib -compatibility_version 1.2 -current_version 1.2 -lXplugin -framework ApplicationServices -framework CoreFoundation $(GL_LDFLAGS) -lXext -lX11 -Wl,-exported_symbols_list,exports.list $(OBJECTS)
 
 .c.o: