File: Makefile.am

package info (click to toggle)
gimp-help 3.0.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 289,524 kB
  • sloc: xml: 115,826; sh: 3,852; python: 1,004; makefile: 585; perl: 134
file content (131 lines) | stat: -rw-r--r-- 3,316 bytes parent folder | download | duplicates (2)
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
## Process this file with automake to produce Makefile.in

# Select languages that are both in LINGUAS and ALL_LINGUAS
LANGUAGES = $(if $(LINGUAS),$(filter $(ALL_LINGUAS),$(LINGUAS)),$(ALL_LINGUAS))

POT_FILES = $(srcdir)/po/gimp-keys.pot

PO_FILES = $(foreach lang,$(filter-out en,$(ALL_LINGUAS)),$(srcdir)/po/$(lang).po)

PDF_FILES = $(foreach lang,$(LANGUAGES),gimp-keys-$(lang).pdf)

XSL_FILES = \
	stylesheets/keys-svg.xsl	\
	stylesheets/keys-docbook.xsl

TEMPLATES = \
	templates/svg_template.xml \
	templates/wilber.svg


EXTRA_DIST = \
	gimp-keys.xml \
	$(POT_FILES) \
	$(PO_FILES) \
	$(XSL_FILES) \
	$(TEMPLATES)

COMPENDIUM = Compendium.po

# gimp-help directories
helpdir  = $(gimpdatadir)/help

$(srcdir)/po/gimp-keys.pot: $(srcdir)/gimp-keys.xml
	@echo Making $@; \
	$(XML2PO) $(XML2POFLAGS) $< | $(MSGUNIQ) --width=$(MSGWIDTH) - > $@

$(srcdir)/po/%.po: $(srcdir)/po/gimp-keys.pot
	@echo Making $@; \
	if [ -f $(top_srcdir)/po/$*/$(COMPENDIUM) ]; then \
		with_compendium="--compendium=$(top_srcdir)/po/$*/$(COMPENDIUM)"; \
	fi; \
	if [ ! -s $@ ]; then \
		$(MSGINIT) $(MSGINITFLAGS) --input=$< --locale=$* --output=$@; \
	fi; \
	$(MSGMERGE) $(MSGMERGEFLAGS) $${with_compendium} --update $@ $<; \
	rm -f $@~

.PHONY: pot po-% po
pot: $(srcdir)/po/gimp-keys.pot ;
po-%: $(srcdir)/po/%.po ;
po: $(foreach lang,$(filter-out en,$(LANGUAGES)),po-$(lang)) ;

xml/gimp-keys-%.xml: $(srcdir)/po/%.po $(srcdir)/gimp-keys.xml
	@$(MKDIR_P) xml
	@$(XML2PO) -p $< $(srcdir)/gimp-keys.xml > $@

# English is a special case
#
.INTERMEDIATE: xml/gimp-keys-en.xml
xml/gimp-keys-en.xml: $(srcdir)/gimp-keys.xml
	@$(MKDIR_P) xml; \
	cp $< $@

svg/gimp-keys-%.svg: xml/gimp-keys-%.xml stylesheets/keys-svg.xsl
	@$(MKDIR_P) svg
	@echo "*** Making Quickreference SVG ($*) ..."
	@$(XSLTPROC) \
	  $(srcdir)/stylesheets/keys-svg.xsl \
	  $< \
	  > $@

svg: $(foreach lang,$(LANGUAGES),svg/gimp-keys-$(lang).svg)

# Quickreference PDF generation

if HAVE_SVG2PDF

pdf/gimp-keys-%.pdf: svg/gimp-keys-%.svg
	@$(MKDIR_P) pdf
	@if test -f pdf/%.pdf; then rm -f pdf/%.pdf; fi
	@echo "*** Making Quickreference PDF ($*) ..."
	@$(SVG2PDF) $(SVG2PDF_FLAGS) -o $@ $<

pdf-local: $(foreach lang,$(LANGUAGES),pdf/gimp-keys-$(lang).pdf)

endif

docbook/gimp-keys-%.xml: xml/gimp-keys-%.xml stylesheets/keys-docbook.xsl
	@$(MKDIR_P) docbook
	@echo "*** Making Quickreference docbook ($*) ..."
	@$(XSLTPROC) \
	  $(srcdir)/stylesheets/keys-docbook.xsl \
	  $< \
	  > $@

docbook: $(foreach lang,$(LANGUAGES),docbook/gimp-keys-$(lang).xml)

all-local: svg pdf-local docbook

install-data-local:
	@$(MKDIR_P) $(DESTDIR)$(helpdir)/pdf || exit 77
	@echo "*** Installing Quickreference PDF's into: $(DESTDIR)$(helpdir)/pdf"
	@cd pdf; \
	for file in $(PDF_FILES); do \
		cp -f $${file} $(DESTDIR)$(helpdir)/pdf/$* ; \
	done; \
	echo .

uninstall-local:
	@test -d $(DESTDIR)$(helpdir)/pdf || exit 70
	@echo "*** Uninstalling PDF:"
	@for file in $(PDF_FILES); do \
		rm -rf $(DESTDIR)$(helpdir)/pdf/$${file}; \
		echo "Removed $(DESTDIR)$(helpdir)/pdf/$${file}"; \
	done; \
	echo .
	@test -z "$(DESTDIR)${helpdir}" || cd $(DESTDIR)${helpdir} && \
	rmdir pdf \
	&& echo "Removed $(DESTDIR)${helpdir}/pdf"

clean-local:
	@echo "*** Cleaning up ..."
	@rm -rf docbook
	@rm -rf pdf
	@rm -rf svg
	@rm -rf xml
	@rm -f .xml2po.mo

.DELETE_ON_ERROR:

## EOF