From e35969082a9053ac0dface2c2f7d3f93a3e323bf Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Tue, 12 Dec 2006 20:51:11 -0600 Subject: [PATCH] Moved medit stuff into separate folder medit/ --- .hgignore | 4 +- Makefile.am | 36 +++-------- configure.ac | 4 +- makewin | 6 +- medit/Makefile.am | 71 ++++++++++++++++++++++ {tests => medit}/medit-app.c | 0 {tests => medit}/medit-app.opag | 4 ++ {tests => medit}/medit-ui.xml | 0 medit.desktop.in => medit/medit.desktop.in | 0 {wininstaller => medit}/medit.iss.in | 0 {tests => medit}/medit.rc.in | 0 po/POTFILES.in | 4 +- tests/Makefile.am | 58 +----------------- 13 files changed, 94 insertions(+), 93 deletions(-) create mode 100644 medit/Makefile.am rename {tests => medit}/medit-app.c (100%) rename {tests => medit}/medit-app.opag (99%) rename {tests => medit}/medit-ui.xml (100%) rename medit.desktop.in => medit/medit.desktop.in (100%) rename {wininstaller => medit}/medit.iss.in (100%) rename {tests => medit}/medit.rc.in (100%) diff --git a/.hgignore b/.hgignore index 9d306ff3..2b8fcf07 100644 --- a/.hgignore +++ b/.hgignore @@ -39,8 +39,8 @@ moo/mooutils/stock-moo.h$ devcpp/Makefile\.win$ devcpp/medit\.layout$ .*\.Po$ -^wininstaller/medit\.iss$ -^tests/medit\.rc$ +^medit/medit\.iss$ +^medit/medit\.rc$ ^tests/pyapp\.py$ ^stamp-h1$ ^medit$ diff --git a/Makefile.am b/Makefile.am index f9ace87d..478b9a26 100644 --- a/Makefile.am +++ b/Makefile.am @@ -30,10 +30,9 @@ EXTRA_DIST = \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ - mkpotsubdirs \ - medit.desktop.in + mkpotsubdirs -all-am: pot-subdirs-stamp wininstaller/medit.iss m4-stamp +all-am: pot-subdirs-stamp m4-stamp m4-stamp: $(m4files) echo stamp > m4-stamp @@ -47,38 +46,19 @@ pot-subdirs-stamp: po/POTFILES.in $(SHELL) $(srcdir)/mkpotsubdirs "$(srcdir)" CLEANFILES = pot-subdirs-stamp -DIST_SUBDIRS = moo tests po +DIST_SUBDIRS = moo medit tests po # need to create pot-subdirs-stamp before it goes to po/ -SUBDIRS = . moo tests po +SUBDIRS = . moo medit po + +if MOO_ENABLE_TESTS +SUBDIRS += tests +endif ACLOCAL_AMFLAGS = -I m4 -@INTLTOOL_DESKTOP_RULE@ -DESKTOP_IN_FILES = medit.desktop.in -DESKTOP_FILES =$(DESKTOP_IN_FILES:.desktop.in=.desktop) -desktopdir = $(datadir)/applications -desktop_DATA = $(DESKTOP_FILES) - DISTCLEANFILES = \ m4-stamp \ configargs.h \ - $(DESKTOP_FILES) \ intltool-extract \ intltool-merge \ intltool-update - -appicondir = $(datadir)/pixmaps -appicon_DATA = moo/mooutils/pixmaps/medit.png -hicolor = $(datadir)/icons/hicolor -iconthemedir = $(hicolor)/48x48/apps -icontheme_DATA = moo/mooutils/pixmaps/medit.png - -# update_icon_cache = gtk-update-icon-cache -f -t $(hicolor) -# -# install-data-hook: -# if echo "Updating icon cache" && $(update_icon_cache); then \ -# echo "Done."; \ -# else \ -# echo "*** GTK icon cache not updated. After install, run this:";\ -# echo $(update_icon_cache); \ -# fi diff --git a/configure.ac b/configure.ac index 7af57931..ba064b87 100644 --- a/configure.ac +++ b/configure.ac @@ -57,10 +57,10 @@ moo/mooutils/pcre/Makefile moo/mooutils/xdgmime/Makefile moo/mooterm/termhelper_res.rc tests/pyapp.py -tests/medit.rc tests/Makefile +medit/Makefile +medit/medit.iss po/Makefile.in -wininstaller/medit.iss ]) AC_OUTPUT diff --git a/makewin b/makewin index a1d7b16a..8ae833ac 100755 --- a/makewin +++ b/makewin @@ -57,7 +57,7 @@ if release: installdir = dir + "/inst_" -issdir = "Z:%s/wininstaller" % (moo_builddir,) +issdir = "Z:%s/medit" % (moo_builddir,) iss = issdir + "/medit.iss" @@ -148,11 +148,11 @@ def build(): else: installer = name or ("medit-" + dbg + get_version() + ".exe") do_cmd("wine /usr/local/win/InnoSetup5/ISCC.exe " + iss) - do_cmd("mv %s/wininstaller/Output/setup.exe %s/%s" % (moo_builddir, dir, installer)) + do_cmd("mv %s/medit/Output/setup.exe %s/%s" % (moo_builddir, dir, installer)) def clean(): do_cmd("rm -rf %s %s %s" % (moo_windir, installdir, - moo_builddir + "/wininstaller/Output")) + moo_builddir + "/medit/Output")) try: build() diff --git a/medit/Makefile.am b/medit/Makefile.am new file mode 100644 index 00000000..3ffc51e0 --- /dev/null +++ b/medit/Makefile.am @@ -0,0 +1,71 @@ +AM_CFLAGS = \ + -I$(top_builddir) \ + -I../moo \ + $(MOO_CFLAGS) \ + $(MOO_DEBUG_CFLAGS) + +EXTRA_DIST = \ + medit-ui.xml \ + medit-app.opag \ + medit.rc.in + +all-am: medit.iss + +bin_PROGRAMS = medit + +medit_SOURCES = medit-ui.h medit-credits.h medit-app.c +BUILT_SOURCES = medit-ui.h medit-credits.h medit-app.c +nodist_medit_SOURCES = + +medit_LDFLAGS = -export-dynamic $(PYTHON_EXTRA_LDFLAGS) $(medit_res_ldflag) +medit_LDADD = ../moo/libmoo.la + +if MOO_OS_MINGW +medit_LDFLAGS += -mwindows +CLEANFILES = medit.res medit.rc +medit_res_ldflag = -Wl,medit.res +BUILT_SOURCES += medit.res +nodist_medit_SOURCES += medit.res +@MOO_WIN32_RC_IN_RULE@ +@MOO_WIN32_RC_RULE@ +endif + +XML2H = $(srcdir)/../moo/mooutils/xml2h.sh +medit-ui.h: medit-ui.xml $(XML2H) + $(SHELL) $(XML2H) MEDIT_UI $(srcdir)/medit-ui.xml > medit-ui.h.tmp && \ + mv medit-ui.h.tmp medit-ui.h +medit-credits.h: ../THANKS $(XML2H) + $(SHELL) $(XML2H) THANKS $(srcdir)/../THANKS > medit-credits.h + +medit-app.c: medit-app.opag medit-ui.h + if test -z $(OPAG); then \ + touch $(srcdir)/medit-app.c; \ + else \ + $(OPAG) -f _medit_parse_options -O _medit_opt_ -A _medit_arg_ $(srcdir)/medit-app.opag $(srcdir)/medit-app.c; \ + fi + + +EXTRA_DIST += medit.desktop.in + +@INTLTOOL_DESKTOP_RULE@ +DESKTOP_IN_FILES = medit.desktop.in +DESKTOP_FILES =$(DESKTOP_IN_FILES:.desktop.in=.desktop) +desktopdir = $(datadir)/applications +desktop_DATA = $(DESKTOP_FILES) +DISTCLEANFILES = $(DESKTOP_FILES) + +appicondir = $(datadir)/pixmaps +appicon_DATA = ../moo/mooutils/pixmaps/medit.png +hicolor = $(datadir)/icons/hicolor +iconthemedir = $(hicolor)/48x48/apps +icontheme_DATA = ../moo/mooutils/pixmaps/medit.png + +# update_icon_cache = gtk-update-icon-cache -f -t $(hicolor) +# +# install-data-hook: +# if echo "Updating icon cache" && $(update_icon_cache); then \ +# echo "Done."; \ +# else \ +# echo "*** GTK icon cache not updated. After install, run this:";\ +# echo $(update_icon_cache); \ +# fi diff --git a/tests/medit-app.c b/medit/medit-app.c similarity index 100% rename from tests/medit-app.c rename to medit/medit-app.c diff --git a/tests/medit-app.opag b/medit/medit-app.opag similarity index 99% rename from tests/medit-app.opag rename to medit/medit-app.opag index b46b02e6..39d10177 100644 --- a/tests/medit-app.opag +++ b/medit/medit-app.opag @@ -19,6 +19,8 @@ #include #include +#define APPNAME "medit" + #if GTK_CHECK_VERSION(2,8,0) && defined(GDK_WINDOWING_X11) #include #define TIMESTAMP (gdk_x11_display_get_user_time (gdk_display_get_default ())) @@ -263,6 +265,8 @@ main (int argc, char *argv[]) init_mem_stuff (); + g_set_prgname ("medit"); + gtk_init (&argc, &argv); stamp = TIMESTAMP; diff --git a/tests/medit-ui.xml b/medit/medit-ui.xml similarity index 100% rename from tests/medit-ui.xml rename to medit/medit-ui.xml diff --git a/medit.desktop.in b/medit/medit.desktop.in similarity index 100% rename from medit.desktop.in rename to medit/medit.desktop.in diff --git a/wininstaller/medit.iss.in b/medit/medit.iss.in similarity index 100% rename from wininstaller/medit.iss.in rename to medit/medit.iss.in diff --git a/tests/medit.rc.in b/medit/medit.rc.in similarity index 100% rename from tests/medit.rc.in rename to medit/medit.rc.in diff --git a/po/POTFILES.in b/po/POTFILES.in index 5e7183bb..6042c0a8 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -1,5 +1,5 @@ -medit.desktop.in -tests/medit-ui.xml +medit/medit.desktop.in +medit/medit-ui.xml moo/mooapp/mooappabout.c moo/mooapp/mooapp.c diff --git a/tests/Makefile.am b/tests/Makefile.am index f129445c..b3172c3e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -25,7 +25,7 @@ if MOO_BUILD_APP test_programs += testhtml endif -EXTRA_PROGRAMS = medit $(test_programs) +EXTRA_PROGRAMS = $(test_programs) if MOO_ENABLE_TESTS noinst_PROGRAMS += $(test_programs) @@ -34,36 +34,10 @@ endif all-tests: $(EXTRA_PROGRAMS) EXTRA_DIST = \ - pyapp.py.in \ - medit-ui.xml \ - medit-app.opag - -BUILT_SOURCES = medit-ui.h medit-credits.h - -XML2H = $(srcdir)/../moo/mooutils/xml2h.sh -medit-ui.h: medit-ui.xml $(XML2H) - $(SHELL) $(XML2H) MEDIT_UI $(srcdir)/medit-ui.xml > medit-ui.h.tmp && \ - mv medit-ui.h.tmp medit-ui.h -medit-credits.h: ../THANKS $(XML2H) - $(SHELL) $(XML2H) THANKS $(srcdir)/../THANKS > medit-credits.h - -# medit-app.c is not in BUILT_SOURCES, so the target must use absolute path to it -$(srcdir)/medit-app.c: medit-app.opag medit-ui.h - if test -z $(OPAG); then \ - touch $(srcdir)/medit-app.c; \ - else \ - $(OPAG) -f _medit_parse_options -O _medit_opt_ -A _medit_arg_ $(srcdir)/medit-app.opag $(srcdir)/medit-app.c; \ - fi + pyapp.py.in all-am: pyapp.py -if MOO_BUILD_APP -medit = medit -endif -if MOO_BUILD_EDIT -medit = medit -# noinst_PROGRAMS += testtext -endif if MOO_BUILD_TERM if !MOO_OS_CYGWIN if !MOO_BUILD_APP @@ -82,8 +56,6 @@ endif endif endif -bin_PROGRAMS = $(medit) - ldflags = -export-dynamic $(PYTHON_EXTRA_LDFLAGS) ldadd = ../moo/libmoo.la @@ -92,32 +64,6 @@ ldflags += -mwindows endif MOO_OS_MINGW -############################################################################## -## medit -## -nodist_medit_SOURCES = - -if MOO_OS_MINGW -CLEANFILES = medit.res medit.rc -medit_res_ldflag = -Wl,medit.res -BUILT_SOURCES += medit.res -nodist_medit_SOURCES += medit.res -@MOO_WIN32_RC_IN_RULE@ -@MOO_WIN32_RC_RULE@ -endif - -medit_LDFLAGS = $(ldflags) $(medit_res_ldflag) -medit_LDADD = $(ldadd) -medit_SOURCES = medit-ui.h medit-credits.h -EXTRA_DIST += medit.rc.in medit-app.c - -if MOO_BUILD_APP -medit_SOURCES += medit-app.c -else -medit_SOURCES += medit.c -endif - - testfold_LDFLAGS = $(ldflags) testfold_LDADD = $(ldadd) testfold_SOURCES = testfold.c