[dia] Remove empty files if generating them fails



commit 34bf9c02c850e5047d8bda82e8d19afb6d8376ec
Author: Hans Breuer <hans breuer org>
Date:   Sun May 3 15:57:00 2009 +0200

    Remove empty files if generating them fails
---
 app/makefile.msc |    2 +-
 lib/makefile.msc |   14 ++++++++------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/app/makefile.msc b/app/makefile.msc
index e3c1bde..ca6b773 100644
--- a/app/makefile.msc
+++ b/app/makefile.msc
@@ -105,7 +105,7 @@ ICON_PNG_PAIRS = \
 
 dia-app-icons.h : makefile.msc pixmaps\*.png
 	gdk-pixbuf-csource --build-list \
-	$(ICON_PNG_PAIRS) > dia-app-icons.h
+	$(ICON_PNG_PAIRS) > dia-app-icons.h || del dia-app-icons.h
 
 # No general LDFLAGS needed
 # /subsystem:console and /subsystem:windows have their own exe
diff --git a/lib/makefile.msc b/lib/makefile.msc
index 70227e7..1af2d7f 100644
--- a/lib/makefile.msc
+++ b/lib/makefile.msc
@@ -7,15 +7,19 @@ PACKAGE = libdia
 #	-DGTK_DISABLE_DEPRECATED \
 
 
-PKG_CFLAGS = -FImsvc_recommended_pragmas.h \
-	-I.. \
-	-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \
+INCLUDES = \
+	-FImsvc_recommended_pragmas.h \
+	-I. -I.. \
 	$(GTK2_CFLAGS) \
 	$(LIBXML2_CFLAGS) \
 	$(ZLIB_CFLAGS) \
 !IFDEF USEFT2
 	-DHAVE_FREETYPE $(FREETYPE2_CFLAGS) \
 !ENDIF
+
+DEFINES = \
+	-DHAVE_CONFIG_H \
+	-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \
 	-DLIBDIA_COMPILATION
 
 # in GTK_CFLAGS: $(GLIB_CFLAGS) 
@@ -37,7 +41,7 @@ ICON_PNG_PAIRS = \
 # I'm not gonna chase goblins right now.
 dia-lib-icons.h:
 	gdk-pixbuf-csource --build-list \
-	$(ICON_PNG_PAIRS) > dia-lib-icons.h
+	$(ICON_PNG_PAIRS) > dia-lib-icons.h || del dia-lib-icons.h
 
 OBJECTS = \
 	autoroute.obj \
@@ -144,8 +148,6 @@ diamarshal.c: diamarshal.h
 LDFLAGS = /link $(LINKDEBUG)
 INSTALL = copy
 
-CFLAGS = -I. -DHAVE_CONFIG_H
-
 ## targets
 all : \
 	$(PRJ_TOP)\config.h \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]