233
240
target_alias = @target_alias@
234
241
top_builddir = @top_builddir@
235
242
top_srcdir = @top_srcdir@
236
EXTRA_DIST = $(build_sources) $(build_resx_files) \
237
$(build_others_files) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) \
238
$(DATA_FILES) $(build_culture_res_files)
239
@ENABLE_DEBUG_TRUE@ASSEMBLY_COMPILER_COMMAND = gmcs
240
@ENABLE_RELEASE_TRUE@ASSEMBLY_COMPILER_COMMAND = gmcs
241
@ENABLE_DEBUG_TRUE@ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -debug "-define:DEBUG"
242
@ENABLE_RELEASE_TRUE@ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+
243
@ENABLE_DEBUG_TRUE@ASSEMBLY = bin/Debug/Zim.dll
244
@ENABLE_RELEASE_TRUE@ASSEMBLY = bin/Release/Zim.dll
245
@ENABLE_DEBUG_TRUE@ASSEMBLY_MDB = $(ASSEMBLY).mdb
246
@ENABLE_RELEASE_TRUE@ASSEMBLY_MDB =
247
@ENABLE_DEBUG_TRUE@COMPILE_TARGET = library
248
@ENABLE_RELEASE_TRUE@COMPILE_TARGET = library
249
@ENABLE_DEBUG_TRUE@PROJECT_REFERENCES =
250
@ENABLE_RELEASE_TRUE@PROJECT_REFERENCES =
251
@ENABLE_DEBUG_TRUE@BUILD_DIR = bin/Debug
252
@ENABLE_RELEASE_TRUE@BUILD_DIR = bin/Release
254
SATELLITE_ASSEMBLY_NAME = .resources.dll
244
SOURCES_BUILD = $(addprefix $(srcdir)/, $(FILES))
245
RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES))
246
RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \
247
-resource:$(resource),$(notdir $(resource)))
249
BUILD_DIR = $(top_builddir)/build
250
ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET)))
251
ASSEMBLY_FILE = $(BUILD_DIR)/$(ASSEMBLY).$(ASSEMBLY_EXTENSION)
252
STD_REFERENCES = $(foreach ref,$(filter-out -r:%,$(REFERENCES)),-r:$(ref))
253
BUILD_REFERENCES = $(filter -r:%,$(REFERENCES) $(STD_REFERENCES))
259
# Install plugins as data; there's no need for them to be excutable
260
plugindir = ${datadir}/gnome-do/plugins
261
plugin_DATA = $(foreach file,$(filter %.dll,$(OUTPUT_FILES)),$(file) $(file).mdb)
262
MCS_FLAGS = $(MCS_LINQ_FLAG) -noconfig -codepage:utf8 -warn:4 \
266
# Clean and dist targets
268
EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) \
269
$(foreach pkgcfg_file, $(PKG_CONFIG_FILES), $(pkgcfg_file).in)
271
CLEANFILES = $(OUTPUT_FILES) $(pkgconfig_DATA)
272
DISTCLEANFILES = *.pidb
273
MAINTAINERCLEANFILES = Makefile.in
259
277
src/ZimOpenPageAction.cs \
261
src/ZimPagesItemSource.cs \
262
gtk-gui/generated.cs \
263
gtk-gui/Zim.ZimConfig.cs
279
src/ZimPagesItemSource.cs
266
resources/Zim.addin.xml
282
Resources/Zim.addin.xml
272
$(GTK_SHARP_20_LIBS) \
273
$(GCONF_SHARP_20_LIBS) \
277
CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES) \
278
$(build_resx_resources) $(build_satellite_assembly_list)
279
VALID_CULTURES = ar bg ca zh-CHS cs da de el en es fi fr he hu is it ja ko nl no pl pt ro ru hr sk sq sv th tr id uk be sl et lv lt fa vi hy eu mk af fo hi sw gu ta te kn mr gl kok ar-SA bg-BG ca-ES zh-TW cs-CZ da-DK de-DE el-GR en-US fi-FI fr-FR he-IL hu-HU is-IS it-IT ja-JP ko-KR nl-NL nb-NO pl-PL pt-BR ro-RO ru-RU hr-HR sk-SK sq-AL sv-SE th-TH tr-TR id-ID uk-UA be-BY sl-SI et-EE lv-LV lt-LT fa-IR vi-VN hy-AM eu-ES mk-MK af-ZA fo-FO hi-IN sw-KE gu-IN ta-IN te-IN kn-IN mr-IN gl-ES kok-IN ar-IQ zh-CN de-CH en-GB es-MX fr-BE it-CH nl-BE nn-NO pt-PT sv-FI ar-EG zh-HK de-AT en-AU es-ES fr-CA ar-LY zh-SG de-LU en-CA es-GT fr-CH ar-DZ zh-MO en-NZ es-CR fr-LU ar-MA en-IE es-PA ar-TN en-ZA es-DO ar-OM es-VE ar-YE es-CO ar-SY es-PE ar-JO es-AR ar-LB en-ZW es-EC ar-KW en-PH es-CL ar-AE es-UY ar-BH es-PY ar-QA es-BO es-SV es-HN es-NI es-PR zh-CHT
280
build_sources = $(FILES) $(GENERATED_FILES)
281
build_sources_embed = $(build_sources:%='$(srcdir)/%')
283
get_resource_name = $(firstword $(subst $(comma__), ,$1))
284
get_culture = $(lastword $(subst ., ,$(basename $1)))
285
is_cultured_resource = $(and $(word 3,$(subst ., ,$1)), $(filter $(VALID_CULTURES),$(lastword $(subst ., ,$(basename $1)))))
286
build_resx_list = $(foreach res, $(RESOURCES), $(if $(filter %.resx, $(call get_resource_name,$(res))),$(res),))
287
build_non_culture_resx_list = $(foreach res, $(build_resx_list),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
288
build_non_culture_others_list = $(foreach res, $(filter-out $(build_resx_list),$(RESOURCES)),$(if $(call is_cultured_resource,$(call get_resource_name,$(res))),,$(res)))
289
build_others_list = $(build_non_culture_others_list)
290
build_xamlg_list = $(filter %.xaml.g.cs, $(FILES))
292
# resgen all .resx resources
293
build_resx_files = $(foreach res, $(build_resx_list), $(call get_resource_name,$(res)))
294
build_resx_resources = $(build_resx_files:.resx=.resources)
296
# embed resources for the main assembly
297
build_resx_resources_hack = $(subst .resx,.resources, $(build_non_culture_resx_list))
298
build_resx_resources_embed = $(build_resx_resources_hack:%='-resource:%')
299
build_others_files = $(foreach res, $(build_others_list),$(call get_resource_name,$(res)))
300
build_others_resources = $(build_others_files)
301
build_others_resources_embed = $(build_others_list:%='-resource:$(srcdir)/%')
302
build_resources = $(build_resx_resources) $(build_others_resources)
303
build_resources_embed = $(build_resx_resources_embed) $(build_others_resources_embed)
304
build_references_ref = $(foreach ref, $(REFERENCES), $(if $(filter \
305
-pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), \
306
-r:$(ref)))) $(foreach ref, $(DLL_REFERENCES), -r:$(ref)) \
307
$(foreach ref, $(PROJECT_REFERENCES), -r:$(ref))
308
DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/*
309
bin_SCRIPTS = $(BINARIES)
311
############################################################
312
# We want to install where GNOME-Do will pick our plugins #
313
# up from. This is datadir/gnome-do/plugins #
314
############################################################
315
pluginfilesdir = @datadir@/gnome-do/plugins
316
bundledlibsdir = $(pluginfilesdir)
317
bundledlibs_DATA = $(BUNDLED_LIBS)
318
pluginfiles_DATA = $(ASSEMBLY)
319
linuxpkgconfigdir = @libdir@/pkgconfig
320
linuxpkgconfig_DATA = $(LINUX_PKGCONFIG)
322
############################################################
323
# Bundled libs are bad, m'kay! #
324
# But we've got a bunch of them, so let's make it easier #
325
############################################################
326
bundledir = $(srcdir)/../BundledLibraries
328
# generating satellite assemblies
329
culture_resources = $(foreach res, $(RESOURCES), $(if $(call is_cultured_resource,$(call get_resource_name, $(res))),$(res)))
330
cultures = $(sort $(foreach res, $(culture_resources), $(call get_culture,$(call get_resource_name,$(res)))))
331
culture_resource_dependencies = $(BUILD_DIR)/$1/$(SATELLITE_ASSEMBLY_NAME): $(subst .resx,.resources,$2)
332
culture_resource_commandlines = cmd_line_satellite_$1 += '/embed:$(subst .resx,.resources,$2)'
333
build_satellite_assembly_list = $(cultures:%=$(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME))
334
build_culture_res_files = $(foreach res, $(culture_resources),$(call get_resource_name,$(res)))
289
$(DO_PLATFORM_LIBS) \
338
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.include $(am__configure_deps)
295
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/build.rules.mk $(am__configure_deps)
339
296
@for dep in $?; do \
340
297
case '$(am__configure_deps)' in \
364
321
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
365
322
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
366
323
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
367
install-binSCRIPTS: $(bin_SCRIPTS)
369
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
370
@list='$(bin_SCRIPTS)'; for p in $$list; do \
371
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
372
if test -f $$d$$p; then \
373
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
374
echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
375
$(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
379
uninstall-binSCRIPTS:
381
@list='$(bin_SCRIPTS)'; for p in $$list; do \
382
f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
383
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
384
rm -f "$(DESTDIR)$(bindir)/$$f"; \
386
install-bundledlibsDATA: $(bundledlibs_DATA)
388
test -z "$(bundledlibsdir)" || $(MKDIR_P) "$(DESTDIR)$(bundledlibsdir)"
389
@list='$(bundledlibs_DATA)'; for p in $$list; do \
390
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
392
echo " $(bundledlibsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(bundledlibsdir)/$$f'"; \
393
$(bundledlibsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(bundledlibsdir)/$$f"; \
396
uninstall-bundledlibsDATA:
398
@list='$(bundledlibs_DATA)'; for p in $$list; do \
400
echo " rm -f '$(DESTDIR)$(bundledlibsdir)/$$f'"; \
401
rm -f "$(DESTDIR)$(bundledlibsdir)/$$f"; \
403
install-linuxpkgconfigDATA: $(linuxpkgconfig_DATA)
405
test -z "$(linuxpkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(linuxpkgconfigdir)"
406
@list='$(linuxpkgconfig_DATA)'; for p in $$list; do \
407
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
409
echo " $(linuxpkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(linuxpkgconfigdir)/$$f'"; \
410
$(linuxpkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(linuxpkgconfigdir)/$$f"; \
413
uninstall-linuxpkgconfigDATA:
415
@list='$(linuxpkgconfig_DATA)'; for p in $$list; do \
417
echo " rm -f '$(DESTDIR)$(linuxpkgconfigdir)/$$f'"; \
418
rm -f "$(DESTDIR)$(linuxpkgconfigdir)/$$f"; \
420
install-pluginfilesDATA: $(pluginfiles_DATA)
422
test -z "$(pluginfilesdir)" || $(MKDIR_P) "$(DESTDIR)$(pluginfilesdir)"
423
@list='$(pluginfiles_DATA)'; for p in $$list; do \
424
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
426
echo " $(pluginfilesDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pluginfilesdir)/$$f'"; \
427
$(pluginfilesDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pluginfilesdir)/$$f"; \
430
uninstall-pluginfilesDATA:
432
@list='$(pluginfiles_DATA)'; for p in $$list; do \
434
echo " rm -f '$(DESTDIR)$(pluginfilesdir)/$$f'"; \
435
rm -f "$(DESTDIR)$(pluginfilesdir)/$$f"; \
324
install-pluginDATA: $(plugin_DATA)
326
test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)"
327
@list='$(plugin_DATA)'; for p in $$list; do \
328
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
330
echo " $(pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(plugindir)/$$f'"; \
331
$(pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(plugindir)/$$f"; \
334
uninstall-pluginDATA:
336
@list='$(plugin_DATA)'; for p in $$list; do \
338
echo " rm -f '$(DESTDIR)$(plugindir)/$$f'"; \
339
rm -f "$(DESTDIR)$(plugindir)/$$f"; \
556
uninstall-am: uninstall-binSCRIPTS uninstall-bundledlibsDATA \
557
uninstall-linuxpkgconfigDATA uninstall-pluginfilesDATA
460
uninstall-am: uninstall-pluginDATA
559
462
.MAKE: install-am install-strip
561
464
.PHONY: all all-am check check-am clean clean-generic distclean \
562
465
distclean-generic distdir dvi dvi-am html html-am info info-am \
563
install install-am install-binSCRIPTS install-bundledlibsDATA \
564
install-data install-data-am install-dvi install-dvi-am \
565
install-exec install-exec-am install-html install-html-am \
566
install-info install-info-am install-linuxpkgconfigDATA \
567
install-man install-pdf install-pdf-am install-pluginfilesDATA \
568
install-ps install-ps-am install-strip installcheck \
569
installcheck-am installdirs maintainer-clean \
570
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
571
pdf-am ps ps-am uninstall uninstall-am uninstall-binSCRIPTS \
572
uninstall-bundledlibsDATA uninstall-linuxpkgconfigDATA \
573
uninstall-pluginfilesDATA
580
# $(call emit-deploy-target,deploy-variable-name)
581
define emit-deploy-target
583
mkdir -p $$(dir $($1))
587
# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
588
# assumes that for a wrapper foo.pc its source template is foo.pc.in
589
# if $3 is non-empty then wrapper is marked exec
590
define emit-deploy-wrapper
594
$(if $3,chmod +x '$$@')
598
$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_dependencies,$(call get_culture,$(call get_resource_name,$(res))),$(call get_resource_name,$(res))))))
599
$(eval $(foreach res, $(culture_resources), $(eval $(call culture_resource_commandlines,$(call get_culture,$(call get_resource_name,$(res))),$(res)))))
601
$(build_satellite_assembly_list): $(BUILD_DIR)/%/$(SATELLITE_ASSEMBLY_NAME):
603
$(AL) -out:'$@' -culture:$* -t:lib $(cmd_line_satellite_$*)
605
$(build_xamlg_list): %.xaml.g.cs: %.xaml
608
$(build_resx_resources) : %.resources: %.resx
611
$(ASSEMBLY) $(ASSEMBLY_MDB): $(build_sources) $(build_resources) $(build_datafiles) $(DLL_REFERENCES) $(PROJECT_REFERENCES) $(build_xamlg_list) $(build_satellite_assembly_list)
612
mkdir -p $(dir $(ASSEMBLY))
613
$(ASSEMBLY_COMPILER_COMMAND) $(ASSEMBLY_COMPILER_FLAGS) -out:$(ASSEMBLY) -target:$(COMPILE_TARGET) $(build_sources_embed) $(build_resources_embed) $(build_references_ref)
466
install install-am install-data install-data-am install-dvi \
467
install-dvi-am install-exec install-exec-am install-html \
468
install-html-am install-info install-info-am install-man \
469
install-pdf install-pdf-am install-pluginDATA install-ps \
470
install-ps-am install-strip installcheck installcheck-am \
471
installdirs maintainer-clean maintainer-clean-generic \
472
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
473
uninstall-am uninstall-pluginDATA
476
all: $(ASSEMBLY_FILE)
478
$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE)
480
$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(COMPONENT_DEPS)
481
@mkdir -p $(BUILD_DIR)
484
"xterm" | "rxvt" | "rxvt-unicode") \
485
test "x$$COLORTERM" != "x" && colors=yes ;; \
486
"xterm-color") colors=yes ;; \
488
if [ "x$$colors" = "xyes" ]; then \
489
tty -s && true || { colors=no; true; } \
491
test "x$$colors" = "xyes" && \
492
echo -e "\033[1mCompiling $(notdir $@)...\033[0m" || \
493
echo "Compiling $(notdir $@)...";
494
@$(MCS) $(MCS_FLAGS) -target:$(TARGET) -out:$@ $(BUILD_DEFINES) $(BUILD_REFERENCES) $(COMPONENT_REFERENCES) $(RESOURCES_BUILD) $(SOURCES_BUILD)
495
@if [ -e $(srcdir)/$(notdir $@.config) ]; then \
496
cp $(srcdir)/$(notdir $@.config) $(BUILD_DIR) ; \
614
498
# Tell versions [3.59,3.63) of GNU make to not export all variables.
615
499
# Otherwise a system limit (for SysV at least) may be exceeded.