File: Makefile.client

package info (click to toggle)
flashproxy 1.7-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 936 kB
  • ctags: 876
  • sloc: python: 3,708; sh: 823; makefile: 246; lisp: 15
file content (91 lines) | stat: -rw-r--r-- 2,748 bytes parent folder | download | duplicates (2)
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Makefile for a source distribution of flashproxy-client.
#
# This package is not self-contained and the build products may require other
# dependencies to function; it is given as a reference for distro packagers.

PACKAGE = flashproxy-client
VERSION = $(shell sh version.sh)
DESTDIR =

THISFILE = $(lastword $(MAKEFILE_LIST))
PYTHON = python

# GNU command variables
# see http://www.gnu.org/prep/standards/html_node/Command-Variables.html

INSTALL = install
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_PROGRAM = $(INSTALL)
INSTALL_SCRIPT = $(INSTALL)

# GNU directory variables
# see http://www.gnu.org/prep/standards/html_node/Directory-Variables.html

prefix = /usr/local
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin

datarootdir = $(prefix)/share
datadir = $(datarootdir)
sysconfdir = $(prefix)/etc

docdir = $(datarootdir)/doc/$(PACKAGE)
mandir = $(datarootdir)/man
man1dir = $(mandir)/man1

srcdir = .

SRC_MAN1 = doc/flashproxy-client.1.txt doc/flashproxy-reg-appspot.1.txt doc/flashproxy-reg-email.1.txt doc/flashproxy-reg-http.1.txt doc/flashproxy-reg-url.1.txt
SRC_SCRIPT = flashproxy-client flashproxy-reg-appspot flashproxy-reg-email flashproxy-reg-http flashproxy-reg-url
SRC_DOC = README LICENSE ChangeLog torrc
SRC_ALL = $(SRC_SCRIPT) $(SRC_DOC) $(SRC_MAN1)

DST_MAN1 = $(SRC_MAN1:%.1.txt=%.1)
DST_SCRIPT = $(SRC_SCRIPT)
DST_DOC = $(SRC_DOC)
DST_ALL = $(DST_SCRIPT) $(DST_DOC) $(DST_MAN1)

TEST_PY = flashproxy-client-test.py

REBUILD_MAN = 1

all: $(DST_ALL) $(THISFILE)

%.1: %.1.txt
ifeq ($(REBUILD_MAN),0)
	@echo "warning: $@ *may* be out-of-date; if so then rm and re-checkout from VCS or force a re-build with REBUILD_MAN=1"
else
	rm -f $@
	a2x --no-xmllint --xsltproc-opts "--nonet --stringparam man.th.title.max.length 24" -d manpage -f manpage $<
endif

install: all
	mkdir -p $(DESTDIR)$(bindir)
	for i in $(DST_SCRIPT); do $(INSTALL_SCRIPT) "$$i" $(DESTDIR)$(bindir); done
	mkdir -p $(DESTDIR)$(docdir)
	for i in $(DST_DOC); do $(INSTALL_DATA) "$$i" $(DESTDIR)$(docdir); done
	mkdir -p $(DESTDIR)$(man1dir)
	for i in $(DST_MAN1); do $(INSTALL_DATA) "$$i" $(DESTDIR)$(man1dir); done

uninstall:
	for i in $(notdir $(DST_SCRIPT)); do rm $(DESTDIR)$(bindir)/"$$i"; done
	for i in $(notdir $(DST_DOC)); do rm $(DESTDIR)$(docdir)/"$$i"; done
	for i in $(notdir $(DST_MAN1)); do rm $(DESTDIR)$(man1dir)/"$$i"; done

clean:
	rm -f *.pyc

distclean: clean

maintainer-clean: distclean
	rm -f $(DST_MAN1)

# TODO(infinity0): eventually do this as part of 'check' once we have a decent
# overrides file in place that filters out false-positives
pylint: $(SRC_SCRIPT)
	pylint -E $^

check: $(THISFILE)
	for i in $(TEST_PY); do $(PYTHON) "$$i"; done

.PHONY: all install uninstall clean distclean maintainer-clean check pylint