summaryrefslogtreecommitdiffhomepage
path: root/Makefile.am
blob: eedd7236e85a3e0b31cd5ea2c18f82a8aa0707af (plain)
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
# Redhat spec files (from RPMs)
REDHAT_DIR = packaging/redhat
REDHAT = \
	$(REDHAT_DIR)/tinyproxy-1.5.2-config-patch \
	$(REDHAT_DIR)/tinyproxy-initd \
	$(REDHAT_DIR)/tinyproxy.spec

# Packaging files
PACKAGING = $(REDHAT)

#
# The following files are required for the build process
#
CONFIG_FILES = \
  config/config.guess config/config.sub \
  config/ltmain.sh config/install-sh config/missing config/mkinstalldirs \
  config/typecheck.m4 config/argenable.m4

EXTRA_DIST = $(CONFIG_FILES) TODO $(PACKAGING) bootstrap
SUBDIRS = src doc

install-data-local: tinyproxy-configure-file tinyproxy-html-files

# Install the configuration file if it doesn't already exist
tinyproxy-configure-file:
	$(mkinstalldirs) $(DESTDIR)@TINYPROXY_CONFIG_DIR@
	$(INSTALL) -m 600 $(srcdir)/doc/tinyproxy.conf \
		$(DESTDIR)@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@-dist
	test -f $(DESTDIR)@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@ \
		|| $(INSTALL) -m 600 $(srcdir)/doc/tinyproxy.conf \
			$(DESTDIR)@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@
	@echo ""
	@echo "A configuration file has been copied to:"
	@echo ""
	@echo "@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@-dist"
	@echo ""
	@echo "You will need to rename this file to:"
	@echo ""
	@echo "@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@"
	@echo ""
	@echo "and modify the values to suit your local system."
	@echo ""
	@echo "All the configuration directives are commented in the file, so"
	@echo "you should not have any problems configuring your system."
	@echo ""

# Install the HTML files
tinyproxy-html-files:
	$(mkinstalldirs) $(DESTDIR)$(datadir)/tinyproxy

	for file in debug default stats; do \
	  $(INSTALL) -m 644 $(srcdir)/doc/$$file.html $(DESTDIR)$(datadir)/tinyproxy/$$file.html.dist ; \
	  test -f $(DESTDIR)$(datadir)/tinyproxy/$$file.html || \
	    $(INSTALL) -m 644 $(srcdir)/doc/$$file.html $(DESTDIR)$(datadir)/tinyproxy/$$file.html ; \
	done
	$(INSTALL) -m 644 $(srcdir)/doc/HTML_VARIABLES $(DESTDIR)$(datadir)/tinyproxy/HTML_VARIABLES