From e10e4b669715aa2ca8059987c9ae08b2a1ad7a14 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Fri, 12 Sep 2008 21:23:43 +0200 Subject: various VPATH-related fixes * maint.mk (VC_LIST): Prepend '$(srcdir)/'. (patch-check): Fix to make it work with a VPATH build. * src/Makefile.am (sc_tight_scope): Likewise. * man/Makefile.am (.x.1): Do not make outputs unwritable. --- src/Makefile.am | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index dee26a4b1..80313ae4b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -442,11 +442,14 @@ s2 = '/^\#define AUTHORS \\\\/{;n;$(sed_filter);p;q;}' sc_tight_scope: $(all_programs) @t=exceptions-$$$$; \ trap "s=$$?; rm -f $$t; exit $$s" 0 1 2 13 15; \ + src=`for f in $(SOURCES); do \ + test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ + hdr=`for f in $(noinst_HEADERS); do \ + test -f $$f && d= || d=$(srcdir)/; echo $$d$$f; done`; \ ( printf 'main\nusage\n'; \ - grep -h -A1 '^extern .*[^;]$$' $(SOURCES) \ + grep -h -A1 '^extern .*[^;]$$' $$src \ | grep -vE '^(extern |--)' | sed 's/ .*//'; \ - perl -ne '/^extern \S+ (\S*) \(/ and print "$$1\n"' \ - $(noinst_HEADERS); \ + perl -ne '/^extern \S+ (\S*) \(/ and print "$$1\n"' $$hdr; \ ) | $(ASSORT) -u | sed 's/^/^/;s/$$/$$/' > $$t; \ nm -e *.$(OBJEXT) \ | sed -n 's/.* T //p' \ @@ -455,7 +458,7 @@ sc_tight_scope: $(all_programs) exit 1; } || : ; \ ( printf '^program_name$$\n'; \ perl -ne '/^extern .*?\**(\w+);/ and print "^$$1\$$\n"' \ - *.h ) > $$t; \ + $$hdr *.h ) | $(ASSORT) -u > $$t; \ nm -e *.$(OBJEXT) \ | sed -n 's/.* [BD] //p' \ | grep -Ev -f $$t && \ -- cgit v1.2.3-70-g09d2