File: Makefile.mk

package info (click to toggle)
geographiclib 1.37-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 9,688 kB
  • ctags: 4,871
  • sloc: cpp: 31,440; sh: 11,632; cs: 9,411; ansic: 1,428; java: 1,333; python: 1,131; makefile: 758; xml: 381; pascal: 30
file content (30 lines) | stat: -rw-r--r-- 965 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
SCRIPTDRIVERS = $(wildcard scripts/[A-Za-z]*.html)
JSSCRIPTS = $(wildcard scripts/GeographicLib/[A-Za-z]*.js)

VERSION:=$(shell grep '\bVERSION=' ../configure | cut -f2 -d\' | head -1)

doc: html/index.html

html/index.html: index.html.in utilities.html.in
	if test -d html; then rm -rf html/*; else mkdir html; fi
	cp ../LICENSE.txt html/
	sed -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
	utilities.html.in > html/utilities.html
	sed -e "s%@PROJECT_VERSION@%$(VERSION)%g" \
	index.html.in > html/index.html

PREFIX = /usr/local
DEST = $(PREFIX)/share/doc/GeographicLib
DOCDEST = $(DEST)/html
SCRIPTDEST = $(DEST)/scripts
INSTALL = install -b

install: html/index.html
	test -d $(DOCDEST) || mkdir -p $(DOCDEST)
	$(INSTALL) -m 644 html/* $(DOCDEST)/
	test -d $(SCRIPTDEST)/GeographicLib || \
	mkdir -p $(SCRIPTDEST)/GeographicLib
	$(INSTALL) -m 644 $(SCRIPTDRIVERS) $(SCRIPTDEST)/
	$(INSTALL) -m 644 $(JSSCRIPTS) $(SCRIPTDEST)/GeographicLib/

.PHONY: doc install clean