File: Makefile

package info (click to toggle)
dphys-config 20100216-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 280 kB
  • ctags: 14
  • sloc: sh: 1,422; makefile: 83
file content (77 lines) | stat: -rw-r--r-- 2,177 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# http://neil.franklin.ch/Projects/dphys-config/Makefile
# author Neil Franklin, last modification 2010.02.16
# This Makefile is copyright ETH Zuerich Physics Departement,
#   use under either modified/non-advertising BSD or GPL license

# --- various site dependant user config variables

# for creating an <program>[-<version>].tar.gz archive
DIR = dphys-config-20100216


# --- no user configurable stuff below here

# /usr/local added for FreeBSD, because their ports end up in there
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

PREFIX  = $(DESTDIR)/usr
BINDIR  = $(PREFIX)/bin
LIBDIR  = $(PREFIX)/lib/dphys-config
SBINDIR = $(PREFIX)/sbin
MAN1DIR = $(PREFIX)/share/man/man1
MAN7DIR = $(PREFIX)/share/man/man7
MAN8DIR = $(PREFIX)/share/man/man8
DOCDIR  = $(PREFIX)/share/doc/dphys-config
EXADIR  = $(DOCDIR)/examples


# --- code for acting out the various  make  targets

all:
	@# man pages need making and deleting of compressed versions
	@gzip -9 -c dphys-config.1 > dphys-config.1.gz

clean:
	@rm -f dphys-config.1.gz

distclean: clean

install:
	@# programs and man pages need installing to and deleting from system
	@mkdir -p $(BINDIR)
	@cp -p dphys-config          $(BINDIR)

	@mkdir -p $(MAN1DIR)
	@cp -p dphys-config.1.gz     $(MAN1DIR)

	@mkdir -p $(EXADIR)
	@cp -p  dphys-config.example  $(EXADIR)
	@cp -pr site.example          $(EXADIR)
	@cp -p  cron.d.example        $(EXADIR)
	@cp -p  init.d.example        $(EXADIR)

uninstall:
	@rm -f  $(EXADIR)/init.d.example
	@rm -f  $(EXADIR)/cron.d.example
	@rm -rf $(EXADIR)/site.example
	@rm -f  $(EXADIR)/dphys-config.example
	@rmdir $(EXADIR)

	@rm -f $(MAN1DIR)/dphys-config.1.gz

	@rm -f $(BINDIR)/dphys-config


# --- project management stuff

.PHONY: tar
tar:

	@# package this project into an .tar.gz for one nice download
	@echo packaging source and doc files into an .tar.gz ...
	@(cd ..; tar zcf $(DIR).tar.gz \
	  $(DIR)/FAQ $(DIR)/INSTALL $(DIR)/Logfile $(DIR)/Makefile \
	  $(DIR)/README $(DIR)/cron.d.example $(DIR)/dphys-config \
	  $(DIR)/dphys-config.1 $(DIR)/dphys-config.example \
	  $(DIR)/index.html.de $(DIR)/index.html.en \
	  $(DIR)/init.d.example $(DIR)/site.example )