File: Makefile

package info (click to toggle)
surf-display 0.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 140 kB
  • sloc: sh: 226; makefile: 42
file content (52 lines) | stat: -rw-r--r-- 1,413 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
PREFIX  ?= /usr/local
DESTDIR ?=

all: build

build: pdflatex man

pdflatex::
	cd data && pdflatex surf-display.tex && pdflatex surf-display.tex
	gzip -9 -c -n data/surf-display.pdf > data/surf-display.pdf.gz

man::
	gzip -9 -c -n data/surf-display.1 > data/surf-display.1.gz

install:
	if [ ! -e data/surf-display.pdf.gz ]; then \
	    echo "Run 'make build' first, before running 'sudo make install'."; \
	    exit -1; \
	fi

        # script
	mkdir -p $(DESTDIR)$(PREFIX)/bin/
	install -m 0755 bin/surf-display $(DESTDIR)$(PREFIX)/bin/

	# LaTeX Beamer PDF: Impressive HowTo
	mkdir -p $(DESTDIR)$(PREFIX)/share/doc/surf-display/
	install -m 0644 data/*.pdf.gz $(DESTDIR)$(PREFIX)/share/doc/surf-display/

	# man page
	mkdir -p $(DESTDIR)$(PREFIX)/share/man/man1
	install -m 0644 data/*.1.gz $(DESTDIR)$(PREFIX)/share/man/man1/

	# man page
	mkdir -p $(DESTDIR)$(PREFIX)/share/surf-display
	install -m 0644 data/empty-page.html $(DESTDIR)$(PREFIX)/share/surf-display/

	# register as available Xsession
	mkdir -p $(DESTDIR)$(PREFIX)/share/xsessions/
	install -m 0644 data/*.desktop $(DESTDIR)$(PREFIX)/share/xsessions/

clean::
	-rm data/surf-display.aux \
	    data/surf-display.log \
	    data/surf-display.nav \
	    data/surf-display.out \
	    data/surf-display.pdf \
	    data/surf-display.pdf.gz \
	    data/surf-display.snm \
	    data/surf-display.toc
	-rm data/surf-display.1.gz

.PHONY: man pdflatex