Fix build on gmake 3.82. Closes issue #216.

This commit is contained in:
Kris Maglione 2010-08-29 08:53:15 -04:00
parent 675f117026
commit 83e5716fc8
3 changed files with 14 additions and 22 deletions

View File

@ -22,11 +22,6 @@ FILTER = cat
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 @@ CTAGS=ctags
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

View File

@ -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

View File

@ -4,8 +4,9 @@ VERS = $$(test -n "$$WMII_HGVERSION" && echo $$WMII_HGVERSION || \
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