]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Install error page templates properly.
authorAmos Jeffries <squid3@treenet.co.nz>
Sun, 20 Sep 2009 03:07:29 +0000 (15:07 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sun, 20 Sep 2009 03:07:29 +0000 (15:07 +1200)
The new install make code was failing to install the template/ directory
required for Squid to run.

It was also using the wrong variable to install translated content. Thus
installing the english template files in place of the translated ones.

errors/Makefile.am

index 81c314b61ec3e1435c5e15107124a93801a70f3a..3d69ce7f52d614e43beedebc71bddbfc5c2f2c75 100644 (file)
@@ -135,7 +135,7 @@ install-exec-local: translate
 
 install-data-local: translate
        $(mkinstalldirs) $(DESTDIR)$(DEFAULT_ERROR_DIR) ; \
-       for l in $(TRANSLATE_LANGUAGES); do \
+       for l in $(TRANSLATE_LANGUAGES) templates; do \
            l=`basename $$l .lang`; \
            echo "Located $$l for install..."; \
            if test -d $(srcdir)/$$l || test -d $(builddir)/$$l; then \
@@ -143,12 +143,12 @@ install-data-local: translate
            fi; \
            for f in $(ERROR_TEMPLATES); do \
                page=`basename $$f`; \
-               if test -f $(builddir)/$$l/$$f; then \
-                   echo "$(INSTALL_DATA) $(builddir)/$$l/$$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l"; \
-                           $(INSTALL_DATA) $(builddir)/$$l/$$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; \
-               elif test -f $(srcdir)/$$l/$$f; then \
-                   echo "$(INSTALL_DATA) $(srcdir)/$$l/$$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l"; \
-                           $(INSTALL_DATA) $(srcdir)/$$l/$$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; \
+               if test -f $(builddir)/$$l/$$page; then \
+                   echo "$(INSTALL_DATA) $(builddir)/$$l/$$page $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l"; \
+                           $(INSTALL_DATA) $(builddir)/$$l/$$page $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; \
+               elif test -f $(srcdir)/$$l/$$page; then \
+                   echo "$(INSTALL_DATA) $(srcdir)/$$l/$$page $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l"; \
+                           $(INSTALL_DATA) $(srcdir)/$$l/$$page $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; \
                fi; \
            done; \
        done; \