From: Ben Pfaff Date: Fri, 11 Apr 2014 20:05:45 +0000 (-0700) Subject: Makefile.am: Fix build hang when .git and Git are present but don't work. X-Git-Tag: sliver-openvswitch-2.2.90-1~3^2~137 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ca3d034b3909dfe7ae5d2044f3547e57cb9fb8f5;p=sliver-openvswitch.git Makefile.am: Fix build hang when .git and Git are present but don't work. If the .git directory is there, and "git --version" works, but "git ls-files" fails to print any file names (e.g. perhaps because .git is a symlink to an inaccessible directory) then the "grep" command in the thread-safety-check rule would hang forever because it had an empty list of files and therefore expected to read from stdin. This fixes the problem by adding the name of an empty file to the command, which is harmless. Signed-off-by: Ben Pfaff Acked-by: Alex Wang --- diff --git a/Makefile.am b/Makefile.am index e9ca26a43..80619fb62 100644 --- a/Makefile.am +++ b/Makefile.am @@ -247,7 +247,7 @@ thread-safety-check: @if test -e '$(srcdir)'/.git && (git --version) >/dev/null 2>&1 && \ grep -n -f '$(srcdir)'/build-aux/thread-safety-blacklist \ `git ls-files '$(srcdir)' | grep '\.[ch]$$' \ - | $(EGREP) -v '^datapath|^lib/sflow|^third-party'` \ + | $(EGREP) -v '^datapath|^lib/sflow|^third-party'` /dev/null \ | $(EGREP) -v ':[ ]*/?\*'; \ then \ echo "See above for list of calls to functions that are"; \