[hackers] [wmii] Fix build on gmake 3.82. Closes issue #216. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Sun, 29 Aug 2010 12:54:30 +0000 (UTC)

changeset: 2779:fb75d60585f8
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Sun Aug 29 08:53:15 2010 -0400
files: mk/hdr.mk mk/man.mk mk/wmii.mk
description:
Fix build on gmake 3.82. Closes issue #216.

diff -r b767f9a84346 -r fb75d60585f8 mk/hdr.mk
--- a/mk/hdr.mk Mon Aug 16 19:38:17 2010 -0400
+++ b/mk/hdr.mk Sun Aug 29 08:53:15 2010 -0400
@@ -22,11 +22,6 @@
 
 EXCFLAGS = $(INCLUDES) -D_XOPEN_SOURCE=600
 
-# Try to avoid bash if possible. It slows the build considerably.
-SHELL := $(shell which /bin/dash 2>/dev/null || echo /bin/sh)
-SHELL != which /bin/dash 2>/dev/null || echo /bin/sh
-.SHELL: name=sh path=$(SHELL)
-
 COMPILE_FLAGS = $(EXCFLAGS) $(CFLAGS)
 COMPILE = $(SHELL) $(ROOT)/util/compile "$(CC)" "$(PACKAGES)" "$(COMPILE_FLAGS)"
 COMPILEPIC = $(SHELL) $(ROOT)/util/compile "$(CC)" "$(PACKAGES)" "$(COMPILE_FLAGS) $(SOCFLAGS)"
@@ -43,28 +38,24 @@
 
 PACKAGES =
 
-# and this:
 # Try to find a sane shell. /bin/sh is a last resort, because it's
 # usually bash on Linux, which means it's painfully slow.
-BINSH := $(shell \
- if [ -x /bin/dash ]; then echo /bin/dash; \
- elif [ -x /bin/ksh ]; then echo /bin/ksh; \
- else echo /bin/sh; fi)
-BINSH != echo /bin/sh
+SHELLSEARCH = for sh in /bin/dash /bin/ksh /bin/sh; do \
+ if test -x $$sh; then echo $$sh; exit; fi; done
+
+BINSH:= $(shell $(SHELLSEARCH))
+BINSH!= $(SHELLSEARCH)
+SHELL := $(BINSH)
+.SHELL: name=sh path=$(SHELL)
 
 include $(ROOT)/config.mk
-
-# I hate this.
-MKCFGSH=if test -f $(ROOT)/config.local.mk; then echo $(ROOT)/config.local.mk; else echo /dev/null; fi
-MKCFG:=$(shell $(MKCFGSH))
-MKCFG!=$(MKCFGSH)
-include $(MKCFG)
+sinclude $(ROOT)/config.local.mk
+sinclude $(shell echo .)depend
 
 .SILENT:
 .SUFFIXES: .$(SOEXT) .1 .3 .awk .build .c .clean .depend .install .man1 .man3 .o .o_pic .out .pdf .py .rc .sh .uninstall
 all:
 
-MAKEFILES=.depend
 .c.depend:
         echo MKDEP $<
         $(DEBUG) eval "$(MKDEP) $(COMPILE_FLAGS)" $< | sed '1s|.*:|$(<:%.c=%.o):|' >>.depend
diff -r b767f9a84346 -r fb75d60585f8 mk/man.mk
--- a/mk/man.mk Mon Aug 16 19:38:17 2010 -0400
+++ b/mk/man.mk Sun Aug 29 08:53:15 2010 -0400
@@ -1,7 +1,7 @@
 
 targ = for k in $(MANPAGES); do echo $$k | sed 's/ .*//'; done
-TARG := $(shell $(targ))
-TARG != $(targ)
+TARG:= $(shell $(targ))
+TARG!= $(targ)
 
 all: $(TARG)
 install: $(TARG:.1=.install) $(TARG:.3=.install) maninstall
diff -r b767f9a84346 -r fb75d60585f8 mk/wmii.mk
--- a/mk/wmii.mk Mon Aug 16 19:38:17 2010 -0400
+++ b/mk/wmii.mk Sun Aug 29 08:53:15 2010 -0400
@@ -4,8 +4,9 @@
           echo -n "hg$$(hg id -n 2>/dev/null)")
 
 WMII_HGVERSION = $(VERS)
-WMII_HGVERSION := $(shell echo $(VERS))
-WMII_HGVERSION != echo $(VERS)
+WMII_HGVERSION:= $(shell echo $(VERS))
+WMII_HGVERSION!= echo $(VERS)
+
 VERSION = $(WMII_HGVERSION)
 COPYRIGHT = ©2010 Kris Maglione
 
Received on Sun Aug 29 2010 - 14:54:30 CEST

This archive was generated by hypermail 2.2.0 : Sun Aug 29 2010 - 15:00:07 CEST