summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e6ce21)
raw | patch | inline | side by side (parent: 0e6ce21)
author | Mark Rada <marada@uwaterloo.ca> | |
Sat, 3 Apr 2010 00:35:54 +0000 (20:35 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 3 Apr 2010 04:23:38 +0000 (21:23 -0700) |
This will allow users to set a JavaScript/CSS minifier when/if they run
the autoconfigure script while building git.
Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the autoconfigure script while building git.
Signed-off-by: Mark Rada <marada@uwaterloo.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | patch | blob | history | |
configure.ac | patch | blob | history | |
gitweb/Makefile | patch | blob | history |
diff --git a/Makefile b/Makefile
index 9bebcf1c44953aba612d97f88f816b7eea6682ac..2c36def3ec72eb5a5bbf418aaac6e9e12846a5a4 100644 (file)
--- a/Makefile
+++ b/Makefile
# DESTDIR=
pathsep = :
-# JavaScript/CSS minifier invocation that can function as filter
-JSMIN =
-CSSMIN =
-
export prefix bindir sharedir sysconfdir
CC = gcc
diff --git a/configure.ac b/configure.ac
index 914ae5759f6932c28ee39afec1e36d80c8e63cd9..f4d7372ef8d7b45f9810d5f8bc191c71622a71f2 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_MSG_NOTICE([Will try -pthread then -lpthread to enable POSIX Threads.])
])
+# Define option to enable JavaScript minification
+AC_ARG_ENABLE([jsmin],
+[AS_HELP_STRING([--enable-jsmin=PATH],
+ [PATH is the name of a JavaScript minifier or the absolute path to one.])],
+[
+ JSMIN=$enableval;
+ AC_MSG_NOTICE([Setting JSMIN to '$JSMIN' to enable JavaScript minifying])
+ GIT_CONF_APPEND_LINE(JSMIN=$enableval);
+])
+
+# Define option to enable CSS minification
+AC_ARG_ENABLE([cssmin],
+[AS_HELP_STRING([--enable-cssmin=PATH],
+ [PATH is the name of a CSS minifier or the absolute path to one.])],
+[
+ CSSMIN=$enableval;
+ AC_MSG_NOTICE([Setting CSSMIN to '$CSSMIN' to enable CSS minifying])
+ GIT_CONF_APPEND_LINE(CSSMIN=$enableval);
+])
+
## Site configuration (override autodetection)
## --with-PACKAGE[=ARG] and --without-PACKAGE
AC_MSG_NOTICE([CHECKS for site configuration])
diff --git a/gitweb/Makefile b/gitweb/Makefile
index fffe7007601d42020eb26f6511a0790d0b18a00c..ffee4bd1e30839b68591805b99d170e1ba6ef333 100644 (file)
--- a/gitweb/Makefile
+++ b/gitweb/Makefile
bindir ?= $(prefix)/bin
RM ?= rm -f
-# JavaScript/CSS minifier invocation that can function as filter
-JSMIN ?=
-CSSMIN ?=
-
# default configuration for gitweb
GITWEB_CONFIG = gitweb_config.perl
GITWEB_CONFIG_SYSTEM = /etc/gitweb.conf
GITWEB_BASE_URL =
GITWEB_LIST =
GITWEB_HOMETEXT = indextext.html
-ifdef CSSMIN
-GITWEB_CSS = gitweb.min.css
-else
GITWEB_CSS = gitweb.css
-endif
GITWEB_LOGO = git-logo.png
GITWEB_FAVICON = git-favicon.png
-ifdef JSMIN
-GITWEB_JS = gitweb.min.js
-else
GITWEB_JS = gitweb.js
-endif
GITWEB_SITE_HEADER =
GITWEB_SITE_FOOTER =
FILES = gitweb.cgi
ifdef JSMIN
FILES += gitweb.min.js
+GITWEB_JS = gitweb.min.js
endif
ifdef CSSMIN
FILES += gitweb.min.css
+GITWEB_CSS = gitweb.min.css
endif
gitweb.cgi: gitweb.perl $(GITWEB_JS) $(GITWEB_CSS)