Skip to content

Commit 47ee25a

Browse files
hyperairbl8
authored andcommitted
build: Move EXTRA_DIST away from build.rules.mk into build.dist.mk
This allows for optional inclusion of build.rules.mk without needing to redefine EXTRA_DIST for the case where the include does not happen. Also fixes the issue where theme icons for $component don't appear in the tarball when --disable-$component happens. Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
1 parent bf32bb9 commit 47ee25a

File tree

30 files changed

+61
-61
lines changed

30 files changed

+61
-61
lines changed

build/build.dist.mk

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
2+
SOURCES_BUILD += $(top_srcdir)/src/AssemblyInfo.cs
3+
4+
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
5+
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
6+
-resource:$(resource),$(notdir $(resource)))
7+
8+
THEME_ICONS_SOURCE = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png) $(wildcard $(srcdir)/ThemeIcons/scalable/*/*.svg)
9+
THEME_ICONS_RELATIVE = $(subst $(srcdir)/ThemeIcons/, , $(THEME_ICONS_SOURCE))
10+
11+
ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
12+
ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
13+
14+
OUTPUT_FILES = \
15+
$(ASSEMBLY_FILE) \
16+
$(ASSEMBLY_FILE).mdb
17+
18+
EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE)
19+
20+
CLEANFILES = $(OUTPUT_FILES)
21+
DISTCLEANFILES = *.pidb
22+
MAINTAINERCLEANFILES = Makefile.in

build/build.rules.mk

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1+
include $(top_srcdir)/build/build.dist.mk
2+
13
UNIQUE_FILTER_PIPE = tr [:space:] \\n | sort | uniq
24
BUILD_DATA_DIR = $(top_builddir)/bin/share/$(PACKAGE)
35

4-
SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
5-
SOURCES_BUILD += $(top_srcdir)/src/AssemblyInfo.cs
6-
7-
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
8-
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
9-
-resource:$(resource),$(notdir $(resource)))
10-
116
INSTALL_ICONS = $(top_srcdir)/build/private-icon-theme-installer "$(mkinstalldirs)" "$(INSTALL_DATA)"
12-
THEME_ICONS_SOURCE = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png) $(wildcard $(srcdir)/ThemeIcons/scalable/*/*.svg)
13-
THEME_ICONS_RELATIVE = $(subst $(srcdir)/ThemeIcons/, , $(THEME_ICONS_SOURCE))
14-
15-
ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
16-
ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
177

188
INSTALL_DIR_RESOLVED = $(firstword $(subst , $(DEFAULT_INSTALL_DIR), $(INSTALL_DIR)))
199

@@ -25,16 +15,12 @@ endif
2515
FILTERED_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE))
2616
DEP_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE) | sed s,-r:,,g | grep '$(top_builddir)/bin/')
2717

28-
OUTPUT_FILES = \
29-
$(ASSEMBLY_FILE) \
30-
$(ASSEMBLY_FILE).mdb
31-
3218
moduledir = $(INSTALL_DIR_RESOLVED)
3319
module_SCRIPTS = $(OUTPUT_FILES)
3420

3521
all: $(ASSEMBLY_FILE) theme-icons
3622

37-
run:
23+
run:
3824
@pushd $(top_builddir); \
3925
make run; \
4026
popd;
@@ -80,9 +66,3 @@ uninstall-hook: $(THEME_ICONS_SOURCE)
8066
@$(INSTALL_ICONS) -u "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE)
8167
$(EXTRA_UNINSTALL_HOOK)
8268

83-
EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE)
84-
85-
CLEANFILES = $(OUTPUT_FILES)
86-
DISTCLEANFILES = *.pidb
87-
MAINTAINERCLEANFILES = Makefile.in
88-

src/Backends/Banshee.GStreamerSharp/Makefile.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ include $(top_srcdir)/build/build.mk
2020
EXTRA_DIST += Banshee.GStreamerSharp.dll.config
2121
module_SCRIPTS += Banshee.GStreamerSharp.dll.config
2222
else
23-
EXTRA_DIST = $(SOURCES) $(RESOURCES) Banshee.GStreamerSharp.dll.config
23+
include $(top_srcdir)/build/build.dist.mk
24+
EXTRA_DIST += Banshee.GStreamerSharp.dll.config
2425
endif
2526

2627
if ENABLE_GAPLESS

src/Backends/Banshee.Gio/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ define EXTRA_UNINSTALL_HOOK
5353
done;
5454
endef
5555
else
56-
EXTRA_DIST = $(SOURCES) $(RESOURCES)
56+
include $(top_srcdir)/build/build.dist.mk
5757
endif
5858

src/Backends/Banshee.Gnome/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ RESOURCES = \
1818
if ENABLE_GNOME
1919
include $(top_srcdir)/build/build.mk
2020
else
21-
EXTRA_DIST = $(SOURCES) $(RESOURCES)
21+
include $(top_srcdir)/build/build.dist.mk
2222
endif
2323

src/Backends/Banshee.NowPlaying.X11/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ RESOURCES = Banshee.NowPlaying.X11.addin.xml
1212
if HAVE_XVIDMODE
1313
include $(top_srcdir)/build/build.mk
1414
else
15-
EXTRA_DIST = $(SOURCES) $(RESOURCES)
15+
include $(top_srcdir)/build/build.dist.mk
1616
endif
1717

src/Backends/Banshee.Osx/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ define EXTRA_UNINSTALL_HOOK
3636
endef
3737

3838
else
39-
EXTRA_DIST = $(SOURCES) $(RESOURCES)
39+
include $(top_srcdir)/build/build.dist.mk
4040
endif
4141

4242
MAINTAINERCLEANFILES = Makefile.in

src/Backends/Banshee.Windows/Makefile.am

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,4 @@ SOURCES = \
1414

1515
RESOURCES = Banshee.Windows.addin.xml
1616

17-
EXTRA_DIST = $(SOURCES) $(RESOURCES)
18-
19-
MAINTAINERCLEANFILES = Makefile.in
17+
include $(top_srcdir)/build/build.dist.mk

src/Clients/MeeGo/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ SOURCES = Banshee.MeeGo.Client/MeeGoClient.cs
66
if HAVE_MEEGO
77
include $(top_srcdir)/build/build.mk
88
else
9-
EXTRA_DIST = $(SOURCES)
9+
include $(top_srcdir)/build/build.dist.mk
1010
endif

src/Core/Banshee.WebBrowser/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ RESOURCES = \
4848
if HAVE_LIBWEBKIT
4949
include $(top_srcdir)/build/build.mk
5050
else
51-
EXTRA_DIST = $(SOURCES) $(RESOURCES)
51+
include $(top_srcdir)/build/build.dist.mk
5252
endif

0 commit comments

Comments
 (0)