tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rfc: fix make distinfo/makesum/mirror-distfiles for conditional distfiles
On Fri, Mar 06, 2015 at 04:52:08PM +0100, Tobias Nygren wrote:
> Hi,
>
> A couple of packages use architechure specific or optional distfiles that
> are only added to DISTFILES+= if required by the build.
> Some packages attempt to work around this by testing for make(distinfo),
> others by testing make(makesum), ...
>
> The attached diff fixes this problem in a more general manner. I'm
> including example usage for emulators/suse packages that have distinfo
> for both i586 and x86_64.
>
> It also ensures conditional distfiles are mirrored to MASTER_SITE_BACKUP.
I know there will always be some "not invented here" cultural syndrome,
but this is one case where you could *possibly* borrow what we did in
OpenBSD.
Namely, we added an extra variable called SUPDISTFILES which does contain
those supplementary files.
- there can be some duplication between DISTFILES and SUPDISTFILES, so
that individual makefile code is easier.
e.g.,
DISTFILES = master_archive.tgz
.if $(SOME_OPTION)
DISTFILES += file1.tgz
.elif $(SOME_OTHER_OPTION)
DISTFILES += file2.tgz
.else
DISTFILES += file3.tgz
.endif
SUPDISTFILES = file1.tgz file2.tgz file3.tgz
- SUPDISTFILES are always mirrored, always makesum'd.
- initially we did make that part depend on FETCH_ALL being defined, but
we did phase that out, in favor of having explicit targets to do makesum
and mirroring, which just required a few more internal variables.
(the mirroring part was entirely removed from the *mk infrastructure.
These days, we just use make dump-vars, which dumps every relevant variable
in Makefiles, and have other tools (dpb, sqlports) to make use of that
meta-information in an efficient manner).
Home |
Main Index |
Thread Index |
Old Index