-
Notifications
You must be signed in to change notification settings - Fork 58
/
Makefile.include
35 lines (29 loc) · 1.2 KB
/
Makefile.include
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
build_sources = $(FILES) $(GENERATED_FILES)
build_sources_embed = $(build_sources:%='$(srcdir)/%')
build_references_ref = $(foreach ref, $(REFERENCES), $(if $(filter -pkg:%, $(ref)), $(ref), $(if $(filter -r:%, $(ref)), $(ref), -r:$(ref))))
build_references_ref += $(foreach ref, $(DLL_REFERENCES), -r:$(ref))
build_references_ref += $(foreach ref, $(PROJECT_REFERENCES), -r:$(ref))
EXTRA_DIST += $(build_sources) $(ASSEMBLY_WRAPPER_IN) $(EXTRAS) $(DATA_FILES)
CLEANFILES += $(ASSEMBLY) $(ASSEMBLY).mdb $(BINARIES)
DISTCLEANFILES = $(GENERATED_FILES) $(pc_files) $(BUILD_DIR)/*
pkglib_SCRIPTS = $(ASSEMBLY)
bin_SCRIPTS = $(BINARIES)
programfilesdir = @libdir@/@PACKAGE@
programfiles_DATA = $(PROGRAMFILES)
linuxpkgconfigdir = @libdir@/pkgconfig
linuxpkgconfig_DATA = $(LINUX_PKGCONFIG)
# $(call emit-deploy-target,deploy-variable-name)
define emit-deploy-target
$($1): $($1_SOURCE)
mkdir -p $$(dir $($1))
cp '$$<' '$$@'
endef
# $(call emit-deploy-wrapper,wrapper-variable-name,wrapper-sourcefile,x)
# assumes that for a wrapper foo.pc its source template is foo.pc.in
# if $3 is non-empty then wrapper is marked exec
define emit-deploy-wrapper
$($1): $2
mkdir -p '$$(@D)'
cp '$$<' '$$@'
$(if $3,chmod +x '$$@')
endef