SF.net SVN: geany: [2117] trunk
eht16 at users.sourceforge.net
eht16 at xxxxx
Wed Dec 19 15:37:11 UTC 2007
Revision: 2117
http://geany.svn.sourceforge.net/geany/?rev=2117&view=rev
Author: eht16
Date: 2007-12-19 07:37:10 -0800 (Wed, 19 Dec 2007)
Log Message:
-----------
Prefix autotools macros with GEANY to avoid problems with already defined symbols on Windows.
Modified Paths:
--------------
trunk/ChangeLog
trunk/HACKING
trunk/src/Makefile.am
trunk/src/build.c
trunk/src/main.c
trunk/src/makefile.win32
trunk/src/plugins.c
trunk/src/prefix.h
trunk/src/symbols.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/ChangeLog 2007-12-19 15:37:10 UTC (rev 2117)
@@ -2,6 +2,10 @@
* TODO, src/main.c: Apply patch Jeff Pohlmeyer to handle unknown
command line options better (thanks).
+ * HACKING, src/Makefile.am, src/main.c, src/makefile.win32,
+ src/plugins.c, src/prefix.h, src/symbols.c:
+ Prefix autotools macros with GEANY to avoid problems with already
+ defined symbols on Windows.
2007-12-18 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/HACKING 2007-12-19 15:37:10 UTC (rev 2117)
@@ -89,12 +89,13 @@
Using pre-defined autotools values
----------------------------------
-When you are use macros supplied by the autotools like PREFIX, LIBDIR,
-DATADIR and LOCALEDIR be aware that these might not be static strings
-when Geany is configured with --enable-binreloc. Then these macros will
-be replaced by function calls (in src/prefix.h). So, don't use anything
-like printf("Prefix: " PREFIX); but instead use
-printf("Prefix: %s", PREFIX);
+When you are use macros supplied by the autotools like GEANY_PREFIX,
+GEANY_LIBDIR, GEANY_DATADIR and GEANY_LOCALEDIR be aware that these
+might not be static strings when Geany is configured with
+--enable-binreloc. Then these macros will be replaced by function calls
+(in src/prefix.h). So, don't use anything like
+printf("Prefix: " GEANY_PREFIX); but instead use
+printf("Prefix: %s", GEANY_PREFIX);
Adding a file foo.[hc] in src/ or plugins/
------------------------------------------
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/src/Makefile.am 2007-12-19 15:37:10 UTC (rev 2117)
@@ -76,8 +76,8 @@
geany_LDADD = ../scintilla/libscintilla.a ../tagmanager/libtagmanager.a @GTK_LIBS@ $(INTLLIBS)
INCLUDES = \
- -DDATADIR=\""$(datadir)"\" -DLIBDIR=\""$(libdir)"\" \
- -DLOCALEDIR=\""$(localedir)"\" -DPREFIX=\""$(prefix)"\" \
+ -DGEANY_DATADIR=\""$(datadir)"\" -DGEANY_LIBDIR=\""$(libdir)"\" \
+ -DGEANY_LOCALEDIR=\""$(localedir)"\" -DGEANY_PREFIX=\""$(prefix)"\" \
-I$(srcdir)/../scintilla/include -I$(srcdir)/../tagmanager/include @GTK_CFLAGS@
clean-local:
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/src/build.c 2007-12-19 15:37:10 UTC (rev 2117)
@@ -760,7 +760,6 @@
static GPid build_run_cmd(gint idx)
{
- GeanyProject *project = app->project;
gchar *working_dir;
gchar *vte_cmd_nonscript = NULL;
GError *error = NULL;
@@ -779,6 +778,7 @@
#ifdef HAVE_VTE
if (vte_info.load_vte && vc != NULL && vc->run_in_vte)
{
+ GeanyProject *project = app->project;
gchar *vte_cmd;
if (vc->skip_run_script)
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/src/main.c 2007-12-19 15:37:10 UTC (rev 2117)
@@ -381,8 +381,8 @@
g_free(install_dir);
#else
- data_dir = g_strconcat(DATADIR, "/" PACKAGE "/", NULL); // e.g. /usr/share/geany
- doc_dir = g_strconcat(DATADIR, "/doc/" PACKAGE "/html/", NULL);
+ data_dir = g_strconcat(GEANY_DATADIR, "/geany/", NULL); // e.g. /usr/share/geany
+ doc_dir = g_strconcat(GEANY_DATADIR, "/doc/geany/html/", NULL);
#endif
// convert path names to locale encoding
@@ -409,7 +409,7 @@
locale_dir = g_strconcat(install_dir, "\\lib\\locale", NULL);
g_free(install_dir);
#else
- locale_dir = g_strdup(LOCALEDIR);
+ locale_dir = g_strdup(GEANY_LOCALEDIR);
#endif
bindtextdomain(GETTEXT_PACKAGE, locale_dir);
@@ -451,10 +451,10 @@
if (print_prefix)
{
- printf("%s\n", PREFIX);
- printf("%s\n", DATADIR);
- printf("%s\n", LIBDIR);
- printf("%s\n", LOCALEDIR);
+ printf("%s\n", GEANY_PREFIX);
+ printf("%s\n", GEANY_DATADIR);
+ printf("%s\n", GEANY_LIBDIR);
+ printf("%s\n", GEANY_LOCALEDIR);
exit(0);
}
Modified: trunk/src/makefile.win32
===================================================================
--- trunk/src/makefile.win32 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/src/makefile.win32 2007-12-19 15:37:10 UTC (rev 2117)
@@ -1,9 +1,10 @@
# Note: PACKAGE_DATA_DIR and PACKAGE_LOCALE_DIR are no longer used on Windows.
-DEFINES = -DPACKAGE_DATA_DIR=\"data\" \
- -DHAVE_CONFIG_H \
- -DPACKAGE_LOCALE_DIR=\"data\" \
- -DENABLE_NLS
+DEFINES = -DHAVE_CONFIG_H \
+ -DGEANY_DATADIR=\"data\" \
+ -DGEANY_LOCALEDIR=\"data\" \
+ -DGEANY_LIBDIR=\"\" \
+ -DGEANY_PREFIX=\"\"
.SUFFIXES: .c .o .h .a
WINDRES = windres.exe
Modified: trunk/src/plugins.c
===================================================================
--- trunk/src/plugins.c 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/src/plugins.c 2007-12-19 15:37:10 UTC (rev 2117)
@@ -545,7 +545,7 @@
#ifdef G_OS_WIN32
path = get_plugin_path();
#else
- path = g_strconcat(LIBDIR, G_DIR_SEPARATOR_S "geany", NULL);
+ path = g_strconcat(GEANY_LIBDIR, G_DIR_SEPARATOR_S "geany", NULL);
#endif
load_plugins(path);
Modified: trunk/src/prefix.h
===================================================================
--- trunk/src/prefix.h 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/src/prefix.h 2007-12-19 15:37:10 UTC (rev 2117)
@@ -60,19 +60,23 @@
#undef SYSCONFDIR
#undef CONFDIR
#undef LOCALEDIR
+ #undef GEANY_PREFIX
+ #undef GEANY_DATADIR
+ #undef GEANY_LIBDIR
+ #undef GEANY_LOCALEDIR
#define SELFPATH (br_thread_local_store (br_locate ((void *) "")))
- #define PREFIX (br_thread_local_store (br_locate_prefix ((void *) "")))
#define PREFIXDIR (br_thread_local_store (br_locate_prefix ((void *) "")))
#define BINDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/bin")))
#define SBINDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/sbin")))
- #define DATADIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/share")))
- #define LIBDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/lib")))
#define LIBEXECDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/libexec")))
#define ETCDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/etc")))
#define SYSCONFDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/etc")))
#define CONFDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/etc")))
- #define LOCALEDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/share/locale")))
+ #define GEANY_PREFIX (br_thread_local_store (br_locate_prefix ((void *) "")))
+ #define GEANY_DATADIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/share")))
+ #define GEANY_LIBDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/lib")))
+ #define GEANY_LOCALEDIR (br_thread_local_store (br_prepend_prefix ((void *) "", "/share/locale")))
#endif /* BR_NO_MACROS */
Modified: trunk/src/symbols.c
===================================================================
--- trunk/src/symbols.c 2007-12-19 13:49:59 UTC (rev 2116)
+++ trunk/src/symbols.c 2007-12-19 15:37:10 UTC (rev 2117)
@@ -465,7 +465,7 @@
if (icon_theme == NULL)
{
#ifndef G_OS_WIN32
- gchar *path = g_strconcat(DATADIR, "/icons", NULL);
+ gchar *path = g_strconcat(GEANY_DATADIR, "/icons", NULL);
#endif
gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &x, &y);
icon_theme = gtk_icon_theme_get_default();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Commits
mailing list