Skip to content

Commit 7c1b228

Browse files
committed
Merge branch 'jn/gitweb-plackup'
* jn/gitweb-plackup: git-instaweb: Add support for running gitweb via 'plackup' git-instaweb: Wait for server to start before running web browser git-instaweb: Remove pidfile after stopping web server git-instaweb: Configure it to work with new gitweb structure git-instaweb: Put httpd logs in a "$httpd_only" subdirectory gitweb: Set default destination directory for installing gitweb in Makefile gitweb: Move static files into seperate subdirectory
2 parents bcacc0e + 7864698 commit 7c1b228

File tree

11 files changed

+257
-105
lines changed

11 files changed

+257
-105
lines changed

Documentation/git-instaweb.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ OPTIONS
2929
The HTTP daemon command-line that will be executed.
3030
Command-line options may be specified here, and the
3131
configuration file will be added at the end of the command-line.
32-
Currently apache2, lighttpd, mongoose and webrick are supported.
32+
Currently apache2, lighttpd, mongoose, plackup and webrick are supported.
3333
(Default: lighttpd)
3434

3535
-m::

Makefile

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ mandir = share/man
272272
infodir = share/info
273273
gitexecdir = libexec/git-core
274274
sharedir = $(prefix)/share
275+
gitwebdir = $(sharedir)/gitweb
275276
template_dir = share/git-core/templates
276277
htmldir = share/doc/git-doc
277278
ifeq ($(prefix),/usr)
@@ -1444,6 +1445,7 @@ gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
14441445
template_dir_SQ = $(subst ','\'',$(template_dir))
14451446
htmldir_SQ = $(subst ','\'',$(htmldir))
14461447
prefix_SQ = $(subst ','\'',$(prefix))
1448+
gitwebdir_SQ = $(subst ','\'',$(gitwebdir))
14471449

14481450
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
14491451
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
@@ -1580,45 +1582,38 @@ gitweb:
15801582
$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all
15811583

15821584
ifdef JSMIN
1583-
GITWEB_PROGRAMS += gitweb/gitweb.min.js
1584-
GITWEB_JS = gitweb/gitweb.min.js
1585+
GITWEB_PROGRAMS += gitweb/static/gitweb.min.js
1586+
GITWEB_JS = gitweb/static/gitweb.min.js
15851587
else
1586-
GITWEB_JS = gitweb/gitweb.js
1588+
GITWEB_JS = gitweb/static/gitweb.js
15871589
endif
15881590
ifdef CSSMIN
1589-
GITWEB_PROGRAMS += gitweb/gitweb.min.css
1590-
GITWEB_CSS = gitweb/gitweb.min.css
1591+
GITWEB_PROGRAMS += gitweb/static/gitweb.min.css
1592+
GITWEB_CSS = gitweb/static/gitweb.min.css
15911593
else
1592-
GITWEB_CSS = gitweb/gitweb.css
1594+
GITWEB_CSS = gitweb/static/gitweb.css
15931595
endif
15941596
OTHER_PROGRAMS += gitweb/gitweb.cgi $(GITWEB_PROGRAMS)
15951597
gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS)
15961598
$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
15971599

15981600
ifdef JSMIN
1599-
gitweb/gitweb.min.js: gitweb/gitweb.js
1601+
gitweb/static/gitweb.min.js: gitweb/static/gitweb.js
16001602
$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
16011603
endif # JSMIN
16021604
ifdef CSSMIN
1603-
gitweb/gitweb.min.css: gitweb/gitweb.css
1605+
gitweb/static/gitweb.min.css: gitweb/static/gitweb.css
16041606
$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
16051607
endif # CSSMIN
16061608

16071609

1608-
git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css gitweb/gitweb.js
1610+
git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js
16091611
$(QUIET_GEN)$(RM) $@ $@+ && \
16101612
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
16111613
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
16121614
-e 's/@@NO_CURL@@/$(NO_CURL)/g' \
1613-
-e '/@@GITWEB_CGI@@/r gitweb/gitweb.cgi' \
1614-
-e '/@@GITWEB_CGI@@/d' \
1615-
-e '/@@GITWEB_CSS@@/r $(GITWEB_CSS)' \
1616-
-e '/@@GITWEB_CSS@@/d' \
1617-
-e '/@@GITWEB_JS@@/r $(GITWEB_JS)' \
1618-
-e '/@@GITWEB_JS@@/d' \
1615+
-e 's|@@GITWEBDIR@@|$(gitwebdir_SQ)|g' \
16191616
-e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
1620-
-e 's|@@GITWEB_CSS_NAME@@|$(GITWEB_CSS)|' \
1621-
-e 's|@@GITWEB_JS_NAME@@|$(GITWEB_JS)|' \
16221617
$@.sh > $@+ && \
16231618
chmod +x $@+ && \
16241619
mv $@+ $@
@@ -1988,6 +1983,7 @@ install: all
19881983
$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
19891984
ifndef NO_PERL
19901985
$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
1986+
$(MAKE) -C gitweb gitwebdir=$(gitwebdir_SQ) install
19911987
endif
19921988
ifndef NO_PYTHON
19931989
$(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install

0 commit comments

Comments
 (0)