freebsd-src/unit-tests/meta-cmd-cmp.exp
Simon J. Gerraty cdde9e894d Import bmake-20220204
Features of interest:

Allow setting target local variables (similar to gmake)

In META_MODE .MAKE.META.CMP_FILTER can be used for filtering commands
before comparion.

contrib/bmake/mk/cc-wrap.mk is an example of using these

See ChangeLog for the gory details.
2022-02-05 12:03:50 -08:00

54 lines
1.6 KiB
Plaintext

one:
Building .meta-cmd-cmp.cmp
Building .meta-cmd-cmp.nocmp
Building .meta-cmd-cmp.cmp2
This line not compared FLAGS=
Skipping meta for .END: .SPECIAL
two:
`.meta-cmd-cmp.cmp' is up to date.
`.meta-cmd-cmp.nocmp' is up to date.
.meta-cmd-cmp.cmp2.meta: 3: cannot compare command using .OODATE
`.meta-cmd-cmp.cmp2' is up to date.
Skipping meta for .END: .SPECIAL
change1:
.meta-cmd-cmp.cmp.meta: 2: a build command has changed
@echo FLAGS= > .meta-cmd-cmp.cmp
vs
@echo FLAGS=changed > .meta-cmd-cmp.cmp
Building .meta-cmd-cmp.cmp
`.meta-cmd-cmp.nocmp' is up to date.
.meta-cmd-cmp.cmp2.meta: 3: cannot compare command using .OODATE
`.meta-cmd-cmp.cmp2' is up to date.
Skipping meta for .END: .SPECIAL
change2:
.meta-cmd-cmp.cmp.meta: 2: a build command has changed
@echo FLAGS=changed > .meta-cmd-cmp.cmp
vs
@echo FLAGS= > .meta-cmd-cmp.cmp
Building .meta-cmd-cmp.cmp
`.meta-cmd-cmp.nocmp' is up to date.
.meta-cmd-cmp.cmp2.meta: 2: a build command has changed
@echo FLAGS2= > .meta-cmd-cmp.cmp2
vs
@echo FLAGS2=changed > .meta-cmd-cmp.cmp2
Building .meta-cmd-cmp.cmp2
This line not compared FLAGS=
Skipping meta for .END: .SPECIAL
filter0:
Building .meta-cmd-cmp.filter
Skipping meta for .END: .SPECIAL
filter1:
.meta-cmd-cmp.filter.meta: 2: a build command has changed
@echo ccache cc -c foo.c > .meta-cmd-cmp.filter
vs
@echo cc -c foo.c > .meta-cmd-cmp.filter
Building .meta-cmd-cmp.filter
Skipping meta for .END: .SPECIAL
filter2:
`.meta-cmd-cmp.filter' is up to date.
Skipping meta for .END: .SPECIAL
filter3:
`.meta-cmd-cmp.filter' is up to date.
Skipping meta for .END: .SPECIAL
exit status 0