[libdvdcss-devel] [PATCH] build: Only create ChangeLog file from Git if Git is available

Diego Biurrun <[email protected]>
Newsgroups gmane.comp.video.videolan.libdvdcss,gmane.comp.video.videolan.libdvdcss.devel
Message-ID <[email protected]>
---
 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

_______________________________________________
libdvdcss-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libdvdcss-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.