Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
37681f0e
Commit
37681f0e
authored
Oct 26, 2012
by
Ghislain MARY
Browse files
Improve handling of git version.
parent
b7b4e75e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
coreapi/Makefile.am
coreapi/Makefile.am
+14
-10
No files found.
coreapi/Makefile.am
View file @
37681f0e
GITVERSION_FILE
=
liblinphone_gitversion.h
GITVERSION_FILE_TMP
=
liblinphone_gitversion.h.tmp
GITDESCRIBE
=
$(
shell
git describe
)
GITREVISION
=
$(
shell
git rev-parse HEAD
)
ECHO
=
/bin/echo
...
...
@@ -107,15 +109,17 @@ endif
AM_CXXFLAGS
=
$(AM_CFLAGS)
$(GITVERSION_FILE)
:
if
test
-d
$(top_srcdir)
/.git
;
then
\
$(ECHO)
-n
"#define LIBLINPHONE_GIT_VERSION "
>
$(GITVERSION_FILE_TMP)
&&
\
$(ECHO)
\"
`
cd
$(top_srcdir)
&&
git describe
`
\"
>>
$(GITVERSION_FILE_TMP)
&&
\
if
test
"
`
cat
$(GITVERSION_FILE_TMP)
`
"
!=
"
`
cat
$(srcdir)
/
$(GITVERSION_FILE)
`
"
;
then
\
cp
-f
$(GITVERSION_FILE_TMP)
$(srcdir)
/
$(GITVERSION_FILE)
;
\
fi
\
&&
rm
-f
$(GITVERSION_FILE_TMP)
;
\
make_gitversion_h
:
if
test
"
$(GITDESCRIBE)
"
!=
""
;
then
\
$(ECHO)
-n
"#define LIBLINPHONE_GIT_VERSION
\"
$(GITDESCRIBE)
\"
"
>
$(GITVERSION_FILE_TMP)
;
\
elif
test
"
$(GITREVISION)
"
!=
""
;
then
\
$(ECHO)
-n
"#define LIBLINPHONE_GIT_VERSION
\"
$(LINPHONE_VERSION)
_
$(GITREVISION)
\"
"
>
$(GITVERSION_FILE_TMP)
;
\
else
\
$(ECHO)
-n
""
>
$(GITVERSION_FILE_TMP)
;
\
fi
if
!
test
-f
$(srcdir)
/
$(GITVERSION_FILE)
;
then
\
$(ECHO)
-n
""
>
$(srcdir)
/
$(GITVERSION_FILE)
;
\
if
test
"
`
cat
$(GITVERSION_FILE_TMP)
`
"
!=
"
`
cat
$(srcdir)
/
$(GITVERSION_FILE)
`
"
;
then
\
cp
-f
$(GITVERSION_FILE_TMP)
$(srcdir)
/
$(GITVERSION_FILE)
;
\
fi
rm
-f
$(GITVERSION_FILE_TMP)
;
$(GITVERSION_FILE)
:
make_gitversion_h
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment