diff --git a/Makefile b/Makefile index 6f4b8aae..6f5e1d89 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/config.mk b/config.mk index 47f3ac8f..e209e4d1 100644 --- a/config.mk +++ b/config.mk @@ -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 diff --git a/rc/rc.wmii b/rc/rc.wmii index d9261c4c..d9539289 100755 --- a/rc/rc.wmii +++ b/rc/rc.wmii @@ -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