File: Makefile

package info (click to toggle)
debirf 0.34
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 236 kB
  • ctags: 27
  • sloc: sh: 904; makefile: 34
file content (50 lines) | stat: -rwxr-xr-x 1,750 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
#!/usr/bin/make -f

# Makefile for debirf

# (c) 2008-2011 Jameson Graef Rollins <jrollins@finestructure.net>
#               Daniel Kahn Gillmor <dkg@fifthhorseman.net>
# Licensed under GPL v3 or later

VERSION := `head -n1 debian/changelog | sed 's/.*(\([^-]*\).*/\1/'`

PREFIX ?= /usr
MANPREFIX ?= $(PREFIX)/share/man

PROFILES = minimal rescue xkiosk

PROFILE_TARBALLS = $(foreach profile,$(PROFILES),doc/example-profiles/$(profile).tgz)
PROFILE_MODULES = $(foreach profile,$(PROFILES),doc/example-profiles/$(profile)/modules)

default: $(PROFILE_TARBALLS)

doc/example-profiles/%/modules: doc/example-profiles/%.modules
	mkdir -p "$@"
	for m in $(shell cat $<); do ln -s /usr/share/debirf/modules/$$m $@/; done

doc/example-profiles/%.tgz: doc/example-profiles/% doc/example-profiles/%/modules
	(cd doc/example-profiles && tar c --exclude='*~' $(notdir $<)) | gzip -9 -n > "$@"

install: installman profiles
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	mkdir -p $(DESTDIR)$(PREFIX)/share/doc/debirf/example-profiles
	mkdir -p $(DESTDIR)$(PREFIX)/share/debirf/modules
	install src/debirf $(DESTDIR)$(PREFIX)/bin
	install src/common $(DESTDIR)$(PREFIX)/share/debirf
	install --mode=644 src/devices.tar.gz $(DESTDIR)$(PREFIX)/share/debirf
	install src/modules/* $(DESTDIR)$(PREFIX)/share/debirf/modules
	install doc/README $(DESTDIR)$(PREFIX)/share/doc/debirf
	install doc/autobuilder $(DESTDIR)$(PREFIX)/share/doc/debirf
	install doc/example-profiles/*.tgz $(DESTDIR)$(PREFIX)/share/doc/debirf/example-profiles

installman:
	mkdir -p $(DESTDIR)$(MANPREFIX)/man1
	gzip -n man/*/*
	install man/man1/* $(DESTDIR)$(MANPREFIX)/man1
	gzip -d man/*/*

clean:
	rm -f $(PROFILE_TARBALLS)
	rm -rf $(PROFILE_MODULES)

.PHONY: default install installman profiles clean