[sound-juicer] Use non recursive make
- From: Phillip Wood <pwood src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer] Use non recursive make
- Date: Mon, 2 Mar 2015 13:59:31 +0000 (UTC)
commit 1d4e922f1f5572ac5fd38cf687a2aec867a2c23f
Author: Phillip Wood <phillip wood dunelm org uk>
Date: Mon Oct 27 10:44:32 2014 +0000
Use non recursive make
Non recursive make is more robust and efficient. It will also make it
simpler to use vala in the future as we wont need to create a separate
vapi file for the code in each subdirectory.
Libtool is no longer used for the build (libjuicer needs some work to
use opaque data structures and have its own translation domain before it
can be installed as a shared library). Not using libtool means that the
object file dependencies of tests need to be manually added but has the
benefit that are only rebuilt if their specific dependencies have
changed which means one can lazily rerun only the updated tests with
env RECHECK_LOGS= make -e check
sound-juicer is now built in the root directory, data file paths have
been updated to allow uninstalled running from that directory.
https://bugzilla.gnome.org/show_bug.cgi?id=741288
Makefile.am | 49 +++++++++++++++++++++++--
configure.ac | 8 +----
data/Makefile.am | 38 +++++++++----------
libjuicer/Makefile.am | 75 +++++++++++++--------------------------
libjuicer/rb-gst-media-types.c | 2 +-
src/Makefile.am | 76 ++++++++++++----------------------------
src/sj-main.c | 4 +-
tests/Makefile.am | 39 ++++++++------------
8 files changed, 130 insertions(+), 161 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index cb5ffad..6508a59 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,18 +1,59 @@
-SUBDIRS = po data libjuicer src tests help
+bin_PROGRAMS =
+noinst_PROGRAMS =
+sound_juicer_SOURCES =
+libjuicer_SOURCES =
+CLEANFILES =
+DISTCLEANFILES =
+EXTRA_DIST =
+MAINTAINERCLEANFILES =
+
+sound_juicer_CPPFLAGS = \
+ -I$(top_srcdir)/libjuicer \
+ -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
+ -DDATADIR=\""$(datadir)"\" \
+ -DPREFIX=\""$(prefix)"\" \
+ -DLIBDIR=\""$(libdir)"\" \
+ -DSYSCONFDIR=\""$(sysconfdir)"\" \
+ -DPIXMAPDIR=\""$(datadir)/pixmaps"\" \
+ -DPKGDATADIR=\""$(datadir)/sound-juicer"\" \
+ $(DISABLE_DEPRECATED) \
+ $(AM_CPPFLAGS)
+
+sound_juicer_CFLAGS = \
+ $(GSTREAMER_CFLAGS) \
+ $(BURN_CFLAGS) \
+ $(UI_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(AM_CFLAGS)
+
+sound_juicer_LDADD = \
+ $(GSTREAMER_LIBS) \
+ $(BURN_LIBS) \
+ $(UI_LIBS)
+
+SUBDIRS = po help
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-EXTRA_DIST = \
+EXTRA_DIST += \
autogen.sh \
sound-juicer.spec
-MAINTAINERCLEANFILES = \
+sound_juicer_LDFLAGS = \
+ $(AM_LDFLAGS)
+
+include data/Makefile.am
+include libjuicer/Makefile.am
+include src/Makefile.am
+include tests/Makefile.am
+
+MAINTAINERCLEANFILES += \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
$(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
INSTALL
-DISTCLEANFILES = po/.intltool-merge-cache
+DISTCLEANFILES += po/.intltool-merge-cache
-include $(top_srcdir)/build-aux/git.mk
-include $(top_srcdir)/build-aux/release.mk
diff --git a/configure.ac b/configure.ac
index 66cd48b..6a6d4a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_PREREQ(2.52)
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([1.9 no-dist-gzip dist-xz check-news])
+AM_INIT_AUTOMAKE([1.9 subdir-objects no-dist-gzip dist-xz check-news])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([libjuicer/sj-extractor.c])
@@ -23,12 +23,10 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The name of the gettext
AC_SUBST(GETTEXT_PACKAGE)
AM_GLIB_GNU_GETTEXT
-
# Standard C and C++ compiler mojo
AC_ISC_POSIX
AM_PROG_CC_C_O
AC_HEADER_STDC
-AC_PROG_LIBTOOL
AC_PROG_INSTALL
IT_PROG_INTLTOOL([0.50.0])
@@ -121,13 +119,9 @@ AC_SUBST([AM_LDFLAGS])
AC_CONFIG_FILES([
sound-juicer.spec
Makefile
-data/Makefile
data/sound-juicer.desktop.in
help/Makefile
-libjuicer/Makefile
po/Makefile.in
-src/Makefile
-tests/Makefile
])
AC_OUTPUT
diff --git a/data/Makefile.am b/data/Makefile.am
index 62373af..9d3a69d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,37 +1,37 @@
privatedatadir = $(pkgdatadir)
-dist_privatedata_DATA = sound-juicer.ui sound-juicer-menu.ui
+dist_privatedata_DATA = data/sound-juicer.ui data/sound-juicer-menu.ui
desktopdir = $(datadir)/applications
-desktop_in_files = sound-juicer.desktop.in.in
+desktop_in_files = data/sound-juicer.desktop.in.in
desktop_DATA = $(desktop_in_files:.desktop.in.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
@INTLTOOL_XML_RULE@
@APPSTREAM_XML_RULES@
appstream_XML = $(appstream_in_files:.xml.in=.xml)
-appstream_in_files = appdata/sound-juicer.appdata.xml.in
+appstream_in_files = data/appdata/sound-juicer.appdata.xml.in
-gsettings_SCHEMAS = org.gnome.sound-juicer.gschema.xml
+gsettings_SCHEMAS = data/org.gnome.sound-juicer.gschema.xml
@GSETTINGS_RULES@
convertdir = $(datadir)/GConf/gsettings
-convert_DATA = sound-juicer.convert
+convert_DATA = data/sound-juicer.convert
profilesdir = $(datadir)/sound-juicer
-dist_profiles_DATA = rhythmbox.gep
+dist_profiles_DATA = data/rhythmbox.gep
-man1_MANS = sound-juicer.1
+man1_MANS = data/sound-juicer.1
gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
icons = \
- sound-juicer-16.png \
- sound-juicer-22.png \
- sound-juicer-24.png \
- sound-juicer-32.png \
- sound-juicer-48.png \
- sound-juicer-256.png
+ data/sound-juicer-16.png \
+ data/sound-juicer-22.png \
+ data/sound-juicer-24.png \
+ data/sound-juicer-32.png \
+ data/sound-juicer-48.png \
+ data/sound-juicer-256.png
install-icons:
for icon in $(icons); do \
@@ -73,20 +73,18 @@ install-data-hook: update-icon-cache
uninstall-local: uninstall-icons
uninstall-hook: update-icon-cache
-CLEANFILES = \
+CLEANFILES += \
$(desktop_DATA) \
$(appstream_XML)
-DISTCLEANFILES = \
+DISTCLEANFILES += \
$(desktop_DATA)
-EXTRA_DIST = \
+EXTRA_DIST += \
$(gsettings_SCHEMAS) \
- sound-juicer.convert \
+ data/sound-juicer.convert \
$(man1_MANS) \
$(icons) \
$(appstream_in_files)
-MAINTAINERCLEANFILES = $(gsettings_SCHEMAS:.xml=.valid)
-
--include $(top_srcdir)/build-aux/git.mk
+MAINTAINERCLEANFILES += $(gsettings_SCHEMAS:.xml=.valid)
diff --git a/libjuicer/Makefile.am b/libjuicer/Makefile.am
index 0ed1a8a..d2b6c86 100644
--- a/libjuicer/Makefile.am
+++ b/libjuicer/Makefile.am
@@ -1,50 +1,25 @@
-noinst_LTLIBRARIES = libjuicer.la
-
-libjuicer_la_SOURCES = \
- $(MARSHALFILES) \
- rb-gst-media-types.h \
- rb-gst-media-types.c \
- sj-structures.h \
- sj-structures.c \
- sj-error.h sj-error.c \
- sj-extractor.h \
- sj-extractor.c \
- sj-metadata.h \
- sj-metadata.c \
- sj-metadata-gvfs.h \
- sj-metadata-gvfs.c \
- sj-metadata-getter.c \
- sj-metadata-getter.h \
- sj-util.h sj-util.c
-
-libjuicer_la_CPPFLAGS = \
- -DDATADIR=\""$(datadir)"\" \
- $(DISABLE_DEPRECATED_CFLAGS) \
- $(AM_CPPFLAGS)
-
-libjuicer_la_CFLAGS = \
- $(WARN_CFLAGS) \
- $(GSTREAMER_CFLAGS) \
- $(BURN_CFLAGS) \
- $(UI_CFLAGS) \
- $(CDIO_CFLAGS) \
- $(AM_CFLAGS)
-
-libjuicer_la_LIBADD = \
- $(GSTREAMER_LIBS) \
- $(BURN_LIBS) \
- $(UI_LIBS) \
- $(CDIO_LIBS)
-
-libjuicer_la_LDFLAGS = \
- -export-dynamic \
- $(AM_LDFLAGS)
-
-libjuicer_la_SOURCES += \
- sj-metadata-musicbrainz5.h \
- sj-metadata-musicbrainz5.c
-libjuicer_la_LIBADD += $(MUSICBRAINZ5_LIBS)
-libjuicer_la_CFLAGS += $(MUSICBRAINZ5_CFLAGS)
-
-
--include $(top_srcdir)/build-aux/git.mk
+libjuicer_SOURCES += \
+ libjuicer/rb-gst-media-types.c \
+ libjuicer/rb-gst-media-types.h \
+ libjuicer/sj-error.c \
+ libjuicer/sj-error.h \
+ libjuicer/sj-extractor.c \
+ libjuicer/sj-extractor.h \
+ libjuicer/sj-metadata.c \
+ libjuicer/sj-metadata.h \
+ libjuicer/sj-metadata-getter.c \
+ libjuicer/sj-metadata-getter.h \
+ libjuicer/sj-metadata-gvfs.c \
+ libjuicer/sj-metadata-gvfs.h \
+ libjuicer/sj-metadata-musicbrainz5.c \
+ libjuicer/sj-metadata-musicbrainz5.h \
+ libjuicer/sj-structures.c \
+ libjuicer/sj-structures.h \
+ libjuicer/sj-util.c \
+ libjuicer/sj-util.h
+
+sound_juicer_SOURCES += $(libjuicer_SOURCES)
+sound_juicer_CFLAGS += $(CDIO_CFLAGS)
+sound_juicer_LDADD += $(CDIO_LIBS)
+sound_juicer_LDADD += $(MUSICBRAINZ5_LIBS)
+sound_juicer_CFLAGS += $(MUSICBRAINZ5_CFLAGS)
diff --git a/libjuicer/rb-gst-media-types.c b/libjuicer/rb-gst-media-types.c
index 6ae8e46..5400e10 100644
--- a/libjuicer/rb-gst-media-types.c
+++ b/libjuicer/rb-gst-media-types.c
@@ -34,7 +34,7 @@
#include "rb-gst-media-types.h"
-#define SOURCE_ENCODING_TARGET_FILE "../data/rhythmbox.gep"
+#define SOURCE_ENCODING_TARGET_FILE "data/rhythmbox.gep"
#define INSTALLED_ENCODING_TARGET_FILE DATADIR"/sound-juicer/rhythmbox.gep"
static GstEncodingTarget *default_target = NULL;
diff --git a/src/Makefile.am b/src/Makefile.am
index 9baac6b..ef76661 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,54 +1,24 @@
-bin_PROGRAMS = sound-juicer
+bin_PROGRAMS += sound-juicer
-sound_juicer_SOURCES = \
- sound-juicer.h \
- sj-cell-renderer-text.h \
- sj-cell-renderer-text.c \
- sj-main.h \
- sj-main.c \
- sj-prefs.h \
- sj-prefs.c \
- sj-play.c \
- sj-play.h \
- sj-about.h \
- sj-about.c \
- sj-extracting.h \
- sj-extracting.c \
- sj-genres.h \
- sj-genres.c \
- sj-tree-view.h \
- sj-tree-view.c \
- sj-window-state.c \
- sj-window-state.h \
- egg-play-preview.c \
- egg-play-preview.h
-
-sound_juicer_CPPFLAGS = \
- -I$(top_srcdir)/libjuicer \
- -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
- -DDATADIR=\""$(datadir)"\" \
- -DPREFIX=\""$(prefix)"\" \
- -DLIBDIR=\""$(libdir)"\" \
- -DSYSCONFDIR=\""$(sysconfdir)"\" \
- -DPIXMAPDIR=\""$(datadir)/pixmaps"\" \
- -DPKGDATADIR=\""$(datadir)/sound-juicer"\" \
- $(DISABLE_DEPRECATED) \
- $(AM_CPPFLAGS)
-
-sound_juicer_CFLAGS = \
- $(GSTREAMER_CFLAGS) \
- $(BURN_CFLAGS) \
- $(UI_CFLAGS) \
- $(WARN_CFLAGS) \
- $(AM_CFLAGS)
-
-sound_juicer_LDADD = \
- $(top_builddir)/libjuicer/libjuicer.la \
- $(GSTREAMER_LIBS) \
- $(BURN_LIBS) \
- $(UI_LIBS)
-
-sound_juicer_LDFLAGS = \
- $(AM_LDFLAGS)
-
--include $(top_srcdir)/build-aux/git.mk
+sound_juicer_SOURCES += \
+ src/egg-play-preview.c \
+ src/egg-play-preview.h \
+ src/sj-about.c \
+ src/sj-about.h \
+ src/sj-cell-renderer-text.c \
+ src/sj-cell-renderer-text.h \
+ src/sj-extracting.c \
+ src/sj-extracting.h \
+ src/sj-genres.c \
+ src/sj-genres.h \
+ src/sj-main.c \
+ src/sj-main.h \
+ src/sj-play.c \
+ src/sj-play.h \
+ src/sj-prefs.c \
+ src/sj-prefs.h \
+ src/sj-tree-view.c \
+ src/sj-tree-view.h \
+ src/sj-window-state.c \
+ src/sj-window-state.h \
+ src/sound-juicer.h
diff --git a/src/sj-main.c b/src/sj-main.c
index 3dad80c..c075503 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -118,9 +118,9 @@ static CellCbContext cell_editing_context;
#define DEFAULT_PARANOIA 15
#define RAISE_WINDOW "raise-window"
-#define SOURCE_BUILDER "../data/sound-juicer.ui"
+#define SOURCE_BUILDER "data/sound-juicer.ui"
#define INSTALLED_BUILDER DATADIR"/sound-juicer/sound-juicer.ui"
-#define SOURCE_MENU_BUILDER "../data/sound-juicer-menu.ui"
+#define SOURCE_MENU_BUILDER "data/sound-juicer-menu.ui"
#define INSTALLED_MENU_BUILDER DATADIR"/sound-juicer/sound-juicer-menu.ui"
#define COMPOSER_ROW 2 /* Row of entry_table containing composer_entry */
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0ef798b..2dc8cfd 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,29 +1,20 @@
-noinst_PROGRAMS = mb-test
+noinst_PROGRAMS += tests/mb-test
-mb_test_SOURCES = \
- mb-test.c
+tests_mb_test_SOURCES = \
+ tests/mb-test.c
-mb_test_CPPFLAGS = \
- -I$(top_srcdir)/libjuicer \
+tests_mb_test_CPPFLAGS = \
-I$(top_srcdir)/src \
- -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
- $(DISABLE_DEPRECATED) \
- $(AM_CPPFLAGS)
+ $(sound_juicer_CPPFLAGS)
-mb_test_CFLAGS = \
- $(WARN_CFLAGS) \
- $(GSTREAMER_CFLAGS) \
- $(BURN_CFLAGS) \
- $(UI_CFLAGS) \
- $(AM_CPPFLAGS)
+tests_mb_test_CFLAGS = $(sound_juicer_CFLAGS)
-mb_test_LDADD = \
- $(BURN_LIBS) \
- $(UI_LIBS) \
- $(top_builddir)/libjuicer/libjuicer.la
-
-mb_test_LDFLAGS = \
- -export-dynamic \
- $(AM_LDFLAGS)
-
--include $(top_srcdir)/build-aux/git.mk
+tests_mb_test_LDADD = \
+ $(sound_juicer_LDADD) \
+ libjuicer/sound_juicer-sj-error.o \
+ libjuicer/sound_juicer-sj-metadata.o \
+ libjuicer/sound_juicer-sj-metadata-getter.o \
+ libjuicer/sound_juicer-sj-metadata-gvfs.o \
+ libjuicer/sound_juicer-sj-metadata-musicbrainz5.o \
+ libjuicer/sound_juicer-sj-structures.o \
+ libjuicer/sound_juicer-sj-util.o
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]