Debian Codegraph @

eyes17/helpFiles/Makefile

raw ◀ ▶
1 Debian patch touch this file
1 DESTDIR =
•2
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 # try to take a timestamp from ../../debian/changelog and if that fails
7 # replace by 1584377500, which is near 2020-1016 17:00 UTC
8 export SOURCE_DATE_EPOCH = $(shell dpkg-parsechangelog -l ../../debian/changelog -STimestamp 2>/dev/null || echo 1584377500)
9
10 all: fixTheLinks $(LANGUAGES_HTMLDONE)
11
12 fixTheLinks:
13 ./prepareHTML . $(LANGUAGES)
14
15 %/html-done: $(wildcard %/_sources/*.rst)
16 l=$$(dirname $@); \
17 [ -d $$l/_sources/_static ] || mkdir $$l/_sources/_static; \
18 echo "====| RST => HTML for language $$l |===="; \
19 $(MAKE) -C $$l all; \
20 date > $@
21
22 clean:
23 rm -rf cache/
24 for l in $(LANGUAGES); do \
•25 rm -f $$l/html-done; \
26 rm -rf $$l/_sources/__pycache__; \
27 $(MAKE) -C $$l clean; \
28 done
29
30 install: all
31 mkdir -p $(DESTDIR)/usr/share/eyes17/helpFiles
32 cp -a $(LANGUAGES) pics schematics $(DESTDIR)/usr/share/eyes17/helpFiles
•33 # *-done files contain datetime strings, so they must not be installed
34 find $(DESTDIR)/usr/share/eyes17/helpFiles -name "*-done" | xargs rm -f
35
36 .PHONY: all clean install userManual fixTheLinks