summaryrefslogtreecommitdiff
path: root/plugins/externaltools/data/Makefile.am
blob: e93e25f944c5f610d4e9885d4d669bd9509ac593 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
EXTERNALTOOLS_TOOL_MERGE = $(top_srcdir)/plugins/externaltools/scripts/gedit-tool-merge.pl

externaltools_tools_in_files =						\
	plugins/externaltools/data/build.tool.in			\
	plugins/externaltools/data/remove-trailing-spaces.tool.in	\
	plugins/externaltools/data/send-to-fpaste.tool.in

externaltools_tools_in_linux =						\
	plugins/externaltools/data/open-terminal-here.tool.in		\
	plugins/externaltools/data/run-command.tool.in

externaltools_tools_in_osx =						\
	plugins/externaltools/data/open-terminal-here-osx.tool.in

externaltools_tools_in_win32 =

externaltools_install_tools_in_files = $(tools_in_files)

if PLATFORM_OSX
externaltools_install_tools_in_files += $(tools_in_osx)
else
if PLATFORM_WIN32
externaltools_install_tools_in_files += $(tools_in_win32)
else
externaltools_install_tools_in_files += $(tools_in_linux)
endif
endif

externaltools_desktop_in_files = $(externaltools_install_tools_in_files:.tool.in=.desktop.in)
externaltools_desktop_files    = $(externaltools_install_tools_in_files:.tool.in=.desktop)

externaltools_toolsdir = $(GEDIT_PLUGINS_DATA_DIR)/externaltools/tools
externaltools_tools_SCRIPTS = $(externaltools_install_tools_in_files:.tool.in=)

externaltools_all_tools_in_files =	\
	$(externaltools_tools_in_files)	\
	$(externaltools_tools_in_linux)	\
	$(externaltools_tools_in_osx)	\
	$(externaltools_tools_in_win32)

externaltools_all_desktop_in_files = $(externaltools_all_tools_in_files:.tool.in=.desktop.in)
externaltools_all_desktop_files = $(externaltools_all_tools_in_files:.tool.in=.desktop)
externaltools_all_tools_files = $(externaltools_all_tools_in_files:.tool.in=)

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

EXTRA_DIST +=					\
	$(externaltools_all_desktop_in_files)	\
	$(externaltools_all_tools_in_files)

CLEANFILES +=					\
	$(externaltools_all_desktop_files)	\
	$(externaltools_all_tools_files)

DISTCLEANFILES +=				\
	$(externaltools_all_desktop_files) 	\
	$(externaltools_all_tools_files)