{"thread":{"id":"23316","subject":"[PATCHv6 3/6] Gitweb: add autoconfigure support for minifiers","startedAt":"2010-04-03T00:35:54Z","lastAt":"2010-04-03T00:35:54Z","messageCount":1,"participants":["Mark Rada"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"138483","messageId":"4BB68D6A.1000605@mailservices.uwaterloo.ca","threadId":"23316","inReplyTo":null,"subject":"[PATCHv6 3/6] Gitweb: add autoconfigure support for minifiers","fromName":"Mark Rada","fromEmail":"marada@uwaterloo.ca","sentAt":"2010-04-03T00:35:54Z","receivedAt":"2010-04-03T00:35:54Z","isPatch":false,"sender":{"key":"marada@uwaterloo.ca","avatar":"https://avatars.githubusercontent.com/u/38430?v=4"},"body":"This will allow users to set a JavaScript/CSS minifier when/if they run\nthe autoconfigure script while building git.\n\nSigned-off-by: Mark Rada <marada@uwaterloo.ca>\n\n---\n\nChanges since last revision:\n\t- Removed a sentence from the commit regarding the need to\n\t  edit the Makefiles manually\n\n Makefile        |    4 ----\n configure.ac    |   20 ++++++++++++++++++++\n gitweb/Makefile |   14 ++------------\n 3 files changed, 22 insertions(+), 16 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex a48f42f..4a6bc62 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -282,10 +282,6 @@ lib = lib\n # DESTDIR=\n pathsep = :\n \n-# JavaScript/CSS minifier invocation that can function as filter\n-JSMIN =\n-CSSMIN =\n-\n export prefix bindir sharedir sysconfdir\n \n CC = gcc\ndiff --git a/configure.ac b/configure.ac\nindex 914ae57..f4d7372 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -179,6 +179,26 @@ fi],\n    AC_MSG_NOTICE([Will try -pthread then -lpthread to enable POSIX Threads.])\n ])\n \n+# Define option to enable JavaScript minification\n+AC_ARG_ENABLE([jsmin],\n+[AS_HELP_STRING([--enable-jsmin=PATH],\n+  [PATH is the name of a JavaScript minifier or the absolute path to one.])],\n+[\n+  JSMIN=$enableval;\n+  AC_MSG_NOTICE([Setting JSMIN to '$JSMIN' to enable JavaScript minifying])\n+  GIT_CONF_APPEND_LINE(JSMIN=$enableval);\n+])\n+\n+# Define option to enable CSS minification\n+AC_ARG_ENABLE([cssmin],\n+[AS_HELP_STRING([--enable-cssmin=PATH],\n+  [PATH is the name of a CSS minifier or the absolute path to one.])],\n+[\n+  CSSMIN=$enableval;\n+  AC_MSG_NOTICE([Setting CSSMIN to '$CSSMIN' to enable CSS minifying])\n+  GIT_CONF_APPEND_LINE(CSSMIN=$enableval);\n+])\n+\n ## Site configuration (override autodetection)\n ## --with-PACKAGE[=ARG] and --without-PACKAGE\n AC_MSG_NOTICE([CHECKS for site configuration])\ndiff --git a/gitweb/Makefile b/gitweb/Makefile\nindex fffe700..ffee4bd 100644\n--- a/gitweb/Makefile\n+++ b/gitweb/Makefile\n@@ -14,10 +14,6 @@ prefix ?= $(HOME)\n bindir ?= $(prefix)/bin\n RM ?= rm -f\n \n-# JavaScript/CSS minifier invocation that can function as filter\n-JSMIN ?=\n-CSSMIN ?=\n-\n # default configuration for gitweb\n GITWEB_CONFIG = gitweb_config.perl\n GITWEB_CONFIG_SYSTEM = /etc/gitweb.conf\n@@ -30,18 +26,10 @@ GITWEB_STRICT_EXPORT =\n GITWEB_BASE_URL =\n GITWEB_LIST =\n GITWEB_HOMETEXT = indextext.html\n-ifdef CSSMIN\n-GITWEB_CSS = gitweb.min.css\n-else\n GITWEB_CSS = gitweb.css\n-endif\n GITWEB_LOGO = git-logo.png\n GITWEB_FAVICON = git-favicon.png\n-ifdef JSMIN\n-GITWEB_JS = gitweb.min.js\n-else\n GITWEB_JS = gitweb.js\n-endif\n GITWEB_SITE_HEADER =\n GITWEB_SITE_FOOTER =\n \n@@ -95,9 +83,11 @@ all:: gitweb.cgi\n FILES = gitweb.cgi\n ifdef JSMIN\n FILES += gitweb.min.js\n+GITWEB_JS = gitweb.min.js\n endif\n ifdef CSSMIN\n FILES += gitweb.min.css\n+GITWEB_CSS = gitweb.min.css\n endif\n gitweb.cgi: gitweb.perl $(GITWEB_JS) $(GITWEB_CSS)\n \n-- \n1.7.0.3.519.g7e0613\n"}]}