libexec
-logs/error_log
-logs/jasmine-dev
-logs/mkws-jasmine-access.log
-logs/mkws-jasmine-error.log
-logs/mkws-jasmine-rewrite.log
-logs/mkws-jasmine.pid
+logs/error-*\.log
+logs/jasmine-dev-*\.conf
+logs/mkws-jasmine-*\.log
node_modules
PERL_SCRIPTS= bin/bomb.pl
TMP_DIR= ./logs
APACHE_HTTPD:= $(shell env PATH=$$PATH:/usr/sbin which apache2 httpd false | head -1 )
+APACHE_PORT ?= 4040
all: check
distclean: clean clean-tmp clean-error
rm -rf node_modules
- rm -f ${TMP_DIR}/jasmine-dev
+ rm -f ${TMP_DIR}/jasmine-dev*.conf
rm -f libexec
make -C./widgets $@
apache-start:
bin/apache-template-update
- ${APACHE_HTTPD} -f `pwd`/${TMP_DIR}/jasmine-dev
+ ${APACHE_HTTPD} -f `pwd`/${TMP_DIR}/jasmine-dev-${APACHE_PORT}.conf
+APACHE_PID_FILE=${TMP_DIR}/mkws-jasmine-${APACHE_PORT}.pid
apache-stop:
- @-if [ -e ${TMP_DIR}/mkws-jasmine.pid ]; then \
- kill `cat ${TMP_DIR}/mkws-jasmine.pid`; \
+ @-if [ -e ${APACHE_PID_FILE} ]; then \
+ kill `cat ${APACHE_PID_FILE}`; \
else \
killall apache2 2> /dev/null; \
fi
@sleep 0.6
- rm -f ${TMP_DIR}/mkws-jasmine.pid
+ rm -f ${APACHE_PID_FILE}
help:
@echo "make [ all | check | clean | distclean ]"
export APACHE_RUN_USER=$(whoami)
export APACHE_RUN_GROUP=$(groups | awk '{ print $1 }')
-export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
-export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine.pid
-export APACHE_LOCK_FILE=$APACHE_LOG_DIR/accept.lock
: ${APACHE_PORT=4040}; export APACHE_PORT
+export APACHE_LOG_DIR=$APACHE_SERVER_ROOT/logs
+export APACHE_PID_FILE=$APACHE_LOG_DIR/mkws-jasmine-${APACHE_PORT}.pid
+export APACHE_LOCK_FILE=$APACHE_LOG_DIR/accept-${APACHE_PORT}.lock
+
export MKWS_ROOT=$(pwd)/..
MKWS_OS=debian
APACHE_MODULES="$MKWS_ROOT/tools/apache2/jasmine-dev.apache-modules.$MKWS_OS.conf"
fi
-: ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev"}
+: ${MKWS_APACHE_FILE="$APACHE_LOG_DIR/jasmine-dev-${APACHE_PORT}.conf"}
export APACHE_MODULES
perl -npe 's,\${(.*?)},$ENV{$1},g; ' $MKWS_APACHE_TEMPLATE > $MKWS_APACHE_FILE.tmp
Group ${APACHE_RUN_GROUP}
PidFile ${APACHE_PID_FILE}
LockFile ${APACHE_LOCK_FILE}
+ErrorLog ${APACHE_LOG_DIR}/error-${APACHE_PORT}.log
ServerName localhost
ServerRoot ${APACHE_SERVER_ROOT}
ServerAlias mkws-dev a.mkws.indexdata.com a.mkws-dev.indexdata.com mkws-dev.indexdata.com 127.0.0.1
ServerAdmin webmaster@indexdata.com
- ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error.log
- CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access.log combined
+ ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error-${APACHE_PORT}.log
+ CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access-${APACHE_PORT}.log combined
RewriteEngine on
RewriteLogLevel 1
- RewriteLog ${APACHE_LOG_DIR}/mkws-jasmine-rewrite.log
+ RewriteLog ${APACHE_LOG_DIR}/mkws-jasmine-rewrite-${APACHE_PORT}.log
DocumentRoot ${MKWS_ROOT}/examples/htdocs
Alias /tools/htdocs ${MKWS_ROOT}/tools/htdocs
Group ${APACHE_RUN_GROUP}
PidFile ${APACHE_PID_FILE}
Mutex file:${APACHE_LOG_DIR}
+ErrorLog ${APACHE_LOG_DIR}/error-${APACHE_PORT}.log
ServerName localhost
ServerRoot ${APACHE_SERVER_ROOT}
ServerAlias mkws-dev a.mkws.indexdata.com a.mkws-dev.indexdata.com mkws-dev.indexdata.com 127.0.0.1
ServerAdmin webmaster@indexdata.com
- ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error.log
- CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access.log combined
+ ErrorLog ${APACHE_LOG_DIR}/mkws-jasmine-error-${APACHE_PORT}.log
+ CustomLog ${APACHE_LOG_DIR}/mkws-jasmine-access-${APACHE_PORT}.log combined
LogLevel info rewrite:debug
RewriteEngine on