[build2] Feature Request: Bare copy of project without git

Boris Kolpackov boris at codesynthesis.com
Mon Oct 21 16:15:50 UTC 2019


Markus Pawellek <markuspawellek at gmail.com> writes:

> I have as well showed it to some more advanced programmers that are
> mainly using CMake as their build system.
> They were relieved to see such a simple and efficient solution for
> something that until that point had to be done in several complex
> lines of code.

That's encouraging to hear. So far in my experience CMake users were
not very receptive to the idea.


> But there is one problem: What if we, for example, include a
> pre-generated version header inside the distribution?
> In this case, the dist meta-operation would not give us a bare
> copy. Am I right?

Yes, that's correct, with dist you can include files from out
(and exclude files from src, though this is not very common).
We could fairly easily add an override to summarily ignore
everything from out (and not ignore anything from src) but I
am wondering if at this stage we are just over-engineering
things and the better solution is to just get a VCS?


> But sometimes I feel there should be some standard configurations
> so that consumers of a package would not have to configure a
> persistent configuration with the typical adjustments manually.

You could easily distribute sample configuration files by simply
treating them as some sort of auxiliary information (similar to,
say, the INSTALL file) and listing them as file{} prerequisites:

  ./: ... configs/file{*}

In this case the user will need to copy the configuration over
manually but, again, I believe for any more elaborate pre-canned
configuration management one should use a VCS.

Also, I am not sure what exactly you mean by "standard configurations".
If it is something like debug/release, 32/64-bit, etc., then we
potentially a have a better solution (still a TODO though) for this
in the form of what we call a "config initializer": a list of high-
level key-value pairs that abstract away platform/compiler specific
details (options, etc). Something along these lines (the syntax is
not final):

  $b config=clang,64,debug,warnings=all

See this issue for some more details:

  https://github.com/build2/build2/issues/11



More information about the users mailing list