[x264-devel] commit: Fix build scripts to work with non-GNU tools (Francois Cartegnie )

git at videolan.org git at videolan.org
Sat Apr 24 00:40:04 CEST 2010


x264 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Apr 18 13:04:59 2010 -0700| [156bf75dfb99913bdc8db73a858130e63c6bf5c4] | committer: Jason Garrett-Glaser 

Fix build scripts to work with non-GNU tools

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=156bf75dfb99913bdc8db73a858130e63c6bf5c4
---

 Makefile   |    8 +++++---
 version.sh |    2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 24cf324..793a58a 100644
--- a/Makefile
+++ b/Makefile
@@ -193,8 +193,10 @@ distclean: clean
 	rm -rf test/
 
 install: x264$(EXE) $(SONAME)
-	install -d $(DESTDIR)$(bindir) $(DESTDIR)$(includedir)
-	install -d $(DESTDIR)$(libdir) $(DESTDIR)$(libdir)/pkgconfig
+	install -d $(DESTDIR)$(bindir)
+	install -d $(DESTDIR)$(includedir)
+	install -d $(DESTDIR)$(libdir)
+	install -d $(DESTDIR)$(libdir)/pkgconfig
 	install -m 644 x264.h $(DESTDIR)$(includedir)
 	install -m 644 libx264.a $(DESTDIR)$(libdir)
 	install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
@@ -203,7 +205,7 @@ install: x264$(EXE) $(SONAME)
 ifeq ($(SYS),MINGW)
 	$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(bindir))
 else
-	$(if $(SONAME), ln -sf $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
+	$(if $(SONAME), ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
 	$(if $(SONAME), install -m 755 $(SONAME) $(DESTDIR)$(libdir))
 endif
 	$(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))
diff --git a/version.sh b/version.sh
index c877847..03b070b 100755
--- a/version.sh
+++ b/version.sh
@@ -8,7 +8,7 @@ if [ $LOCALVER \> 1 ] ; then
     elif git status | grep -q "modified:" ; then
         VER="${VER}M"
     fi
-    VER="$VER $(git rev-list HEAD -n 1 | head -c 7)"
+    VER="$VER $(git rev-list HEAD -n 1 | cut -c 1-7)"
     echo "#define X264_VERSION \" r$VER\"" >> config.h
 else
     echo "#define X264_VERSION \"\"" >> config.h



More information about the x264-devel mailing list