Admin/website/build/main.mak
author wenzelm
Wed, 15 Feb 2006 21:34:55 +0100
changeset 19046 bc5c6c9b114e
parent 17742 549fe09d27b1
child 19331 f5e84acd7d3f
permissions -rw-r--r--
removed distinct, renamed gen_distinct to distinct;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
16233
e634d33deb86 added new website
haftmann
parents:
diff changeset
     1
# isaweb makefile
e634d33deb86 added new website
haftmann
parents:
diff changeset
     2
# $Id$
e634d33deb86 added new website
haftmann
parents:
diff changeset
     3
e634d33deb86 added new website
haftmann
parents:
diff changeset
     4
# force shell
e634d33deb86 added new website
haftmann
parents:
diff changeset
     5
SHELL=bash
e634d33deb86 added new website
haftmann
parents:
diff changeset
     6
e634d33deb86 added new website
haftmann
parents:
diff changeset
     7
# some global variables
e634d33deb86 added new website
haftmann
parents:
diff changeset
     8
CONF=conf/localconf.mak
e634d33deb86 added new website
haftmann
parents:
diff changeset
     9
e634d33deb86 added new website
haftmann
parents:
diff changeset
    10
# configuration switch
e634d33deb86 added new website
haftmann
parents:
diff changeset
    11
ifeq ($(phase), init)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    12
e634d33deb86 added new website
haftmann
parents:
diff changeset
    13
# allocate configuration
e634d33deb86 added new website
haftmann
parents:
diff changeset
    14
init:
e634d33deb86 added new website
haftmann
parents:
diff changeset
    15
	mkdir -p conf
e634d33deb86 added new website
haftmann
parents:
diff changeset
    16
	case $$HOSTNAME in sunbroy*) ARCH=sun;; *) ARCH=at;; esac; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    17
	sed 's/# $$Id.*//g' build/localconf.$$ARCH.template.mak > $(CONF)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    18
	$$EDITOR $(CONF)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    19
	@false
e634d33deb86 added new website
haftmann
parents:
diff changeset
    20
.PHONY: init
e634d33deb86 added new website
haftmann
parents:
diff changeset
    21
e634d33deb86 added new website
haftmann
parents:
diff changeset
    22
else
e634d33deb86 added new website
haftmann
parents:
diff changeset
    23
e634d33deb86 added new website
haftmann
parents:
diff changeset
    24
# default target
16329
c045695273a3 added chmod for packages
haftmann
parents: 16323
diff changeset
    25
default: project
16233
e634d33deb86 added new website
haftmann
parents:
diff changeset
    26
e634d33deb86 added new website
haftmann
parents:
diff changeset
    27
# check configuration
e634d33deb86 added new website
haftmann
parents:
diff changeset
    28
include $(CONF)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    29
$(CONF):
e634d33deb86 added new website
haftmann
parents:
diff changeset
    30
	@if [ ! -e $(CONF) ]; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    31
	then \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    32
		echo 'Framework not configured yet; set EDITOR environment variable'; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    33
		echo 'to your favorite editor and type'; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    34
		echo; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    35
		echo '    make phase=init'; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    36
		echo; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    37
		echo 'to configure it'; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    38
		false; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    39
	else \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    40
		:; \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    41
	fi
e634d33deb86 added new website
haftmann
parents:
diff changeset
    42
e634d33deb86 added new website
haftmann
parents:
diff changeset
    43
# tidy handling
e634d33deb86 added new website
haftmann
parents:
diff changeset
    44
ifeq ($(DISABLE_TIDY),)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    45
TIDYCMD=$(TIDY) -q -i -asxhtml --output-xhtml true \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    46
                --doctype auto \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    47
                --literal-attributes true \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    48
                --wrap 0 \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    49
                --indent auto --indent-spaces 2 \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    50
                --input-encoding utf8 --output-encoding latin1 \
e634d33deb86 added new website
haftmann
parents:
diff changeset
    51
                --logical-emphasis yes --gnu-emacs yes --write-back yes
e634d33deb86 added new website
haftmann
parents:
diff changeset
    52
else
e634d33deb86 added new website
haftmann
parents:
diff changeset
    53
TIDYCMD=:
e634d33deb86 added new website
haftmann
parents:
diff changeset
    54
endif
e634d33deb86 added new website
haftmann
parents:
diff changeset
    55
e634d33deb86 added new website
haftmann
parents:
diff changeset
    56
# dependencies
e634d33deb86 added new website
haftmann
parents:
diff changeset
    57
DEP_FILE=conf/depends.mak
e634d33deb86 added new website
haftmann
parents:
diff changeset
    58
site: $(DEP_FILE) allsite
e634d33deb86 added new website
haftmann
parents:
diff changeset
    59
.PHONY: site
e634d33deb86 added new website
haftmann
parents:
diff changeset
    60
e634d33deb86 added new website
haftmann
parents:
diff changeset
    61
# import dependencies
e634d33deb86 added new website
haftmann
parents:
diff changeset
    62
include $(DEP_FILE)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    63
endif
e634d33deb86 added new website
haftmann
parents:
diff changeset
    64
e634d33deb86 added new website
haftmann
parents:
diff changeset
    65
# pypager iso-8859-1 hack
e634d33deb86 added new website
haftmann
parents:
diff changeset
    66
ifneq ($(FORCE_ISO_8859_1),)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    67
FORCE_ENC_CMD=--encodinghtml "iso-8859-1"
e634d33deb86 added new website
haftmann
parents:
diff changeset
    68
else
e634d33deb86 added new website
haftmann
parents:
diff changeset
    69
FORCE_ENC_CMD=
e634d33deb86 added new website
haftmann
parents:
diff changeset
    70
endif
e634d33deb86 added new website
haftmann
parents:
diff changeset
    71
e634d33deb86 added new website
haftmann
parents:
diff changeset
    72
# import project-specific dependencies
e634d33deb86 added new website
haftmann
parents:
diff changeset
    73
include build/project.mak
e634d33deb86 added new website
haftmann
parents:
diff changeset
    74
e634d33deb86 added new website
haftmann
parents:
diff changeset
    75
# build dependencies
e634d33deb86 added new website
haftmann
parents:
diff changeset
    76
$(DEP_FILE): $(CONF)
17742
549fe09d27b1 improved dependency build
haftmann
parents: 17671
diff changeset
    77
	build/make_dep.bash "$(FIND)" "$(OUTPUTROOT)" "$(DEP_FILE)" "$(STATICDIRS)"
16233
e634d33deb86 added new website
haftmann
parents:
diff changeset
    78
e634d33deb86 added new website
haftmann
parents:
diff changeset
    79
# build dependencies explicitly
e634d33deb86 added new website
haftmann
parents:
diff changeset
    80
depends:
e634d33deb86 added new website
haftmann
parents:
diff changeset
    81
	rm -f $(DEP_FILE)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    82
	$(MAKE) $(DEP_FILE)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    83
.PHONY: depends
e634d33deb86 added new website
haftmann
parents:
diff changeset
    84
e634d33deb86 added new website
haftmann
parents:
diff changeset
    85
# clean build files
e634d33deb86 added new website
haftmann
parents:
diff changeset
    86
clean:
e634d33deb86 added new website
haftmann
parents:
diff changeset
    87
	rm -f $(DEP_FILE)
e634d33deb86 added new website
haftmann
parents:
diff changeset
    88
.PHONY: clean