forked from SpanerRh/modern-pascal-introduction
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
57 lines (46 loc) · 1.6 KB
/
Makefile
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
# Customize LANGUAGE_SUFFIX and ASCIIDOCTOR_LANGUAGE for non-English languages.
# See the "upload-all" below for examples how to use them.
#
# Suffix added to input and output filenames.
LANGUAGE_SUFFIX:=
# Language parameters to AsciiDoctor, see https://asciidoctor.org/docs/user-manual/#language-support
ASCIIDOCTOR_LANGUAGE:=
NAME:=modern_pascal_introduction$(LANGUAGE_SUFFIX)
ALL_OUTPUT:=$(NAME).html $(NAME).pdf $(NAME).xml
#TEST_BROWSER:=firefox
TEST_BROWSER:=x-www-browser
all: $(ALL_OUTPUT)
$(NAME).html: $(NAME).adoc
asciidoctor $< -o $@
fpc -gl -gh patreon-link-insert.lpr
./patreon-link-insert $@
$(TEST_BROWSER) $@ &
$(NAME).xml: $(NAME).adoc
asciidoctor $(ASCIIDOCTOR_LANGUAGE) -b docbook5 $< -o $@
# yelp $@
$(NAME).pdf: $(NAME).xml
fopub $(NAME).xml
# $(NAME).pdf: $(NAME).adoc
# asciidoctor-pdf $(NAME).adoc
.PHONY: clean
clean:
rm -f $(ALL_OUTPUT)
.PHONY: test
test:
$(MAKE) -C code-samples$(LANGUAGE_SUFFIX)/ clean all
#SSH_TARGET:[email protected]
SSH_TARGET:[email protected]
#SCP_TARGET:=$(SSH_TARGET):/home/michalis/public_html/modern_pascal_introduction/
SCP_TARGET:=$(SSH_TARGET):/home/michalis/cge-html/
#HTML_BASE:=http://michalis.ii.uni.wroc.pl/~michalis/modern_pascal_introduction/
HTML_BASE:=https://castle-engine.io/
.PHONY: upload
upload: test clean all
scp $(NAME).html $(NAME).pdf patreon-link.png $(SCP_TARGET)
$(TEST_BROWSER) $(HTML_BASE)$(NAME).html &
$(TEST_BROWSER) $(HTML_BASE)$(NAME).pdf &
ssh $(SSH_TARGET) www_permissions.sh
.PHONY: upload-all
upload-all:
$(MAKE) upload
$(MAKE) upload LANGUAGE_SUFFIX=_russian ASCIIDOCTOR_LANGUAGE='-a lang=ru'