* LOCALVERSION in setlocalversion
@ 2011-04-19 6:42 Haojian Zhuang
2011-04-19 6:58 ` Michal Marek
0 siblings, 1 reply; 4+ messages in thread
From: Haojian Zhuang @ 2011-04-19 6:42 UTC (permalink / raw)
To: zippel, linux-kbuild, linux-kernel
Hi,
In scripts/setlocalversion under linux kernel tree, the scripts seems
a little strange.
# scm version string if not at a tagged commit
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
# full scm version string
res="$res$(scm_version)"
else
# append a plus sign if the repository is not in a clean
# annotated or signed tagged state (as git describe only
# looks at signed or annotated tags - git tag -a/-s) and
# LOCALVERSION= is not specified
if test "${LOCALVERSION+set}" != "set"; then
scm=$(scm_version --short)
res="$res${scm:++}"
fi
fi
LOCALVERSION isn't assigned in any place. Only CONFIG_LOCALVERSION
can be assigned in .config file.
Why do we need to check LOCALVERSION at here?
Thanks
Haojian
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: LOCALVERSION in setlocalversion
2011-04-19 6:42 LOCALVERSION in setlocalversion Haojian Zhuang
@ 2011-04-19 6:58 ` Michal Marek
2011-04-19 7:35 ` Haojian Zhuang
0 siblings, 1 reply; 4+ messages in thread
From: Michal Marek @ 2011-04-19 6:58 UTC (permalink / raw)
To: Haojian Zhuang; +Cc: zippel, linux-kbuild, linux-kernel
On 19.4.2011 08:42, Haojian Zhuang wrote:
> In scripts/setlocalversion under linux kernel tree, the scripts seems
> a little strange.
[...]
> # append a plus sign if the repository is not in a clean
> # annotated or signed tagged state (as git describe only
> # looks at signed or annotated tags - git tag -a/-s) and
> # LOCALVERSION= is not specified
> if test "${LOCALVERSION+set}" != "set"; then
> scm=$(scm_version --short)
> res="$res${scm:++}"
> fi
> fi
>
> LOCALVERSION isn't assigned in any place. Only CONFIG_LOCALVERSION
> can be assigned in .config file.
> Why do we need to check LOCALVERSION at here?
It can be set on the commandline:
make LOCALVERSION=something
Michal
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: LOCALVERSION in setlocalversion
2011-04-19 6:58 ` Michal Marek
@ 2011-04-19 7:35 ` Haojian Zhuang
2011-04-19 8:03 ` Michal Marek
0 siblings, 1 reply; 4+ messages in thread
From: Haojian Zhuang @ 2011-04-19 7:35 UTC (permalink / raw)
To: Michal Marek; +Cc: zippel, linux-kbuild, linux-kernel
On Tue, Apr 19, 2011 at 2:58 PM, Michal Marek <mmarek@suse.cz> wrote:
> On 19.4.2011 08:42, Haojian Zhuang wrote:
>> In scripts/setlocalversion under linux kernel tree, the scripts seems
>> a little strange.
> [...]
>> # append a plus sign if the repository is not in a clean
>> # annotated or signed tagged state (as git describe only
>> # looks at signed or annotated tags - git tag -a/-s) and
>> # LOCALVERSION= is not specified
>> if test "${LOCALVERSION+set}" != "set"; then
>> scm=$(scm_version --short)
>> res="$res${scm:++}"
>> fi
>> fi
>>
>> LOCALVERSION isn't assigned in any place. Only CONFIG_LOCALVERSION
>> can be assigned in .config file.
>> Why do we need to check LOCALVERSION at here?
>
> It can be set on the commandline:
>
> make LOCALVERSION=something
>
> Michal
>
Thanks a lot. It works.
I still have a question. I can't find the semantic of
${LOCALVERSION+set} in some
shell tutorials. Could you help me to figure out a link of introducing this?
Best Regards
Haojian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-19 8:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19 6:42 LOCALVERSION in setlocalversion Haojian Zhuang
2011-04-19 6:58 ` Michal Marek
2011-04-19 7:35 ` Haojian Zhuang
2011-04-19 8:03 ` Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox