[PATCH 1/1] build: handle special characters when building from git

Manuel Bachmann manuel.bachmann at open.eurogiciel.org
Mon Aug 18 00:23:22 PDT 2014


Hi Pekka and thanks for the review,

Hmm strange, wasn't what I observed when I submitted the patch, will look
at that and let you know.


2014-08-15 15:33 GMT+02:00 Pekka Paalanen <ppaalanen at gmail.com>:

> On Wed, 30 Jul 2014 00:28:52 +0200
> Manuel Bachmann <manuel.bachmann at open.eurogiciel.org> wrote:
>
> > When building from a git repository, in Makefile.am, the
> > macro creating the "src/git-version.h" file will fail
> > if the last commit subject contains a special character
> > such as ". Escape characters so that the output string
> > is, at worst, empty.
> >
> > Signed-off-by: Manuel Bachmann <manuel.bachmann at open.eurogiciel.org>
> > ---
> >  Makefile.am |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makefile.am b/Makefile.am
> > index 191dcc9..68f4d18 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -112,7 +112,7 @@ endif
> >
> >  if HAVE_GIT_REPO
> >  src/git-version.h : $(top_srcdir)/.git/logs/HEAD
> > -     $(AM_V_GEN)echo "#define BUILD_ID \"$(shell git
> --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git
> --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@
> > +     $(AM_V_GEN)echo "#define BUILD_ID \"${(shell git
> --git-dir=$(top_srcdir)/.git describe --always --dirty)} ${(shell git
> --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')}\"" > $@
> >  else
> >  src/git-version.h :
> >       $(AM_V_GEN)echo "#define BUILD_ID \"unknown (not built from git or
> tarball)\"" > $@
>
> For me, this just makes the BUILD_ID always empty, even without any
> funny characters.
>
>
> Thanks,
> pq
>



-- 
Regards,



*Manuel BACHMANN Tizen Project VANNES-FR*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140818/2d472236/attachment.html>


More information about the wayland-devel mailing list