1
UNIQUE_FILTER_PIPE = tr [:space:] \\n | sort | uniq
2
BUILD_DATA_DIR = $(top_builddir)/bin/share/$(PACKAGE)
4
# Since all other attempts failed, we currently go this way:
5
# This code adds the file specified in ASSEMBLY_INFO_SOURCE to SOURCES_BUILD.
6
# If no such file is specified, the default AssemblyInfo.cs is used.
7
ASSEMBLY_INFO_SOURCE_REAL = \
8
$(shell if [ "$(ASSEMBLY_INFO_SOURCE)" ]; \
10
echo "$(addprefix $(srcdir)/, $(ASSEMBLY_INFO_SOURCE))"; \
12
echo "$(top_srcdir)/src/AssemblyInfo.cs"; \
15
SOURCES_BUILD = $(addprefix $(srcdir)/, $(SOURCES))
16
SOURCES_BUILD += $(ASSEMBLY_INFO_SOURCE_REAL)
19
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
20
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
21
-resource:$(resource),$(notdir $(resource)))
23
INSTALL_ICONS = $(top_srcdir)/build/private-icon-theme-installer "$(mkinstalldirs)" "$(INSTALL_DATA)"
24
THEME_ICONS_SOURCE = $(wildcard $(srcdir)/ThemeIcons/*/*/*.png) $(wildcard $(srcdir)/ThemeIcons/scalable/*/*.svg)
25
THEME_ICONS_RELATIVE = $(subst $(srcdir)/ThemeIcons/, , $(THEME_ICONS_SOURCE))
27
ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
28
ASSEMBLY_FILE = $(top_builddir)/bin/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
30
INSTALL_DIR_RESOLVED = $(firstword $(subst , $(DEFAULT_INSTALL_DIR), $(INSTALL_DIR)))
33
LINK += " $(NUNIT_LIBS)"
34
ENABLE_TESTS_FLAG = "-define:ENABLE_TESTS"
38
ENABLE_ATK_FLAG = "-define:ENABLE_ATK"
41
FILTERED_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE))
42
DEP_LINK = $(shell echo "$(LINK)" | $(UNIQUE_FILTER_PIPE) | sed s,-r:,,g | grep '$(top_builddir)/bin/')
48
moduledir = $(INSTALL_DIR_RESOLVED)
49
module_SCRIPTS = $(OUTPUT_FILES)
51
all: $(ASSEMBLY_FILE) theme-icons
54
@pushd $(top_builddir); \
58
# uncommented for now.
59
# tests are currently excuted from Makefile in $(top_builddir)
61
# @pushd $(top_builddir)/tests; \
68
$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE)
70
$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(DEP_LINK)
71
@mkdir -p $(top_builddir)/bin
72
@if [ ! "x$(ENABLE_RELEASE)" = "xyes" ]; then \
73
$(top_srcdir)/build/dll-map-makefile-verifier $(srcdir)/Makefile.am $(srcdir)/$(notdir $@.config) && \
74
$(MONO) $(top_builddir)/build/dll-map-verifier.exe $(srcdir)/$(notdir $@.config) -iwinmm -ilibbanshee -ilibbnpx11 -ilibc -ilibc.so.6 -iintl -ilibmtp.dll -ilibigemacintegration.dylib -iCFRelease $(SOURCES_BUILD); \
78
$(ASSEMBLY_BUILD_FLAGS) \
79
-nowarn:0278 -nowarn:0078 $$warn \
80
-define:HAVE_GTK_2_10 -define:NET_2_0 \
81
-debug -target:$(TARGET) -out:$@ \
82
$(BUILD_DEFINES) $(ENABLE_TESTS_FLAG) $(ENABLE_ATK_FLAG) \
83
$(FILTERED_LINK) $(RESOURCES_BUILD) $(SOURCES_BUILD)
84
@if [ -e $(srcdir)/$(notdir $@.config) ]; then \
85
cp $(srcdir)/$(notdir $@.config) $(top_builddir)/bin; \
87
@if [ ! -z "$(EXTRA_BUNDLE)" ]; then \
88
cp $(EXTRA_BUNDLE) $(top_builddir)/bin; \
91
theme-icons: $(THEME_ICONS_SOURCE)
92
@$(INSTALL_ICONS) -il "$(BUILD_DATA_DIR)" "$(srcdir)" $(THEME_ICONS_RELATIVE)
94
install-data-local: $(THEME_ICONS_SOURCE)
95
@$(INSTALL_ICONS) -i "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE)
97
uninstall-local: $(THEME_ICONS_SOURCE)
98
@$(INSTALL_ICONS) -u "$(DESTDIR)$(pkgdatadir)" "$(srcdir)" $(THEME_ICONS_RELATIVE)
100
EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE)
102
CLEANFILES = $(OUTPUT_FILES) $(ASSEMBLY_FILE).config
103
DISTCLEANFILES = *.pidb
104
MAINTAINERCLEANFILES = Makefile.in