From 484af7eec280c8413d3ab5f01eded9860992b61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Mon, 24 Aug 2009 13:24:08 +0300 Subject: [PATCH] Fix broken dependency on include/ofono/*.h files The fact that the directory exists does not prove that (all of) the header file symbolic links have been created. This is particularly annoying when a new header file gets added. --- include/Makefile.am | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/include/Makefile.am b/include/Makefile.am index 5744663f..bc44606a 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -12,13 +12,15 @@ nodist_include_HEADERS = version.h MAINTAINERCLEANFILES = Makefile.in all-local: - @if [ ! -e ofono ]; then \ - mkdir ofono; \ - list='$(include_HEADERS)'; for i in $$list; \ - do $(LN_S) $(abs_top_srcdir)/include/$$i ofono/$$i; done; \ - list='$(nodist_include_HEADERS)'; for i in $$list; \ - do $(LN_S) $(abs_top_builddir)/include/$$i ofono/$$i; done; \ - fi + @test -d ofono || mkdir ofono + @list='$(include_HEADERS)'; for i in $$list; do \ + test -f ofono/$$i || \ + $(LN_S) $(abs_top_srcdir)/include/$$i ofono/$$i; \ + done + @list='$(nodist_include_HEADERS)'; for i in $$list; do \ + test -f ofono/$$i || \ + $(LN_S) $(abs_top_builddir)/include/$$i ofono/$$i; \ + done clean-local: @rm -rf ofono