Debian Codegraph @

eyes17/helpFiles/Makefile

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 DESTDIR =
2 LANGUAGES_WITH_MANUAL = en es fr ml
3 LANGUAGES = $(shell find . -mindepth 1 -maxdepth 1 -type d | grep -Ev "pics|schematics|xcircuit|cache")
4 LANGUAGES_HTMLDONE = $(patsubst %, %/html-done, $(LANGUAGES))
5
6 LANGUAGES_PDFDONE = $(patsubst %, %/pdf-done, $(LANGUAGES_WITH_MANUAL))
7 LANGUAGES_EPUBDONE = $(patsubst %, %/epub-done, $(LANGUAGES_WITH_MANUAL))
8
9 # try to take a timestamp from ../../debian/changelog and if that fails
10 # replace by 1584377500, which is near 2020-1016 17:00 UTC
11 export SOURCE_DATE_EPOCH = $(shell dpkg-parsechangelog -l ../../debian/changelog -STimestamp 2>/dev/null || echo 1584377500)
12
13 all: fixTheLinks $(LANGUAGES_HTMLDONE)
14
15 fixTheLinks:
16 ./prepareHTML . $(LANGUAGES)
17
18 %/html-done: $(wildcard %/_sources/*.rst)
19 l=$$(dirname $@); \
20 [ -d $$l/_sources/_static ] || mkdir $$l/_sources/_static; \
21 echo "====| RST => HTML for language $$l |===="; \
22 $(MAKE) -C $$l all; \
23 date > $@
24
25 userManual: $(LANGUAGES_PDFDONE) $(LANGUAGES_EPUBDONE)
26
27 %/pdf-done: $(wildcard %/_sources/*.rst)
28 l=$$(dirname $@); \
29 echo "====| RST => PDF for language $$l |===="; \
30 $(MAKE) -C $$l latexpdf; \
31 date > $@
32
33 %/epub-done: $(wildcard %/_sources/*.rst)
34 l=$$(dirname $@); \
35 echo "====| RST => EPUB for language $$l |===="; \
36 $(MAKE) -C $$l epub; \
37 date > $@
38
39
40 clean:
41 rm -f $(LANGUAGES_PDFDONE) $(LANGUAGES_EPUBDONE)
42 rm -rf cache/
43 for l in $(LANGUAGES); do \
44 rm -f $$l/pdf-done $$l/html-done $$l/epub-done; \
45 rm -rf $$l/_sources/__pycache__; \
46 $(MAKE) -C $$l clean; \
47 done
48
49 install: all
50 mkdir -p $(DESTDIR)/usr/share/eyes17/helpFiles
51 cp -a $(LANGUAGES) pics schematics $(DESTDIR)/usr/share/eyes17/helpFiles
52
53 .PHONY: all clean install userManual fixTheLinks