Added PLAN9BASE config.mk knob that evaluates to $PLAN9 or /usr/local/plan9 if unset.

This commit is contained in:
Kris Maglione 2007-03-02 17:11:09 -05:00
parent c4b8c42b4c
commit 4ecc7f5ea6
3 changed files with 16 additions and 7 deletions

View File

@ -44,7 +44,7 @@ wmii9menu: 9menu.o
clean:
@echo cleaning
@rm -f ${BIN} ${OBJ} wmii-${VERSION}.tar.gz
@rm -f ${BIN} ${OBJ} 9menu.o wmii-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@ -61,7 +61,9 @@ install: all
@for i in ${SCRIPTS}; do \
sed "s|CONFPREFIX|${CONFPREFIX}|g; \
s|CONFVERSION|${CONFVERSION}|g; \
s|AWKPATH|${AWKPATH}|g" < $$i >${DESTDIR}${PREFIX}/bin/$$i; \
s|AWKPATH|${AWKPATH}|g" \
$$i \
>${DESTDIR}${PREFIX}/bin/$$i; \
chmod 755 ${DESTDIR}${PREFIX}/bin/$$i; \
done
@for i in ${BIN}; do\
@ -71,13 +73,19 @@ install: all
@echo installing scripts to ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
@mkdir -p -m 0755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}
@cd rc; for i in *; do \
sed 's|CONFPREFIX|${CONFPREFIX}|g' <$$i >${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
sed "s|CONFPREFIX|${CONFPREFIX}|g; \
s|PLAN9BASE|${PLAN9BASE}|g" \
$$i \
>${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
chmod 755 ${DESTDIR}${CONFPREFIX}/wmii-${CONFVERSION}/$$i; \
done
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p -m 0755 ${DESTDIR}${MANPREFIX}/man1
@for i in ${MAN1:=.1}; do \
sed "s/VERSION/${VERSION}/g; s|CONFPREFIX|${CONFPREFIX}|g" < $$i > ${DESTDIR}${MANPREFIX}/man1/$$i; \
sed "s/VERSION/${VERSION}/g; \
s|CONFPREFIX|${CONFPREFIX}|g" \
$$i \
>${DESTDIR}${MANPREFIX}/man1/$$i; \
chmod 644 ${DESTDIR}${MANPREFIX}/man1/$$i; \
done

View File

@ -1,5 +1,5 @@
# wmii version
VERSION = $$(hg tip --template 'hg{rev}')
VERSION = $$(hg tip --template 'hg{rev}' 2>/dev/null)
CONFVERSION = 3.5
# Customize below to fit your system
@ -9,6 +9,7 @@ PREFIX = /usr/local
CONFPREFIX = ${PREFIX}/etc
MANPREFIX = ${PREFIX}/share/man
AWKPATH = /usr/bin/awk
PLAN9BASE = $${PLAN9:-/usr/local/plan9}
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib

View File

@ -1,4 +1,4 @@
#!/usr/local/plan9/bin/rc
#!PLAN9BASE/bin/rc
# WMII Configuration
oldpath=$path
@ -226,4 +226,4 @@ wmiir read /event |
while(*=`{read}) {
event = $1; shift
Event-$event $*
}
} >[2]/dev/null