-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.common
80 lines (67 loc) · 2.43 KB
/
Makefile.common
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# -*- Makefile -*-
# Include a site-local Makefile, if it exists.
# The $(wildcard) statement is to see whether it exists. Then, if it
# does, we include it.
# The user can also use 'make MAKEFILE_LOCAL=/path/to/file'.
# HERE: The directory containing this file, Makefile.common. We get
# this by taking the last word of $(MAKEFILE_LIST), the most-recently
# included Makefile, then taking its directory part.
HERE = $(dir $(lastword $(MAKEFILE_LIST)))
# If MAKEFILE_LOCAL hasn't been set, default to "Makefile.local" in
# the same directory as Makefile.common (the top directory).
MAKEFILE_LOCAL ?= $(wildcard ${HERE}Makefile.local)
ifneq "$(MAKEFILE_LOCAL)" ""
include $(MAKEFILE_LOCAL)
endif
# Installation directories: where to install the various bits and
# pieces.
INSTALL_ROOT ?= /usr/local/newsbite
INSTALL_BACKEND ?= ${INSTALL_ROOT}
INSTALL_HTDOCS ?= ${INSTALL_ROOT}
INSTALL_LIB ?= ${INSTALL_ROOT}/lib
INSTALL_LIB_REST ?= ${INSTALL_LIB}/rest
INSTALL_PLUGINS ?= ${INSTALL_ROOT}/plugins
INSTALL_HTMLPURIFY ?= ${INSTALL_ROOT}/HTMLpurify
# HT_PREFIX is like INSTALL_HTDOCS, but has to do with URLs rather
# than directories.
# If your DocumentRoot is /www/htdocs, and you install Newsbite in
# /www/htdocs/newsbite/, then usually index.html will be visible at the
# URL http://www.your.site/newsbite/index.html
# and the default value below reflects this.
#
# If you're doing something funky with your httpd config such that
# /www/htdocs/a/b/c/index.html shows up as
# http://www.your.site/d/e/f/index.html, then set
# INSTALL_ROOT = /www/htdocs/a/b/c
# HT_PREFIX = /d/e/f
HT_PREFIX ?= /$(notdir $(patsubst %/,%,${INSTALL_HTDOCS}))
# Installation options: whether to gzip various files: "yes" to
# compress, anything else to not compress.
COMPRESS_HTDOCS ?= yes
COMPRESS_CSS ?= ${COMPRESS_HTDOCS}
COMPRESS_JS ?= ${COMPRESS_HTDOCS}
# REPLACE_VARS: list of variables to replace in .in files (similar to
# autoconf). Used by SED_REPLACEMENTS, below.
REPLACE_VARS = \
INSTALL_ROOT \
INSTALL_BACKEND \
INSTALL_SKIN \
INSTALL_LIB \
INSTALL_PLUGINS \
INSTALL_HTMLPURIFY \
HT_PREFIX
# SED_REPLACEMENTS: Generates a sed script to replace "@VAR@" with the
# value of ${VAR}. Used by various Makefiles to generate "somefile" from
# "somefile.in".
SED_REPLACEMENTS = $(foreach i, ${REPLACE_VARS}, -e 's|@${i}@|${$i}|g')
# Commands
GZIP ?= gzip
PHP ?= php
EGREP ?= egrep
TAR ?= tar
CPP ?= cpp
MAKEDEPEND ?= cpp -M
all::
clean::
rm -f *~ *.bak
depend::