Greatly speed up recursive make from hg.

This commit is contained in:
Kris Maglione 2009-10-26 16:35:43 -04:00
parent 9db3ef8f54
commit 2cc597a308
3 changed files with 32 additions and 4 deletions

View File

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

View File

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

View File

@ -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)\"' \