summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--maint.mk13
-rw-r--r--man/Makefile.am1
-rw-r--r--src/Makefile.am11
3 files changed, 16 insertions, 9 deletions
diff --git a/maint.mk b/maint.mk
index 492fb0f60..f3bbf9afa 100644
--- a/maint.mk
+++ b/maint.mk
@@ -31,7 +31,7 @@ GIT = git
VC = $(GIT)
VC-tag = git tag -s -m '$(VERSION)'
-VC_LIST = build-aux/vc-list-files
+VC_LIST = $(srcdir)/build-aux/vc-list-files
VC_LIST_EXCEPT = \
$(VC_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
@@ -507,11 +507,16 @@ epoch_date = 1970-01-01 00:00:00.000000000 +0000
# Ensure that the c99-to-c89 patch applies cleanly.
patch-check:
rm -rf src-c89 $@.1 $@.2
- cp -a src src-c89
- (cd src-c89; patch -p1 -V never --fuzz=0) < src/c99-to-c89.diff \
+ cp -a $(srcdir)/src src-c89
+ if test "x$(srcdir)" != x.; then \
+ cp -a src/* src-c89; \
+ dotfiles=`ls src/.[!.]* 2>/dev/null`; \
+ test -z "$$dotfiles" || cp -a src/.[!.]* src-c89; \
+ fi
+ (cd src-c89; patch -p1 -V never --fuzz=0) < $(srcdir)/src/c99-to-c89.diff \
> $@.1 2>&1
if test "$(REGEN_PATCH)" = yes; then \
- diff -upr src src-c89 | sed 's,src-c89/,src/,' \
+ diff -upr $(srcdir)/src src-c89 | sed 's,$(srcdir)/src-c89/,src/,' \
| grep -vE '^(Only in|File )' \
| perl -pe 's/^((?:\+\+\+|---) \S+\t).*/$${1}$(epoch_date)/;' \
-e 's/^ $$//' \
diff --git a/man/Makefile.am b/man/Makefile.am
index 67ac4bde0..415eb828f 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -161,7 +161,6 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
--output=$t/$@ $t/$*; \
} \
&& sed 's|$*\.td/||g' $t/$@ > $@ \
- && chmod a-w $@ \
&& rm -rf $t ;; \
esac
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 && \