File: Makefile

package info (click to toggle)
expeyes 5.3.3%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 43,480 kB
  • sloc: python: 36,039; ansic: 9,754; xml: 1,010; makefile: 784; sh: 581; asm: 202; javascript: 46; php: 1
file content (36 lines) | stat: -rw-r--r-- 1,210 bytes parent folder | download
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
DESTDIR =

LANGUAGES = $(shell find . -mindepth 1 -maxdepth 1 -type d | grep -Ev "pics|schematics|xcircuit|cache")
LANGUAGES_HTMLDONE = $(patsubst %, %/html-done, $(LANGUAGES))

# try to take a timestamp from ../../debian/changelog and if that fails
# replace by 1584377500, which is near 2020-1016 17:00 UTC
export SOURCE_DATE_EPOCH = $(shell dpkg-parsechangelog -l ../../debian/changelog -STimestamp 2>/dev/null || echo 1584377500)

all: fixTheLinks $(LANGUAGES_HTMLDONE)

fixTheLinks:
	./prepareHTML . $(LANGUAGES)

%/html-done: $(wildcard %/_sources/*.rst)
	l=$$(dirname $@); \
	[ -d $$l/_sources/_static ] || mkdir $$l/_sources/_static; \
	echo "====| RST => HTML for language $$l |===="; \
	$(MAKE) -C $$l all; \
	date > $@

clean:
	rm -rf cache/
	for l in $(LANGUAGES); do \
	  rm -f $$l/html-done; \
	  rm -rf $$l/_sources/__pycache__; \
	  $(MAKE) -C $$l clean; \
	done

install: all
	mkdir -p $(DESTDIR)/usr/share/eyes17/helpFiles
	cp -a $(LANGUAGES) pics schematics $(DESTDIR)/usr/share/eyes17/helpFiles
	# *-done files contain datetime strings, so they must not be installed
	find $(DESTDIR)/usr/share/eyes17/helpFiles -name "*-done" | xargs rm -f

.PHONY: all clean install userManual fixTheLinks