From 60bbb31fb7904f76c79bf0fe659af4ffa162f358 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Wed, 23 Aug 2006 23:58:30 -0500 Subject: [PATCH] MooCommandExe is really MooCommandUnixShell now, disabling it for win32 --- moo/mooedit/Makefile.am | 21 ++++++++++++++----- ...moocommand-exe.c => moocommand-exe-unix.c} | 2 +- moo/mooedit/moocommand.c | 2 ++ 3 files changed, 19 insertions(+), 6 deletions(-) rename moo/mooedit/{moocommand-exe.c => moocommand-exe-unix.c} (99%) diff --git a/moo/mooedit/Makefile.am b/moo/mooedit/Makefile.am index 2433656a..924bea44 100644 --- a/moo/mooedit/Makefile.am +++ b/moo/mooedit/Makefile.am @@ -4,11 +4,13 @@ SUBDIRS = plugins syntax mooedit_toolsdir = $(MOO_DATA_DIR) mooedit_tools_DATA = menu.xml context.xml +unix_sources = \ + moocommand-exe-unix.c + moocommand_stuff = \ moocommand.h \ moocommand.c \ moocommand-exe.h \ - moocommand-exe.c \ moocommand-script.h \ moocommand-script.c \ moocommanddisplay.h \ @@ -155,6 +157,8 @@ mooedit_enums_headers = \ CLEANFILES = stamp-mooedit-enums.h mooedit-enums.h mooedit-enums.c mooedit-enums.h: stamp-mooedit-enums.h @true +mooedit-enums.c: stamp-mooedit-enums.c + @true stamp-mooedit-enums.h: $(mooedit_enums_headers) Makefile ( cd $(srcdir) && glib-mkenums \ --fhead "#ifndef __MOO_EDIT_ENUMS_H__\n#define __MOO_EDIT_ENUMS_H__\n\n#include \n" \ @@ -162,11 +166,11 @@ stamp-mooedit-enums.h: $(mooedit_enums_headers) Makefile --fprod "/* enumerations from \"mooedit/@filename@\" */\n" \ --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define MOO_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n\n" \ --ftail "\nG_END_DECLS\n\n#endif /* __MOO_EDIT_ENUMS_H__ */" \ - $(mooedit_enums_headers) ) >> xgen-gtbh \ + $(mooedit_enums_headers) ) > xgen-gtbh \ && (cmp -s xgen-gtbh mooedit-enums.h || cp xgen-gtbh mooedit-enums.h ) \ && rm -f xgen-gtbh \ && echo timestamp > $(@F) -mooedit-enums.c: $(mooedit_enums_headers) Makefile +stamp-mooedit-enums.c: $(mooedit_enums_headers) Makefile ( cd $(srcdir) && glib-mkenums \ --fhead "#include \"mooedit/mooedit-enums.h\"\n\n" \ --fprod "#include \"mooedit/@filename@\"\n\n" \ @@ -174,8 +178,9 @@ mooedit-enums.c: $(mooedit_enums_headers) Makefile --vprod " { @VALUENAME@, (char*) \"@VALUENAME@\", (char*) \"@valuenick@\" }," \ --vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n\n" \ $(mooedit_enums_headers) ) > xgen-gtbc \ - && cp xgen-gtbc mooedit-enums.c \ - && rm -f xgen-gtbc + && (cmp -s xgen-gtbc mooedit-enums.c || cp xgen-gtbc mooedit-enums.c ) \ + && rm -f xgen-gtbc \ + && echo timestamp > $(@F) XML2H = $(srcdir)/../mooutils/xml2h.sh @@ -230,6 +235,12 @@ else EXTRA_DIST += $(mooedit_printing_sources) endif +if MOO_OS_UNIX +mooedit_sources += $(unix_sources) +else +EXTRA_DIST += $(unix_sources) +endif + noinst_LTLIBRARIES = libmooedit.la libmooedit_la_SOURCES = $(mooedit_sources) libmooedit_la_LIBADD = plugins/libmooeditplugins.la diff --git a/moo/mooedit/moocommand-exe.c b/moo/mooedit/moocommand-exe-unix.c similarity index 99% rename from moo/mooedit/moocommand-exe.c rename to moo/mooedit/moocommand-exe-unix.c index 1110d806..bda7f093 100644 --- a/moo/mooedit/moocommand-exe.c +++ b/moo/mooedit/moocommand-exe-unix.c @@ -1,5 +1,5 @@ /* - * moocommand-exe.c + * moocommand-exe-unix.c * * Copyright (C) 2004-2006 by Yevgen Muntyan * diff --git a/moo/mooedit/moocommand.c b/moo/mooedit/moocommand.c index b05ce0a8..ee2b2c82 100644 --- a/moo/mooedit/moocommand.c +++ b/moo/mooedit/moocommand.c @@ -998,7 +998,9 @@ _moo_command_init (void) if (!been_here) { g_type_class_unref (g_type_class_ref (MOO_TYPE_COMMAND_SCRIPT)); +#ifndef __WIN32__ g_type_class_unref (g_type_class_ref (MOO_TYPE_COMMAND_EXE)); +#endif been_here = TRUE; } }