[Toybox] patch to disable scripts/make.sh GITHASH=...
Thomas
code at thughes.info
Sun Aug 6 12:10:24 PDT 2017
> Thomas wrote:
>> > Wait, your git --describe is finding a random tarball in some other
>> > directory?
>> >
>> > That's really broken.
>> ...
>> GITHASH is technically correct, but annoyingly unhelpful.
>>
>> How shall I force "toybox --version" to print "toybox 0.7.4"
>> instead of "toybox whatever-16.0.0-222-ge7bb9e918200"
>> just because the toybox build dir is "under" a git dir?
>
> Have you looked at the GIT_CEILING_DIRECTORIES variable?
GIT_CEILING_DIRECTORIES=$(dirname ${PWD}) works, but seems hacky.
Rather than patching [ -z "$GITHASH" ] && GITHASH=... because setting
$GITHASH=myver seems misleading, the (new) attached .patch lets you set
$TOYBOX_VERSION=myver to end up with -DTOYBOX_VERSION=myver ... supersedes
GITHASH= but still falls back to main.c:#define TOYBOX_VERSION= ... so
projects can override "TOYBOX_VERSION=${PV}-${PR}" to keep "toybox
--version" from printing "toybox $(git describe)".
Unless $CONFIG_TOYBOX_VERSION is a better name than $TOYBOX_VERSION.
Unless introducing -DTOYBOX_VERSION_GITHASH and optionally showing "toybox
$TOYBOX_VERSION-$TOYBOX_VERSION_GITHASH" is better.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dont-hide-version-num.patch
Type: application/octet-stream
Size: 1232 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170806/110e53e0/attachment-0002.obj>
More information about the Toybox
mailing list