diff options
author | bsiegert <bsiegert> | 2011-06-18 22:18:21 +0000 |
---|---|---|
committer | bsiegert <bsiegert> | 2011-06-18 22:18:21 +0000 |
commit | 0f36d34de09c25138719073eb504be9ac4b311c0 (patch) | |
tree | 769d4e0a27ece69bedba4669a48ed22aafc37781 /devel | |
parent | 29d1e429d4c3461a0569766f1a6b08983e5ca86f (diff) | |
download | pkgsrc-0f36d34de09c25138719073eb504be9ac4b311c0.tar.gz |
Import bmake-20110606. Many changes, among them:
- unit-tests/modts now works on MirBSD
- meta mode
- ApplyModifiers: when we parse a variable which is not the entire modifier
string, or not followed by ':', do not consider it as containing modifiers.
- when long modifiers fail to match, check sysV style.
- :hash - cheap 32bit hash of value
- :localtime, :gmtime - use value as format string for strftime.
- fix for use after free() in CondDoExists().
- boot-strap (TOOL_DIFF): aparently at least on linux distro
formats the output of 'type' differently - so eat any "()"
- correct sysV substitution handling of empty lhs and variable
- correct exists() check for dir with trailing /
- correct handling of modifiers for non-existant variables during evaluation
of conditionals.
- fix for incorrect .PARSEDIR when .OBJDIR is re-computed after makefiles
have been read.
- fix example of :? modifier in man page.
- sigcompat.c: convert to ansi so we can use higher warning levels.
- parse.c: SunOS 5.8 at least does not have MAP_FILE
- use mmap(2) if available, for reading makefiles
- to ensure unit-tests results match, need to control LC_ALL as well as LANG.
- if stale dependency is an IMPSRC, search via .PATH
- machine.sh: like os.sh, allow for uname -p producing useless drivel
- boot-strap: document configure knobs for meta and filemon.
Diffstat (limited to 'devel')
-rw-r--r-- | devel/bmake/files/unit-tests/hash | 18 | ||||
-rw-r--r-- | devel/bmake/files/unit-tests/misc | 16 | ||||
-rw-r--r-- | devel/bmake/files/unit-tests/modmisc | 7 | ||||
-rw-r--r-- | devel/bmake/files/unit-tests/modts | 27 | ||||
-rw-r--r-- | devel/bmake/files/unit-tests/sysv | 26 |
5 files changed, 84 insertions, 10 deletions
diff --git a/devel/bmake/files/unit-tests/hash b/devel/bmake/files/unit-tests/hash new file mode 100644 index 00000000000..1ed84e776d0 --- /dev/null +++ b/devel/bmake/files/unit-tests/hash @@ -0,0 +1,18 @@ +STR1= +STR2= a +STR3= ab +STR4= abc +STR5= abcd +STR6= abcde +STR7= abcdef +STR8= abcdefghijklmnopqrstuvwxyz + +all: + @echo ${STR1:hash} + @echo ${STR2:hash} + @echo ${STR3:hash} + @echo ${STR4:hash} + @echo ${STR5:hash} + @echo ${STR6:hash} + @echo ${STR7:hash} + @echo ${STR8:hash} diff --git a/devel/bmake/files/unit-tests/misc b/devel/bmake/files/unit-tests/misc new file mode 100644 index 00000000000..43683dfba89 --- /dev/null +++ b/devel/bmake/files/unit-tests/misc @@ -0,0 +1,16 @@ +# $Id: misc,v 1.1.1.1 2011/06/18 22:18:21 bsiegert Exp $ + +.if !exists(${.CURDIR}/) +.warning ${.CURDIR}/ doesn't exist ? +.endif + +.if !exists(${.CURDIR}/.) +.warning ${.CURDIR}/. doesn't exist ? +.endif + +.if !exists(${.CURDIR}/..) +.warning ${.CURDIR}/.. doesn't exist ? +.endif + +all: + @: all is well diff --git a/devel/bmake/files/unit-tests/modmisc b/devel/bmake/files/unit-tests/modmisc index 375accca28d..1fd75acd5a2 100644 --- a/devel/bmake/files/unit-tests/modmisc +++ b/devel/bmake/files/unit-tests/modmisc @@ -1,4 +1,4 @@ -# $Id: modmisc,v 1.1.1.4 2010/04/24 20:34:05 joerg Exp $ +# $Id: modmisc,v 1.1.1.5 2011/06/18 22:18:21 bsiegert Exp $ # # miscellaneous modifier tests @@ -15,7 +15,10 @@ MOD_HOMES=S,/home/,/homes/, MOD_OPT=@d@$${exists($$d):?$$d:$${d:S,/usr,/opt,}}@ MOD_SEP=S,:, ,g -all: modvar modvarloop +all: modvar modvarloop modsysv + +modsysv: + @echo "The answer is ${libfoo.a:L:libfoo.a=42}" modvar: @echo "path='${path}'" diff --git a/devel/bmake/files/unit-tests/modts b/devel/bmake/files/unit-tests/modts index d0efd6d19c0..616bd8944f2 100644 --- a/devel/bmake/files/unit-tests/modts +++ b/devel/bmake/files/unit-tests/modts @@ -9,6 +9,17 @@ B.aaa= Baaa all: mod-ts +# Use print or printf iff they are builtin. +# XXX note that this causes problems, when make decides +# there is no need to use a shell, so avoid where possible. +.if ${type print 2> /dev/null || echo:L:sh:Mbuiltin} != "" +PRINT= print -r -- +.elif ${type printf 2> /dev/null || echo:L:sh:Mbuiltin} != "" +PRINT= printf '%s\n' +.else +PRINT= echo +.endif + mod-ts: @echo 'LIST="${LIST}"' @echo 'LIST:ts,="${LIST:ts,}"' @@ -22,11 +33,11 @@ mod-ts: @echo 'LIST:S/two/2/:ts="${LIST:S/two/2/:ts}"' @echo 'LIST:ts/:S/two/2/="${LIST:ts/:S/two/2/}"' @echo "Pretend the '/' in '/n' etc. below are back-slashes." - @echo 'LIST:ts/n="${LIST:ts\n}"' - @echo 'LIST:ts/t="${LIST:ts\t}"' - @echo 'LIST:ts/012:tu="${LIST:ts\012:tu}"' - @echo 'LIST:tx="${LIST:tx}"' - @echo 'LIST:ts/x:tu="${LIST:ts\x:tu}"' - @echo 'FU_$@="${FU_${@:ts}:ts}"' - @echo 'FU_$@:ts:T="${FU_${@:ts}:ts:T}" == cool?' - @echo 'B.$${AAA:ts}="${B.${AAA:ts}}" == Baaa?' + @${PRINT} 'LIST:ts/n="${LIST:ts\n}"' + @${PRINT} 'LIST:ts/t="${LIST:ts\t}"' + @${PRINT} 'LIST:ts/012:tu="${LIST:ts\012:tu}"' + @${PRINT} 'LIST:tx="${LIST:tx}"' + @${PRINT} 'LIST:ts/x:tu="${LIST:ts\x:tu}"' + @${PRINT} 'FU_$@="${FU_${@:ts}:ts}"' + @${PRINT} 'FU_$@:ts:T="${FU_${@:ts}:ts:T}" == cool?' + @${PRINT} 'B.$${AAA:ts}="${B.${AAA:ts}}" == Baaa?' diff --git a/devel/bmake/files/unit-tests/sysv b/devel/bmake/files/unit-tests/sysv new file mode 100644 index 00000000000..76fbdc083bd --- /dev/null +++ b/devel/bmake/files/unit-tests/sysv @@ -0,0 +1,26 @@ +# $Id: sysv,v 1.1.1.1 2011/06/18 22:18:21 bsiegert Exp $ + +FOO ?= +FOOBAR = $(FOO:=bar) + +_this := ${.PARSEDIR}/${.PARSEFILE} + +B = /b +S = / +FUN = ${B}${S}fun +SUN = the Sun + +# we expect nothing when FOO is empty +all: foo fun + +foo: + @echo FOOBAR = $(FOOBAR) +.if empty(FOO) + @FOO="foo fu" ${.MAKE} -f ${_this} foo +.endif + +fun: + @echo ${FUN:T} + @echo ${FUN:${B}${S}fun=fun} + @echo ${FUN:${B}${S}%=%} + @echo ${In:L:%=% ${SUN}} |