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

From: Kris Maglione <jg_AT_suckless.org>
Date: Fri Mar 02 23:13:12 2007

changeset: 1984:388c11fc40ea
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Fri Mar 02 17:11:09 2007 -0500
summary: Added PLAN9BASE config.mk knob that evaluates to $PLAN9 or /usr/local/plan9 if unset.

diff -r 9b9aeaba179c -r 388c11fc40ea Makefile
--- a/Makefile Fri Mar 02 03:30:56 2007 -0500
+++ b/Makefile Fri Mar 02 17:11:09 2007 -0500
@@ -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 -r 9b9aeaba179c -r 388c11fc40ea config.mk
--- a/config.mk Fri Mar 02 03:30:56 2007 -0500
+++ b/config.mk Fri Mar 02 17:11:09 2007 -0500
@@ -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 @@ CONFPREFIX = ${PREFIX}/etc
 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 -r 9b9aeaba179c -r 388c11fc40ea rc/rc.wmii
--- a/rc/rc.wmii Fri Mar 02 03:30:56 2007 -0500
+++ b/rc/rc.wmii Fri Mar 02 17:11:09 2007 -0500
@@ -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
Received on Fri Mar 02 2007 - 23:13:12 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:56:06 UTC