summaryrefslogtreecommitdiff
path: root/plugins/externaltools/data/Makefile.am
blob: c9abcce059ec7f97e0d68b38578351048ec937b5 (plain)
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
TOOL_MERGE=$(top_srcdir)/plugins/externaltools/scripts/pluma-tool-merge.pl

tools_in_files = \
	build.tool.in \
	open-terminal-here.tool.in \
	remove-trailing-spaces.tool.in \
	run-command.tool.in \
	search-recursive.tool.in \
	switch-c.tool.in

install_tools_in_files = $(tools_in_files)

desktop_in_files = $(install_tools_in_files:.tool.in=.desktop.in)
desktop_files    = $(install_tools_in_files:.tool.in=.desktop)

tools_SCRIPTS = $(install_tools_in_files:.tool.in=)
toolsdir = $(PLUMA_PLUGINS_DATA_DIR)/externaltools/tools

all_tools_in_files = \
	$(tools_in_files)

all_desktop_in_files = $(all_tools_in_files:.tool.in=.desktop.in)
all_desktop_files = $(all_tools_in_files:.tool.in=.desktop)
all_tools_files = $(all_tools_in_files:.tool.in=)

@INTLTOOL_DESKTOP_RULE@

# Tools are generated by merging a script file (.tool.in) with a data file
# (.desktop), which happens to be translated using intltool.
$(tools_SCRIPTS): %: %.tool.in %.desktop $(TOOL_MERGE)
	perl $(TOOL_MERGE) -o $@ $< $(word 2,$^)
	chmod 755 $@

EXTRA_DIST = \
	$(all_desktop_in_files) \
	$(all_tools_in_files)

CLEANFILES = \
	$(all_desktop_files) \
	$(all_tools_files)

DISTCLEANFILES = \
	$(all_desktop_files) \
	$(all_tools_files)

-include $(top_srcdir)/git.mk