Merge branch 'master' into rorcz
[girocco.git] / Makefile
blob2dbda30948a9fcea4d2c37cdfb222e3eb2576ba4
1 # The target 'all' will do some theoretical pre-processing. The target
2 # 'install' will put all the bits in their place according to Girocco::Config
3 # (see INSTALL for details). Set GIROCCO_CONFIG to a different value in order
4 # to install according to custom config.
6 # NOTE: Requires GNU make because Git requires GNU make and we build gitweb.cgi
8 all::
10 # This should give a reasonable hint that GNU make is required in non-GNU make
11 .error GNU_make_is_required:
13 # This should be fatal in non-GNU make
14 export MAKE
16 bindir:=$(shell . ./shlib.sh && test -n "$$cfg_git_bin" && echo $$(dirname "$$cfg_git_bin"))
17 ifeq ($(bindir),)
18 $(error $$Girocco::Config::git_bin is not set)
19 endif
21 all:: apache.conf
22 @"$(MAKE)" -C git.git --no-print-directory --quiet NO_SUBDIR=: bindir="$(bindir)" gitweb
23 @"$(MAKE)" -C src --no-print-directory --quiet
24 @if [ "$$LOGNAME" = root -a -n "$$SUDO_USER" -a "$$SUDO_USER" != root ]; then \
25 find apache.conf src git.git/gitweb -user root -print0 2>/dev/null | \
26 xargs $$(: | xargs echo -r) -0 chown "$$SUDO_USER:$$(id -gn "$$SUDO_USER")"; \
29 install:: all
30 @./install.sh
32 clean::
34 apache.conf: apache.conf.in
35 ./make-apache-conf.sh