Commit c32bea66 authored by Hib Eris's avatar Hib Eris

[build] Rename DATADIR with EVINCEDATADIR

Defining DATADIR conflicts with win32 api (ObjIdl.h), so this define is
renamed to EVINCEDATADIR.
parent d28b2a4d
...@@ -2,7 +2,7 @@ INCLUDES = \ ...@@ -2,7 +2,7 @@ INCLUDES = \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_srcdir)/libdocument \ -I$(top_srcdir)/libdocument \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DDATADIR=\""$(datadir)"\" \ -DEVINCEDATADIR=\""$(datadir)"\" \
-DEVINCE_COMPILATION \ -DEVINCE_COMPILATION \
$(BACKEND_CFLAGS) \ $(BACKEND_CFLAGS) \
$(WARN_CFLAGS) \ $(WARN_CFLAGS) \
......
...@@ -95,7 +95,7 @@ GTKDOC_CFLAGS = \ ...@@ -95,7 +95,7 @@ GTKDOC_CFLAGS = \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir) \ -I$(top_builddir) \
-I$(top_srcdir)/libdocument \ -I$(top_srcdir)/libdocument \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-DGNOMEDATADIR=\"$(datadir)\" \ -DGNOMEDATADIR=\"$(datadir)\" \
-DEVINCE_UIDIR=\"$(pkgdatadir)\" \ -DEVINCE_UIDIR=\"$(pkgdatadir)\" \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
......
...@@ -101,7 +101,7 @@ GTKDOC_CFLAGS = \ ...@@ -101,7 +101,7 @@ GTKDOC_CFLAGS = \
-I$(top_srcdir)/libview \ -I$(top_srcdir)/libview \
-I$(top_srcdir)/libdocument \ -I$(top_srcdir)/libdocument \
-I$(top_builddir)/libdocument \ -I$(top_builddir)/libdocument \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-DGNOMEDATADIR=\"$(datadir)\" \ -DGNOMEDATADIR=\"$(datadir)\" \
-DEVINCE_UIDIR=\"$(pkgdatadir)\" \ -DEVINCE_UIDIR=\"$(pkgdatadir)\" \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
......
...@@ -99,7 +99,7 @@ GTKDOC_CFLAGS = \ ...@@ -99,7 +99,7 @@ GTKDOC_CFLAGS = \
-I$(top_srcdir)/libmisc \ -I$(top_srcdir)/libmisc \
-I$(top_builddir)/libview \ -I$(top_builddir)/libview \
-I$(top_srcdir)/properties \ -I$(top_srcdir)/properties \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-DGNOMEDATADIR=\"$(datadir)\" \ -DGNOMEDATADIR=\"$(datadir)\" \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DGNOMEICONDIR=\""$(datadir)/pixmaps"\" \ -DGNOMEICONDIR=\""$(datadir)/pixmaps"\" \
......
...@@ -7,7 +7,7 @@ libevmisc_la_SOURCES = \ ...@@ -7,7 +7,7 @@ libevmisc_la_SOURCES = \
ev-page-action-widget.h ev-page-action-widget.h
libevmisc_la_CFLAGS = \ libevmisc_la_CFLAGS = \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_srcdir)/libdocument \ -I$(top_srcdir)/libdocument \
-I$(top_srcdir)/libview \ -I$(top_srcdir)/libview \
......
...@@ -50,7 +50,7 @@ libevview_la_SOURCES = \ ...@@ -50,7 +50,7 @@ libevview_la_SOURCES = \
$(INST_H_FILES) $(INST_H_FILES)
libevview_la_CPPFLAGS = \ libevview_la_CPPFLAGS = \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-DG_LOG_DOMAIN=\"EvinceView\" \ -DG_LOG_DOMAIN=\"EvinceView\" \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-DEVINCE_COMPILATION \ -DEVINCE_COMPILATION \
......
...@@ -100,7 +100,7 @@ ev_stock_icons_init (void) ...@@ -100,7 +100,7 @@ ev_stock_icons_init (void)
ev_icons_path = g_build_filename (dir, "share", "evince", "icons", NULL); ev_icons_path = g_build_filename (dir, "share", "evince", "icons", NULL);
g_free (dir); g_free (dir);
#else #else
ev_icons_path = g_build_filename (DATADIR, "icons", NULL); ev_icons_path = g_build_filename (EVINCEDATADIR, "icons", NULL);
#endif #endif
factory = gtk_icon_factory_new (); factory = gtk_icon_factory_new ();
......
...@@ -7,7 +7,7 @@ evince_previewer_SOURCES = \ ...@@ -7,7 +7,7 @@ evince_previewer_SOURCES = \
ev-previewer-window.c ev-previewer-window.c
evince_previewer_CPPFLAGS = \ evince_previewer_CPPFLAGS = \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir) \ -I$(top_builddir) \
-I$(top_srcdir)/libdocument \ -I$(top_srcdir)/libdocument \
......
...@@ -487,7 +487,7 @@ data_dir (void) ...@@ -487,7 +487,7 @@ data_dir (void)
datadir = g_build_filename (dir, "share", "evince", NULL); datadir = g_build_filename (dir, "share", "evince", NULL);
g_free (dir); g_free (dir);
#else #else
datadir = g_strdup (DATADIR); datadir = g_strdup (EVINCEDATADIR);
#endif #endif
return datadir; return datadir;
......
...@@ -28,9 +28,6 @@ ...@@ -28,9 +28,6 @@
#include "ev-previewer-window.h" #include "ev-previewer-window.h"
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#ifdef DATADIR
#undef DATADIR
#endif
#include <io.h> #include <io.h>
#include <conio.h> #include <conio.h>
#if !(_WIN32_WINNT >= 0x0500) #if !(_WIN32_WINNT >= 0x0500)
......
INCLUDES= \ INCLUDES= \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir) \ -I$(top_builddir) \
......
INCLUDES= \ INCLUDES= \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-DGNOMEDATADIR=\"$(datadir)\" \ -DGNOMEDATADIR=\"$(datadir)\" \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir) \ -I$(top_builddir) \
...@@ -131,7 +131,7 @@ evinced_SOURCES= \ ...@@ -131,7 +131,7 @@ evinced_SOURCES= \
ev-daemon.c ev-daemon.c
evinced_CFLAGS= \ evinced_CFLAGS= \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-DGNOMEDATADIR=\"$(datadir)\" \ -DGNOMEDATADIR=\"$(datadir)\" \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir) \ -I$(top_builddir) \
......
...@@ -985,7 +985,7 @@ ev_application_init (EvApplication *ev_application) ...@@ -985,7 +985,7 @@ ev_application_init (EvApplication *ev_application)
g_free (dir); g_free (dir);
} }
#else #else
ev_application->data_dir = g_strdup (DATADIR); ev_application->data_dir = g_strdup (EVINCEDATADIR);
#endif #endif
ev_application_init_session (ev_application); ev_application_init_session (ev_application);
......
...@@ -41,9 +41,6 @@ ...@@ -41,9 +41,6 @@
#endif /* WITH_SMCLIENT */ #endif /* WITH_SMCLIENT */
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#ifdef DATADIR
#undef DATADIR
#endif
#include <io.h> #include <io.h>
#include <conio.h> #include <conio.h>
#if !(_WIN32_WINNT >= 0x0500) #if !(_WIN32_WINNT >= 0x0500)
......
...@@ -5,7 +5,7 @@ evince_thumbnailer_SOURCES = \ ...@@ -5,7 +5,7 @@ evince_thumbnailer_SOURCES = \
evince-thumbnailer.c evince-thumbnailer.c
evince_thumbnailer_CPPFLAGS = \ evince_thumbnailer_CPPFLAGS = \
-DDATADIR=\"$(pkgdatadir)\" \ -DEVINCEDATADIR=\"$(pkgdatadir)\" \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir) \ -I$(top_builddir) \
-DGNOMELOCALEDIR=\"$(datadir)/locale\" \ -DGNOMELOCALEDIR=\"$(datadir)/locale\" \
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
#include <string.h> #include <string.h>
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
#ifdef DATADIR
#undef DATADIR
#endif
#include <io.h> #include <io.h>
#include <conio.h> #include <conio.h>
#if !(_WIN32_WINNT >= 0x0500) #if !(_WIN32_WINNT >= 0x0500)
...@@ -156,7 +153,7 @@ evince_thumbnail_pngenc_get (EvDocument *document, const char *thumbnail, int si ...@@ -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); gchar *overlaid_icon_path = g_build_filename (dir, "share", "evince", overlaid_icon_name, NULL);
g_free (dir); g_free (dir);
#else #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 #endif
overlaid_pixbuf = gdk_pixbuf_new_from_file (overlaid_icon_path, NULL); overlaid_pixbuf = gdk_pixbuf_new_from_file (overlaid_icon_path, NULL);
g_free (overlaid_icon_path); g_free (overlaid_icon_path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment