diff --git a/mk/dir.mk b/mk/dir.mk index 1800d25c..3344bf84 100644 --- a/mk/dir.mk +++ b/mk/dir.mk @@ -2,6 +2,7 @@ MKSUBDIR = \ set -e; \ targ=$@; targ=$${targ\#d}; \ for i in $$dirs; do \ + export $(SUBMAKE_EXPORT); \ export BASE=$(BASE)$$i/; \ if [ ! -d $$i ]; then \ echo Skipping nonexistent directory: $$i 1>&2; \ diff --git a/mk/hdr.mk b/mk/hdr.mk index ef1e2d4a..5d551de4 100644 --- a/mk/hdr.mk +++ b/mk/hdr.mk @@ -1,3 +1,23 @@ +DIR = +DIRS = +DOC = +DOCDIR = +DOCS = +EXECS = +HFILES = +INCLUDES = +LIB = +LIBS = +OBJ = +OFILES = +OFILES_PIC = +PACKAGES = +PROG = +SO = +TAGFILES = +TARG = +TEXT = + FILTER = cat EXCFLAGS = $(INCLUDES) -D_XOPEN_SOURCE=600 diff --git a/mk/wmii.mk b/mk/wmii.mk index 2452178b..d0e35841 100644 --- a/mk/wmii.mk +++ b/mk/wmii.mk @@ -1,11 +1,18 @@ + VERS = hg$$(hg identify -n) -VERS = hg$$(hg log -r $$(hg id 2>/dev/null | awk -F'[+ ]' '{print $$1}') --template '{rev}' 2>/dev/null) -VERSION = $(VERS) -VERSION := $(shell echo $(VERS)) -VERSION != echo $(VERS) +VERS = $$(test -n "$$WMII_HGVERSION" && echo $$WMII_HGVERSION || \ + echo hg$$(hg log -r $$(hg id 2>/dev/null | awk -F'[+ ]' '{print $$1}') --template '{rev}' 2>/dev/null)) + +WMII_HGVERSION = $(VERS) +WMII_HGVERSION := $(shell echo $(VERS)) +WMII_HGVERSION != echo $(VERS) +VERSION = $(WMII_HGVERSION) CONFVERSION = -hg COPYRIGHT = ©2009 Kris Maglione +.MAKE.EXPORTED += WMII_HGVERSION +SUBMAKE_EXPORT = WMII_HGVERSION=$(WMII_HGVERSION) + LIBS9 = $(ROOT)/lib/libregexp9.a $(ROOT)/lib/libbio.a $(ROOT)/lib/libfmt.a $(ROOT)/lib/libutf.a CFLAGS += '-DVERSION=\"$(VERSION)\"' '-DCOPYRIGHT=\"$(COPYRIGHT)\"' \