1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
# Rules to more easily specify a C# build for automake.
#
# Inspired and adapted from Banshee's build system
TARGET = library
SOURCES_BUILD = $(addprefix $(srcdir)/, $(FILES))
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
-resource:$(resource),$(notdir $(resource)))
BUILD_DIR = $(top_builddir)/build
ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
ASSEMBLY_FILE = $(BUILD_DIR)/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
STD_REFERENCES = $(foreach ref,$(filter-out -r:%,$(REFERENCES)),-r:$(ref))
BUILD_REFERENCES = $(filter -r:%,$(REFERENCES) $(STD_REFERENCES))
MA_MANIFEST_FILE = $(filter %.addin.xml, $(RESOURCES_EXPANDED))
MA_ADDIN_NAME = $(shell egrep -o -m 1 'id=".*"' $(MA_MANIFEST_FILE) \
| sed 's/id="//g' | sed 's/"//g')
MA_ADDIN_VER = $(shell egrep -o -m 1 'version=".*"' $(MA_MANIFEST_FILE) \
| sed 's/version="//g' | sed 's/"//g')
MA_ADDIN_NAMESPACE = Do
MA_PACKFILE = $(MA_ADDIN_NAMESPACE).$(MA_ADDIN_NAME)_$(MA_ADDIN_VER).mpack
OUTPUT_FILES = \
$(ASSEMBLY_FILE) \
$(ASSEMBLY_FILE).mdb
# Install plugins as data; there's no need for them to be excutable
plugindir = ${libdir}/gnome-do/plugins
plugin_DATA = $(OUTPUT_FILES)
# All plugins should be translatable; every plugin will need to link to
# Mono.Addins for this.
COMPONENT_REFERENCES = $(MONO_ADDINS_LIBS)
MCS_FLAGS = $(MCS_LINQ_FLAG) -noconfig -codepage:utf8 -warn:4
if ENABLE_DEBUG
MCS_FLAGS += -debug -d:DEBUG
endif
all: $(OUTPUT_FILES)
reference-debug:
@echo $(BUILD_REFERENCES) $(COMPONENT_REFERENCES)
@echo $(RESOURCES_EXPANDED)
@echo $(MA_MANIFEST_FILE)
$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE)
$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(COMPONENT_DEPS)
@mkdir -p $(BUILD_DIR)
@colors=no; \
case $$TERM in \
"xterm" | "rxvt" | "rxvt-unicode") \
test "x$$COLORTERM" != "x" && colors=yes ;; \
"xterm-color") colors=yes ;; \
esac; \
if [ "x$$colors" = "xyes" ]; then \
tty -s && true || { colors=no; true; } \
fi; \
test "x$$colors" = "xyes" && \
echo -e "\033[1mCompiling $(notdir $@)...\033[0m" || \
echo "Compiling $(notdir $@)...";
@$(MCS) $(MCS_FLAGS) -target:$(TARGET) -out:$@ $(BUILD_DEFINES) $(BUILD_REFERENCES) $(COMPONENT_REFERENCES) $(RESOURCES_BUILD) $(SOURCES_BUILD)
@if [ -e $(srcdir)/$(notdir $@.config) ]; then \
cp $(srcdir)/$(notdir $@.config) $(BUILD_DIR) ; \
fi;
$(BUILD_DIR)/$(MA_PACKFILE): $(ASSEMBLY_FILE)
cd $(BUILD_DIR) && $(MAUTIL) pack $(ASSEMBLY_FILE)
#
# Clean and dist targets
#
EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) \
$(foreach pkgcfg_file, $(PKG_CONFIG_FILES), $(pkgcfg_file).in)
CLEANFILES = $(OUTPUT_FILES) $(pkgconfig_DATA)
DISTCLEANFILES = *.pidb
MAINTAINERCLEANFILES = Makefile.in
|