From: Junio C Hamano Date: Wed, 3 Feb 2010 05:48:22 +0000 (-0800) Subject: Merge branch 'jh/gitweb-caching' (early part) X-Git-Tag: v1.7.0-rc2~22 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/484e669aa772a3f6386d0f03f7c75af603801813?ds=inline;hp=-c Merge branch 'jh/gitweb-caching' (early part) * 'jh/gitweb-caching' (early part): gitweb: Add optional extra parameter to die_error, for extended explanation gitweb: add a "string" variant of print_sort_th gitweb: add a "string" variant of print_local_time gitweb: Check that $site_header etc. are defined before using them gitweb: Makefile improvements gitweb: Load checking gitweb: Make running t9501 test with '--debug' reliable and usable --- 484e669aa772a3f6386d0f03f7c75af603801813 diff --combined Makefile index 83383c38f1,eb0fffb379..7bf2fca407 --- a/Makefile +++ b/Makefile @@@ -180,6 -180,9 +180,6 @@@ all: # If not set it defaults to the bare 'wish'. If it is set to the empty # string then NO_TCLTK will be forced (this is used by configure script). # -# Define THREADED_DELTA_SEARCH if you have pthreads and wish to exploit -# parallel delta searching when packing objects. -# # Define INTERNAL_QSORT to use Git's implementation of qsort(), which # is a simplified version of the merge sort used in glibc. This is # recommended if Git triggers O(n^2) behavior in your platform's qsort(). @@@ -275,29 -278,6 +275,6 @@@ pathsep = # JavaScript minifier invocation that can function as filter JSMIN = - # default configuration for gitweb - GITWEB_CONFIG = gitweb_config.perl - GITWEB_CONFIG_SYSTEM = /etc/gitweb.conf - GITWEB_HOME_LINK_STR = projects - GITWEB_SITENAME = - GITWEB_PROJECTROOT = /pub/git - GITWEB_PROJECT_MAXDEPTH = 2007 - GITWEB_EXPORT_OK = - GITWEB_STRICT_EXPORT = - GITWEB_BASE_URL = - GITWEB_LIST = - GITWEB_HOMETEXT = indextext.html - GITWEB_CSS = gitweb.css - 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 = - export prefix bindir sharedir sysconfdir CC = gcc @@@ -719,10 -699,12 +696,10 @@@ EXTLIBS ifeq ($(uname_S),Linux) NO_STRLCPY = YesPlease NO_MKSTEMPS = YesPlease - THREADED_DELTA_SEARCH = YesPlease endif ifeq ($(uname_S),GNU/kFreeBSD) NO_STRLCPY = YesPlease NO_MKSTEMPS = YesPlease - THREADED_DELTA_SEARCH = YesPlease endif ifeq ($(uname_S),UnixWare) CC = cc @@@ -776,6 -758,7 +753,6 @@@ ifeq ($(uname_S),Darwin NO_STRLCPY = YesPlease endif NO_MEMMEM = YesPlease - THREADED_DELTA_SEARCH = YesPlease USE_ST_TIMESPEC = YesPlease endif ifeq ($(uname_S),SunOS) @@@ -788,6 -771,7 +765,6 @@@ NO_MKDTEMP = YesPlease NO_MKSTEMPS = YesPlease NO_REGEX = YesPlease - THREADED_DELTA_SEARCH = YesPlease ifeq ($(uname_R),5.7) NEEDS_RESOLV = YesPlease NO_IPV6 = YesPlease @@@ -843,6 -827,7 +820,6 @@@ ifeq ($(uname_S),FreeBSD BASIC_LDFLAGS += -L/usr/local/lib DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease USE_ST_TIMESPEC = YesPlease - THREADED_DELTA_SEARCH = YesPlease ifeq ($(shell expr "$(uname_R)" : '4\.'),2) PTHREAD_LIBS = -pthread NO_UINTMAX_T = YesPlease @@@ -856,6 -841,7 +833,6 @@@ ifeq ($(uname_S),OpenBSD NEEDS_LIBICONV = YesPlease BASIC_CFLAGS += -I/usr/local/include BASIC_LDFLAGS += -L/usr/local/lib - THREADED_DELTA_SEARCH = YesPlease endif ifeq ($(uname_S),NetBSD) ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2) @@@ -863,6 -849,7 +840,6 @@@ endif BASIC_CFLAGS += -I/usr/pkg/include BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib - THREADED_DELTA_SEARCH = YesPlease USE_ST_TIMESPEC = YesPlease NO_MKSTEMPS = YesPlease endif @@@ -877,7 -864,9 +854,7 @@@ ifeq ($(uname_S),AIX INTERNAL_QSORT = UnfortunatelyYes NEEDS_LIBICONV=YesPlease BASIC_CFLAGS += -D_LARGE_FILES - ifneq ($(shell expr "$(uname_V)" : '[1234]'),1) - THREADED_DELTA_SEARCH = YesPlease - else + ifeq ($(shell expr "$(uname_V)" : '[1234]'),1) NO_PTHREADS = YesPlease endif endif @@@ -903,6 -892,7 +880,6 @@@ ifeq ($(uname_S),IRIX SNPRINTF_RETURNS_BOGUS = YesPlease SHELL_PATH = /usr/gnu/bin/bash NEEDS_LIBGEN = YesPlease - THREADED_DELTA_SEARCH = YesPlease endif ifeq ($(uname_S),IRIX64) NO_SETENV=YesPlease @@@ -921,6 -911,7 +898,6 @@@ SNPRINTF_RETURNS_BOGUS = YesPlease SHELL_PATH=/usr/gnu/bin/bash NEEDS_LIBGEN = YesPlease - THREADED_DELTA_SEARCH = YesPlease endif ifeq ($(uname_S),HP-UX) NO_IPV6=YesPlease @@@ -970,6 -961,7 +947,6 @@@ ifeq ($(uname_S),Windows NO_CURL = YesPlease NO_PYTHON = YesPlease BLK_SHA1 = YesPlease - THREADED_DELTA_SEARCH = YesPlease CC = compat/vcbuild/scripts/clink.pl AR = compat/vcbuild/scripts/lib.pl @@@ -1021,6 -1013,7 +998,6 @@@ ifneq (,$(findstring MINGW,$(uname_S)) NO_REGEX = YesPlease NO_PYTHON = YesPlease BLK_SHA1 = YesPlease - THREADED_DELTA_SEARCH = YesPlease COMPAT_CFLAGS += -D__USE_MINGW_ACCESS -DNOGDI -Icompat -Icompat/fnmatch -Icompat/win32 COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\" COMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \ @@@ -1318,12 -1311,16 +1295,12 @@@ ifdef RUNTIME_PREFI endif ifdef NO_PTHREADS - THREADED_DELTA_SEARCH = BASIC_CFLAGS += -DNO_PTHREADS else EXTLIBS += $(PTHREAD_LIBS) -endif - -ifdef THREADED_DELTA_SEARCH - BASIC_CFLAGS += -DTHREADED_DELTA_SEARCH LIB_OBJS += thread-utils.o endif + ifdef DIR_HAS_BSD_GROUP_SEMANTICS COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS endif @@@ -1518,6 -1515,11 +1495,11 @@@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % chmod +x $@+ && \ mv $@+ $@ + + .PHONY: gitweb + gitweb: + $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all + ifdef JSMIN OTHER_PROGRAMS += gitweb/gitweb.cgi gitweb/gitweb.min.js gitweb/gitweb.cgi: gitweb/gitweb.perl gitweb/gitweb.min.js @@@ -1525,30 -1527,13 +1507,13 @@@ els OTHER_PROGRAMS += gitweb/gitweb.cgi gitweb/gitweb.cgi: gitweb/gitweb.perl endif - $(QUIET_GEN)$(RM) $@ $@+ && \ - sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \ - -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \ - -e 's|++GIT_BINDIR++|$(bindir)|g' \ - -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \ - -e 's|++GITWEB_CONFIG_SYSTEM++|$(GITWEB_CONFIG_SYSTEM)|g' \ - -e 's|++GITWEB_HOME_LINK_STR++|$(GITWEB_HOME_LINK_STR)|g' \ - -e 's|++GITWEB_SITENAME++|$(GITWEB_SITENAME)|g' \ - -e 's|++GITWEB_PROJECTROOT++|$(GITWEB_PROJECTROOT)|g' \ - -e 's|"++GITWEB_PROJECT_MAXDEPTH++"|$(GITWEB_PROJECT_MAXDEPTH)|g' \ - -e 's|++GITWEB_EXPORT_OK++|$(GITWEB_EXPORT_OK)|g' \ - -e 's|++GITWEB_STRICT_EXPORT++|$(GITWEB_STRICT_EXPORT)|g' \ - -e 's|++GITWEB_BASE_URL++|$(GITWEB_BASE_URL)|g' \ - -e 's|++GITWEB_LIST++|$(GITWEB_LIST)|g' \ - -e 's|++GITWEB_HOMETEXT++|$(GITWEB_HOMETEXT)|g' \ - -e 's|++GITWEB_CSS++|$(GITWEB_CSS)|g' \ - -e 's|++GITWEB_LOGO++|$(GITWEB_LOGO)|g' \ - -e 's|++GITWEB_FAVICON++|$(GITWEB_FAVICON)|g' \ - -e 's|++GITWEB_JS++|$(GITWEB_JS)|g' \ - -e 's|++GITWEB_SITE_HEADER++|$(GITWEB_SITE_HEADER)|g' \ - -e 's|++GITWEB_SITE_FOOTER++|$(GITWEB_SITE_FOOTER)|g' \ - $< >$@+ && \ - chmod +x $@+ && \ - mv $@+ $@ + $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) + + ifdef JSMIN + gitweb/gitweb.min.js: gitweb/gitweb.js + $(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@) + endif # JSMIN + git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js $(QUIET_GEN)$(RM) $@ $@+ && \ @@@ -1575,12 -1560,6 +1540,6 @@@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git mv $@+ $@ endif # NO_PERL - - ifdef JSMIN - gitweb/gitweb.min.js: gitweb/gitweb.js - $(QUIET_GEN)$(JSMIN) <$< >$@ - endif # JSMIN - ifndef NO_PYTHON $(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py