From ccbfc4ac8f00e3f3e73bdbbe7708a723c740d554 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Guelfucci?= <jeromeg@xfce.org> Date: Thu, 13 Aug 2009 23:53:50 +0200 Subject: [PATCH] Revert "Use a non-recursive Makefile.am to build the sources." This reverts commit f6a458b16c09c6b0d6e2e9730fc20b998a6d5f76. --- ChangeLog | 12 --- Makefile.am | 160 +++------------------------------------ configure.ac.in | 2 + lib/Makefile.am | 76 +++++++++++++++++++ panel-plugin/Makefile.am | 44 +++++++++++ src/Makefile.am | 42 ++++++++++ 6 files changed, 174 insertions(+), 162 deletions(-) create mode 100644 lib/Makefile.am create mode 100644 panel-plugin/Makefile.am create mode 100644 src/Makefile.am diff --git a/ChangeLog b/ChangeLog index 4389b55e..89b8320e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,18 +6,6 @@ Fixed the Indonesian documentation sub-directory, the autotools scripts were incomplete. Updated Italian and Galician documentation translation. -2009-07-31 jeromeg - -Use a non-recursive Makefile.am to build the sources. - -The non-recursive Makefile.am is used to build the convenience library, -the main application and the panel plugin. This reduces the build time -and it is no longer necessary to clean the whole project before build -to test changes in the convenience library. - -Recursive make files are still used for the translations, the -documentation and the icons. - 2009-07-30 jeromeg Fix all warnings when running the autogen script. diff --git a/Makefile.am b/Makefile.am index 0169a905..d31b0d7a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,10 +1,6 @@ @SET_MAKE@ -AUTOMAKE_OPTIONS = subdir-objects - -SUBDIRS = po po-doc icons docs - -bin_PROGRAMS = src/xfce4-screenshooter +SUBDIRS = lib src panel-plugin po po-doc icons docs distclean-local: rm -rf *.cache *~ @@ -15,152 +11,16 @@ dist-bz2: dist distcheck-bz2: distcheck zcat $(PACKAGE)-$(VERSION).tar.gz | bzip2 --best -c > $(PACKAGE)-$(VERSION).tar.bz2 -# Convienence library for the application and the panel plugin -noinst_LTLIBRARIES = lib/libscreenshooter.la - -lib_libscreenshooter_la_SOURCES = \ - $(lib_libscreenshooter_built_sources) \ - lib/exo-job.c lib/exo-job.h \ - lib/exo-simple-job.c lib/exo-simple-job.h \ - lib/katze-throbber.c lib/katze-throbber.h \ - lib/libscreenshooter.h \ - lib/sexy-url-label.c lib/sexy-url-label.h \ - lib/screenshooter-actions.c lib/screenshooter-actions.h \ - lib/screenshooter-capture.c lib/screenshooter-capture.h \ - lib/screenshooter-dialogs.c lib/screenshooter-dialogs.h \ - lib/screenshooter-global.h \ - lib/screenshooter-job.c lib/screenshooter-job.h \ - lib/screenshooter-simple-job.c lib/screenshooter-simple-job.h \ - lib/screenshooter-utils.c lib/screenshooter-utils.h \ - lib/screenshooter-zimagez.c lib/screenshooter-zimagez.h - -lib_libscreenshooter_la_CFLAGS = \ - -I$(top_srcdir) \ - @GTK_CFLAGS@ \ - @GLIB_CFLAGS@ \ - @LIBXFCE4UTIL_CFLAGS@ \ - @LIBXFCEGUI4_CFLAGS@ \ - @SOUP_CFLAGS@ \ - -DPACKAGE_LOCALE_DIR=\"$(localedir)\" - -lib_libscreenshooter_la_LIBADD = \ - @GTK_LIBS@ \ - @LIBXFCE4UTIL_LIBS@ \ - @LIBXFCEGUI4_LIBS@ \ - @GLIB_LIBS@ \ - @SOUP_LIBS@ - -lib_libscreenshooter_built_sources = \ - lib/screenshooter-marshal.c lib/screenshooter-marshal.h - -#Autogenerated sources for the library -BUILT_SOURCES = $(lib_libscreenshooter_built_sources) - -lib/screenshooter-marshal.h: lib/stamp-screenshooter-marshal.h - @true -lib/stamp-screenshooter-marshal.h: lib/screenshooter-marshal.list - ( cd $(top_srcdir)/lib && glib-genmarshal \ - --prefix=_screenshooter_marshal \ - --header screenshooter-marshal.list ) >> xgen-emh \ - && ( cmp -s xgen-emh screenshooter-marshal.h || cp xgen-emh screenshooter-marshal.h ) \ - && rm -f xgen-emh \ - && echo timestamp > $(@F) - -lib/screenshooter-marshal.c: lib/screenshooter-marshal.list - cd $(top_srcdir)/lib \ - && echo "#include \"screenshooter-marshal.h\"" > xgen-emc \ - && glib-genmarshal \ - --prefix=_screenshooter_marshal \ - --body screenshooter-marshal.list >> xgen-emc \ - && cp xgen-emc screenshooter-marshal.c \ - && rm -f xgen-emc - -# Main application -src_xfce4_screenshooter_CFLAGS = \ - -I$(top_srcdir)/lib \ - @GTK_CFLAGS@ \ - @GLIB_CFLAGS@ \ - @LIBXFCE4UTIL_CFLAGS@ \ - @LIBXFCEGUI4_CFLAGS@ \ - @GTHREAD_CFLAGS@ \ - @SOUP_CFLAGS@ \ - -DPACKAGE_LOCALE_DIR=\"$(localedir)\" - -src_xfce4_screenshooter_LDFLAGS = \ - $(top_builddir)/lib/libscreenshooter.la \ - @GTK_LIBS@ \ - @GLIB_LIBS@ \ - @GTHREAD_LIBS@ \ - @SOUP_LIBS@ \ - @LIBXFCE4UTIL_LIBS@ \ - @LIBXFCEGUI4_LIBS@ - -src_xfce4_screenshooter_SOURCES = \ - src/main.c - -# Desktop file for the application -app_desktopdir = $(datadir)/applications -app_desktop_in_in_files = src/xfce4-screenshooter.desktop.in.in -app_desktop_in_files = $(app_desktop_in_in_files:.desktop.in.in=.desktop.in) -app_desktop_DATA = $(app_desktop_in_files:.desktop.in=.desktop) -@INTLTOOL_DESKTOP_RULE@ - -src/xfce4-screenshooter.desktop.in: src/xfce4-screenshooter.desktop.in.in - sed -e "s^@PLUGIN_PATH@^$(libexecdir)/applications^" \ - $< > $@ - -# Panel plugin -plugindir = $(libexecdir)/xfce4/panel-plugins -plugin_PROGRAMS = panel-plugin/xfce4-screenshooter-plugin - -panel_plugin_xfce4_screenshooter_plugin_CFLAGS = \ - -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lib \ - @LIBXFCE4PANEL_CFLAGS@ \ - @GTHREAD_CFLAGS@ \ - @SOUP_CFLAGS@ - -panel_plugin_xfce4_screenshooter_plugin_LDFLAGS = \ - $(top_builddir)/lib/libscreenshooter.la \ - @LIBXFCE4PANEL_LIBS@ \ - @GTHREAD_LIBS@ \ - @SOUP_LIBS@ - -panel_plugin_xfce4_screenshooter_plugin_SOURCES = \ - panel-plugin/screenshooter-plugin.c - -# Panel plugin desktop file -panel_desktop_in_in_files = panel-plugin/screenshooter.desktop.in.in -panel_desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in) - -panel_desktopdir = $(datadir)/xfce4/panel-plugins -panel_desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) -@INTLTOOL_DESKTOP_RULE@ - -panel-plugin/screenshooter.desktop.in: panel-plugin/screenshooter.desktop.in.in - sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^" \ - $< > $@ - -# Extra dist and distclean rules -EXTRA_DIST = \ - README \ - intltool-extract.in \ - intltool-merge.in \ - intltool-update.in \ - lib/screenshooter-marshal.list \ - $(app_desktop_in_in_files) \ - $(panel_desktop_in_in_files) +EXTRA_DIST = \ + README \ + intltool-extract.in \ + intltool-merge.in \ + intltool-update.in -DISTCLEANFILES = \ - intltool-extract \ - intltool-merge \ - intltool-update \ - stamp-screenshooter-marshal.h \ - $(lib_libscreenshooter_built_sources) \ - $(app_desktop_DATA) $(app_desktop_in_files) \ - $(panel_desktop_DATA) $(panel_desktop_in_files) +DISTCLEANFILES = \ + intltool-extract \ + intltool-merge \ + intltool-update -# Man pages dist_man_MANS = xfce4-screenshooter.1 diff --git a/configure.ac.in b/configure.ac.in index 4889fc7a..83e43666 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -119,6 +119,8 @@ docs/manual/tr/images/Makefile icons/Makefile icons/48x48/Makefile icons/scalable/Makefile +lib/Makefile +src/Makefile panel-plugin/Makefile po/Makefile.in po-doc/Makefile diff --git a/lib/Makefile.am b/lib/Makefile.am new file mode 100644 index 00000000..c559eeab --- /dev/null +++ b/lib/Makefile.am @@ -0,0 +1,76 @@ +noinst_LTLIBRARIES = \ + libscreenshooter.la + +libscreenshooter_la_SOURCES = \ + $(libscreenshooter_built_sources) \ + exo-job.c exo-job.h \ + exo-simple-job.c exo-simple-job.h \ + katze-throbber.c katze-throbber.h \ + libscreenshooter.h \ + sexy-url-label.c sexy-url-label.h \ + screenshooter-actions.c screenshooter-actions.h \ + screenshooter-capture.c screenshooter-capture.h \ + screenshooter-dialogs.c screenshooter-dialogs.h \ + screenshooter-global.h \ + screenshooter-job.c screenshooter-job.h \ + screenshooter-simple-job.c screenshooter-simple-job.h \ + screenshooter-utils.c screenshooter-utils.h \ + screenshooter-zimagez.c screenshooter-zimagez.h + +libscreenshooter_la_CFLAGS = \ + -I$(top_srcdir) \ + @GTK_CFLAGS@ \ + @GLIB_CFLAGS@ \ + @LIBXFCE4UTIL_CFLAGS@ \ + @LIBXFCEGUI4_CFLAGS@ \ + @SOUP_CFLAGS@ \ + -DPACKAGE_LOCALE_DIR=\"$(localedir)\" + +libscreenshooter_la_LIBADD = \ + @GTK_LIBS@ \ + @LIBXFCE4UTIL_LIBS@ \ + @LIBXFCEGUI4_LIBS@ \ + @GLIB_LIBS@ \ + @SOUP_LIBS@ + +libscreenshooter_built_sources = \ + screenshooter-marshal.c screenshooter-marshal.h + +## +## Rules to auto-generate built sources +## +## This is a bit tricky with automake, and non-trivial to implement. The +## rules below seem to work fine and don't seem to break the build, but +## they are only enabled in maintainer mode, so arbitrary users don't get +## trapped in automake's oddities. Therefore we ship the autogenerated +## files as part of the dist tarball. +## + +DISTCLEANFILES = \ + stamp-screenshooter-marshal.h \ + $(libscreenshooter_built_sources) + +BUILT_SOURCES = \ + $(libscreenshooter_built_sources) + +screenshooter-marshal.h: stamp-screenshooter-marshal.h + @true +stamp-screenshooter-marshal.h: screenshooter-marshal.list Makefile + ( cd $(srcdir) && glib-genmarshal \ + --prefix=_screenshooter_marshal \ + --header screenshooter-marshal.list ) >> xgen-emh \ + && ( cmp -s xgen-emh screenshooter-marshal.h || cp xgen-emh screenshooter-marshal.h ) \ + && rm -f xgen-emh \ + && echo timestamp > $(@F) + +screenshooter-marshal.c: screenshooter-marshal.list Makefile + cd $(srcdir) \ + && echo "#include \"screenshooter-marshal.h\"" > xgen-emc \ + && glib-genmarshal \ + --prefix=_screenshooter_marshal \ + --body screenshooter-marshal.list >> xgen-emc \ + && cp xgen-emc screenshooter-marshal.c \ + && rm -f xgen-emc + +EXTRA_DIST = \ + screenshooter-marshal.list diff --git a/panel-plugin/Makefile.am b/panel-plugin/Makefile.am new file mode 100644 index 00000000..6c15555c --- /dev/null +++ b/panel-plugin/Makefile.am @@ -0,0 +1,44 @@ +plugindir = $(libexecdir)/xfce4/panel-plugins +plugin_PROGRAMS = xfce4-screenshooter-plugin + +xfce4_screenshooter_plugin_CFLAGS = \ + -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ + -I$(top_srcdir) \ + -I$(top_srcdir)/lib \ + @LIBXFCE4PANEL_CFLAGS@ \ + @GTHREAD_CFLAGS@ \ + @SOUP_CFLAGS@ + +xfce4_screenshooter_plugin_LDFLAGS = \ + $(top_builddir)/lib/libscreenshooter.la \ + @LIBXFCE4PANEL_LIBS@ \ + @GTHREAD_LIBS@ \ + @SOUP_LIBS@ + +xfce4_screenshooter_plugin_SOURCES = \ + screenshooter-plugin.c + +# .desktop file +# +# Some automake trickery here. Because we cannot use $(libexecdir) in the +# automake stage, we'll use sed to get the full path into the .desktop file. +# We also need to let intltool merge the translated fields, so we add an +# additional level of indirection: a <name>.desktop.in.in file. +# +desktop_in_in_files = screenshooter.desktop.in.in +desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in) + +desktopdir = $(datadir)/xfce4/panel-plugins +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ + +# get full path into .desktop file +screenshooter.desktop.in: screenshooter.desktop.in.in + sed -e "s^@PLUGIN_PATH@^$(libexecdir)/xfce4/panel-plugins^" \ + $< > $@ + +EXTRA_DIST = \ + $(desktop_in_in_files) + +DISTCLEANFILES = \ + $(desktop_DATA) $(desktop_in_files) diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 00000000..c9a26d8b --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,42 @@ +bin_PROGRAMS = xfce4-screenshooter + +xfce4_screenshooter_CFLAGS = \ + -I$(top_srcdir)/lib \ + @GTK_CFLAGS@ \ + @GLIB_CFLAGS@ \ + @LIBXFCE4UTIL_CFLAGS@ \ + @LIBXFCEGUI4_CFLAGS@ \ + @GTHREAD_CFLAGS@ \ + @SOUP_CFLAGS@ \ + -DPACKAGE_LOCALE_DIR=\"$(localedir)\" + +xfce4_screenshooter_LDFLAGS = \ + $(top_builddir)/lib/libscreenshooter.la \ + @GTK_LIBS@ \ + @GLIB_LIBS@ \ + @GTHREAD_LIBS@ \ + @SOUP_LIBS@ \ + @LIBXFCE4UTIL_LIBS@ \ + @LIBXFCEGUI4_LIBS@ + + +xfce4_screenshooter_SOURCES = \ + main.c + +desktopdir = $(datadir)/applications +desktop_in_in_files = xfce4-screenshooter.desktop.in.in +desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in) +desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) +@INTLTOOL_DESKTOP_RULE@ + +# get full path into .desktop file +xfce4-screenshooter.desktop.in: xfce4-screenshooter.desktop.in.in + sed -e "s^@PLUGIN_PATH@^$(libexecdir)/applications^" \ + $< > $@ + +EXTRA_DIST = \ + $(desktop_in_in_files) + +DISTCLEANFILES = \ + $(desktop_DATA) $(desktop_in_files) + -- GitLab