summaryrefslogtreecommitdiff
path: root/merge-makefile
blob: 9bdba779ba0322d5cd079b57d70570a99b9b2fc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

for i in `cat protos`; do
	sed -e "s/^pkgconfig/${i}pkgconfig/" \
	    -e "s/EXTRA_DIST/${i}_EXTRA_DIST/" \
	    -e 's/#.*$//' \
	    -e '/MAINTAINERCLEANFILES/d' \
	    -e '/PHONY/d' \
	    -e '/SUBDIRS=specs/d' \
	    -e '/ChangeLog/d' \
	    -e '/CHANGELOG/d' \
	    -e '/INSTALL/d' \
	    -e '/dist-hook/d' \
	$i/Makefile.am
done | cat -s |
	awk '/dist_doc_DATA/ { doc[ndoc++] = $3; }
	     { print $0 }
	     END { print "SUBDIRS=specs"; print; print "dist_doc_DATA = \\"; for (i in doc) printf "\t%s \\\n", doc[i]; }'