summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am19
1 files changed, 17 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index 42bd132..926dda0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,7 +11,10 @@ PACKAGING = $(REDHAT)
EXTRA_DIST = TODO $(PACKAGING)
SUBDIRS = src doc
-install-data-local:
+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
@@ -31,4 +34,16 @@ install-data-local:
@echo ""
@echo "All the configuration directives are commented in the file, so"
@echo "you should not have any problems configuring your system."
- @echo "" \ No newline at end of file
+ @echo ""
+
+# Install the HTML files
+tinyproxy-html-files:
+ $(mkinstalldirs) $(DESTDIR)$(datadir)/tinyproxy
+
+ test -d $(datadir)/tinyproxy || mkdir $(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