tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bmake .OODATE confusion
With "mktool fetch" I am using different semantics for the do-fetch
target. The target still depends on all distfiles, but instead of each
distfile target being a separate script that performs the download, I
download all of the targets in the do-fetch target to significantly
improve performance with parallel downloads.
This has the drawback of always running mktool, regardless of whether
the dependency targets exist or not. I'd like for do-fetch to not
execute its commands if all of the dependencies are up-to-date.
While trying to find a solution for this, I came across .OODATE. The
documentation states:
"The list of sources for this target that were deemed out-of-date.."
This seems like it would be a possible workaround, i.e. only run mktool
if "${.OODATE}" != "" or whatever.
However, unless I am misunderstanding this description, it doesn't
appear to work as I would expect. Given this simple Makefile:
all: depfile
@echo OODATE=${.OODATE}
@echo ALLSRC=${.ALLSRC}
depfile:
@echo Creating ${.TARGET}
@>${.TARGET}
I would assume the first run will create depfile and OODATE and ALLSRC
to be identical, and then the second run OODATE will be empty (because
"depfile" is up-to-date) and ALLSRC will continue to list "depfile".
However:
$ bmake -V MAKE_VERSION
20240711
$ bmake
Creating depfile
OODATE=depfile
ALLSRC=depfile
$ bmake
OODATE=depfile
ALLSRC=depfile
Am I misunderstanding the documentation, should the documentation be
improved to avoid this misunderstanding, or is this a bug?
--
Jonathan Perkin - mnx.io - pkgsrc.smartos.org
Open Source Complete Cloud www.tritondatacenter.com
Home |
Main Index |
Thread Index |
Old Index