[evince] [build] Rename DATADIR with EVINCEDATADIR



commit c32bea667da3de3379f86787d8f298caeea3a789
Author: Hib Eris <hib hiberis nl>
Date:   Mon Jul 26 11:58:51 2010 +0200

    [build] Rename DATADIR with EVINCEDATADIR
    
    Defining DATADIR conflicts with win32 api (ObjIdl.h), so this define is
    renamed to EVINCEDATADIR.

 backend/impress/Makefile.am            |    2 +-
 help/reference/libdocument/Makefile.am |    2 +-
 help/reference/libview/Makefile.am     |    2 +-
 help/reference/shell/Makefile.am       |    2 +-
 libmisc/Makefile.am                    |    2 +-
 libview/Makefile.am                    |    2 +-
 libview/ev-stock-icons.c               |    2 +-
 previewer/Makefile.am                  |    2 +-
 previewer/ev-previewer-window.c        |    2 +-
 previewer/ev-previewer.c               |    3 ---
 properties/Makefile.am                 |    2 +-
 shell/Makefile.am                      |    4 ++--
 shell/ev-application.c                 |    2 +-
 shell/main.c                           |    3 ---
 thumbnailer/Makefile.am                |    2 +-
 thumbnailer/evince-thumbnailer.c       |    5 +----
 16 files changed, 15 insertions(+), 24 deletions(-)
---
diff --git a/backend/impress/Makefile.am b/backend/impress/Makefile.am
index c1da9a1..9342d77 100644
--- a/backend/impress/Makefile.am
+++ b/backend/impress/Makefile.am
@@ -2,7 +2,7 @@ INCLUDES =					\
 	-I$(top_srcdir)				\
 	-I$(top_srcdir)/libdocument		\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"	\
-	-DDATADIR=\""$(datadir)"\"		\
+	-DEVINCEDATADIR=\""$(datadir)"\"	\
 	-DEVINCE_COMPILATION			\
 	$(BACKEND_CFLAGS)			\
 	$(WARN_CFLAGS)				\
diff --git a/help/reference/libdocument/Makefile.am b/help/reference/libdocument/Makefile.am
index 03dcf52..f7dace3 100644
--- a/help/reference/libdocument/Makefile.am
+++ b/help/reference/libdocument/Makefile.am
@@ -95,7 +95,7 @@ GTKDOC_CFLAGS = \
 	-I$(top_srcdir)					\
 	-I$(top_builddir)				\
 	-I$(top_srcdir)/libdocument 			\
-	-DDATADIR=\"$(pkgdatadir)\"			\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"		\
 	-DGNOMEDATADIR=\"$(datadir)\"			\
 	-DEVINCE_UIDIR=\"$(pkgdatadir)\" 		\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"		\
diff --git a/help/reference/libview/Makefile.am b/help/reference/libview/Makefile.am
index bfcffcd..d596dab 100644
--- a/help/reference/libview/Makefile.am
+++ b/help/reference/libview/Makefile.am
@@ -101,7 +101,7 @@ GTKDOC_CFLAGS = \
 	-I$(top_srcdir)/libview 			\
 	-I$(top_srcdir)/libdocument                     \
 	-I$(top_builddir)/libdocument                   \
-	-DDATADIR=\"$(pkgdatadir)\"			\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"		\
 	-DGNOMEDATADIR=\"$(datadir)\"			\
 	-DEVINCE_UIDIR=\"$(pkgdatadir)\" 		\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"		\
diff --git a/help/reference/shell/Makefile.am b/help/reference/shell/Makefile.am
index 3d267d5..8c3ee73 100644
--- a/help/reference/shell/Makefile.am
+++ b/help/reference/shell/Makefile.am
@@ -99,7 +99,7 @@ GTKDOC_CFLAGS = \
 	-I$(top_srcdir)/libmisc				\
 	-I$(top_builddir)/libview			\
 	-I$(top_srcdir)/properties			\
-	-DDATADIR=\"$(pkgdatadir)\"			\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"		\
 	-DGNOMEDATADIR=\"$(datadir)\"			\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"		\
 	-DGNOMEICONDIR=\""$(datadir)/pixmaps"\" 	\
diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am
index a6ec774..2809701 100644
--- a/libmisc/Makefile.am
+++ b/libmisc/Makefile.am
@@ -7,7 +7,7 @@ libevmisc_la_SOURCES = \
 	ev-page-action-widget.h
 
 libevmisc_la_CFLAGS =	\
-	-DDATADIR=\"$(pkgdatadir)\"	\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"	\
 	-I$(top_srcdir)			\
 	-I$(top_srcdir)/libdocument	\
 	-I$(top_srcdir)/libview		\
diff --git a/libview/Makefile.am b/libview/Makefile.am
index 23210fa..02e81f3 100644
--- a/libview/Makefile.am
+++ b/libview/Makefile.am
@@ -50,7 +50,7 @@ libevview_la_SOURCES = 			\
 	$(INST_H_FILES)
 
 libevview_la_CPPFLAGS = \
-	-DDATADIR=\"$(pkgdatadir)\"		\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"	\
 	-DG_LOG_DOMAIN=\"EvinceView\"		\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"	\
 	-DEVINCE_COMPILATION			\
diff --git a/libview/ev-stock-icons.c b/libview/ev-stock-icons.c
index 5bbcbbf..47b3943 100644
--- a/libview/ev-stock-icons.c
+++ b/libview/ev-stock-icons.c
@@ -100,7 +100,7 @@ ev_stock_icons_init (void)
 	ev_icons_path = g_build_filename (dir, "share", "evince", "icons", NULL);
 	g_free (dir);
 #else
-	ev_icons_path = g_build_filename (DATADIR, "icons", NULL);
+	ev_icons_path = g_build_filename (EVINCEDATADIR, "icons", NULL);
 #endif
 
         factory = gtk_icon_factory_new ();
diff --git a/previewer/Makefile.am b/previewer/Makefile.am
index da0706c..ab8f95d 100644
--- a/previewer/Makefile.am
+++ b/previewer/Makefile.am
@@ -7,7 +7,7 @@ evince_previewer_SOURCES = \
 	ev-previewer-window.c
 
 evince_previewer_CPPFLAGS = \
-	-DDATADIR=\"$(pkgdatadir)\"		\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"	\
 	-I$(top_srcdir)                         \
 	-I$(top_builddir) 			\
         -I$(top_srcdir)/libdocument             \
diff --git a/previewer/ev-previewer-window.c b/previewer/ev-previewer-window.c
index 67c1708..734941e 100644
--- a/previewer/ev-previewer-window.c
+++ b/previewer/ev-previewer-window.c
@@ -487,7 +487,7 @@ data_dir (void)
 	datadir = g_build_filename (dir, "share", "evince", NULL);
 	g_free (dir);
 #else
-	datadir = g_strdup (DATADIR);
+	datadir = g_strdup (EVINCEDATADIR);
 #endif
 
        return datadir;
diff --git a/previewer/ev-previewer.c b/previewer/ev-previewer.c
index 2b8dea3..5029079 100644
--- a/previewer/ev-previewer.c
+++ b/previewer/ev-previewer.c
@@ -28,9 +28,6 @@
 #include "ev-previewer-window.h"
 
 #ifdef G_OS_WIN32
-#ifdef DATADIR
-#undef DATADIR
-#endif
 #include <io.h>
 #include <conio.h>
 #if !(_WIN32_WINNT >= 0x0500)
diff --git a/properties/Makefile.am b/properties/Makefile.am
index 67b7e7b..de90d72 100644
--- a/properties/Makefile.am
+++ b/properties/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES=					\
-	-DDATADIR=\"$(pkgdatadir)\"		\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"	\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"	\
 	-I$(top_srcdir)				\
 	-I$(top_builddir)			\
diff --git a/shell/Makefile.am b/shell/Makefile.am
index 8336230..d5c5010 100644
--- a/shell/Makefile.am
+++ b/shell/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES=							\
-	-DDATADIR=\"$(pkgdatadir)\"				\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"				\
 	-DGNOMEDATADIR=\"$(datadir)\"				\
 	-I$(top_srcdir)						\
 	-I$(top_builddir)					\
@@ -131,7 +131,7 @@ evinced_SOURCES=			\
 	ev-daemon.c
 
 evinced_CFLAGS=				\
-	-DDATADIR=\"$(pkgdatadir)\"				\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"			\
 	-DGNOMEDATADIR=\"$(datadir)\"				\
 	-I$(top_srcdir)						\
 	-I$(top_builddir)					\
diff --git a/shell/ev-application.c b/shell/ev-application.c
index 0bb7a39..5327825 100644
--- a/shell/ev-application.c
+++ b/shell/ev-application.c
@@ -985,7 +985,7 @@ ev_application_init (EvApplication *ev_application)
 	g_free (dir);
 }
 #else
-	ev_application->data_dir = g_strdup (DATADIR);
+	ev_application->data_dir = g_strdup (EVINCEDATADIR);
 #endif
 
 	ev_application_init_session (ev_application);
diff --git a/shell/main.c b/shell/main.c
index 8d057a0..7d4fb0d 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -41,9 +41,6 @@
 #endif /* WITH_SMCLIENT */
 
 #ifdef G_OS_WIN32
-#ifdef DATADIR
-#undef DATADIR
-#endif
 #include <io.h>
 #include <conio.h>
 #if !(_WIN32_WINNT >= 0x0500)
diff --git a/thumbnailer/Makefile.am b/thumbnailer/Makefile.am
index 45e3d2a..171c00f 100644
--- a/thumbnailer/Makefile.am
+++ b/thumbnailer/Makefile.am
@@ -5,7 +5,7 @@ evince_thumbnailer_SOURCES = \
 	evince-thumbnailer.c
 
 evince_thumbnailer_CPPFLAGS = \
-	-DDATADIR=\"$(pkgdatadir)\"		\
+	-DEVINCEDATADIR=\"$(pkgdatadir)\"	\
 	-I$(top_srcdir)				\
 	-I$(top_builddir)			\
 	-DGNOMELOCALEDIR=\"$(datadir)/locale\"	\
diff --git a/thumbnailer/evince-thumbnailer.c b/thumbnailer/evince-thumbnailer.c
index 69c8a8d..31da3d3 100644
--- a/thumbnailer/evince-thumbnailer.c
+++ b/thumbnailer/evince-thumbnailer.c
@@ -26,9 +26,6 @@
 #include <string.h>
 
 #ifdef G_OS_WIN32
-#ifdef DATADIR
-#undef DATADIR
-#endif
 #include <io.h>
 #include <conio.h>
 #if !(_WIN32_WINNT >= 0x0500)
@@ -156,7 +153,7 @@ evince_thumbnail_pngenc_get (EvDocument *document, const char *thumbnail, int si
 			gchar *overlaid_icon_path = g_build_filename (dir, "share", "evince", overlaid_icon_name, NULL);
 			g_free (dir);
 #else
-			gchar *overlaid_icon_path = g_strdup_printf ("%s/%s", DATADIR, overlaid_icon_name);
+			gchar *overlaid_icon_path = g_strdup_printf ("%s/%s", EVINCEDATADIR, overlaid_icon_name);
 #endif
 			overlaid_pixbuf = gdk_pixbuf_new_from_file (overlaid_icon_path, NULL);
 			g_free (overlaid_icon_path);



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