Discussion:
[libdvdcss-devel] [PATCH] build: Only create ChangeLog file from Git if Git is available
Diego Biurrun
2014-11-02 20:44:53 UTC
Permalink
---
Makefile.am | 2 ++
configure.ac | 3 +++
2 files changed, 5 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 583a1f2..89f0c5e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,9 +7,11 @@ dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog
MAINTAINERCLEANFILES = ChangeLog

ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
+if GIT
-cd $(srcdir) && git log > $(abs_builddir)/$(@)-tmp
test -s $(@)-tmp && mv $(@)-tmp $(@)
-rm -f $(@)-tmp
+endif
test -e $(@) || touch $(@)

lib_LTLIBRARIES = libdvdcss.la
diff --git a/configure.ac b/configure.ac
index f8386c4..5b8f79d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -228,6 +228,9 @@ AS_IF([test "x$DOXYGEN" = "x"], [
])
AM_CONDITIONAL([APIDOC], [test "x$DOXYGEN" != "x"])

+AC_PATH_PROG([GIT], [git])
+AM_CONDITIONAL([GIT], [test "x$GIT" != "x"])
+
AC_SUBST(DVDCSS_LDFLAGS)
AC_OUTPUT([
Makefile
--
1.9.1
Jean-Baptiste Kempf
2014-11-02 20:48:26 UTC
Permalink
Sure.
but it's also why it's "-"
Post by Diego Biurrun
---
Makefile.am | 2 ++
configure.ac | 3 +++
2 files changed, 5 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 583a1f2..89f0c5e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,9 +7,11 @@ dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog
MAINTAINERCLEANFILES = ChangeLog
ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
+if GIT
+endif
lib_LTLIBRARIES = libdvdcss.la
diff --git a/configure.ac b/configure.ac
index f8386c4..5b8f79d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -228,6 +228,9 @@ AS_IF([test "x$DOXYGEN" = "x"], [
])
AM_CONDITIONAL([APIDOC], [test "x$DOXYGEN" != "x"])
+AC_PATH_PROG([GIT], [git])
+AM_CONDITIONAL([GIT], [test "x$GIT" != "x"])
+
AC_SUBST(DVDCSS_LDFLAGS)
AC_OUTPUT([
Makefile
--
1.9.1
_______________________________________________
libdvdcss-devel mailing list
https://mailman.videolan.org/listinfo/libdvdcss-devel
--
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
Diego Biurrun
2014-11-02 20:53:52 UTC
Permalink
Post by Jean-Baptiste Kempf
Post by Diego Biurrun
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,9 +7,11 @@ dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog
ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
+if GIT
+endif
Sure.
but it's also why it's "-"
Try on a system without Git, you will see annoying error messages.

Diego
Diego Biurrun
2014-11-03 08:12:36 UTC
Permalink
libdvdcss | branch: master | Diego Biurrun <***@biurrun.de> | Sun Nov 2 21:43:55 2014 +0100| [44727dfa01db3455a5bf4146dd3120dcbdb6dadb] | committer: Diego Biurrun

build: Only create ChangeLog file from Git if Git is available
http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=44727dfa01db3455a5bf4146dd3120dcbdb6dadb
---

Makefile.am | 2 ++
configure.ac | 3 +++
2 files changed, 5 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 583a1f2..89f0c5e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,9 +7,11 @@ dist_doc_DATA = AUTHORS COPYING NEWS README ChangeLog
MAINTAINERCLEANFILES = ChangeLog

ChangeLog: $(wildcard $(srcdir)/.git/logs/HEAD)
+if GIT
-cd $(srcdir) && git log > $(abs_builddir)/$(@)-tmp
test -s $(@)-tmp && mv $(@)-tmp $(@)
-rm -f $(@)-tmp
+endif
test -e $(@) || touch $(@)

lib_LTLIBRARIES = libdvdcss.la
diff --git a/configure.ac b/configure.ac
index f8386c4..5b8f79d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -228,6 +228,9 @@ AS_IF([test "x$DOXYGEN" = "x"], [
])
AM_CONDITIONAL([APIDOC], [test "x$DOXYGEN" != "x"])

+AC_PATH_PROG([GIT], [git])
+AM_CONDITIONAL([GIT], [test "x$GIT" != "x"])
+
AC_SUBST(DVDCSS_LDFLAGS)
AC_OUTPUT([
Makefile

Loading...