+2014-06-30 Glenn Morris <rgm@gnu.org>
+
+ * update_autogen: Find loaddefs targets rather than
+ parsing lisp/Makefile.in
+
2014-06-29 Glenn Morris <rgm@gnu.org>
* update_autogen: Remove need to cd into/out of lisp/.
echo "Finding loaddef targets..."
-sed -n -e '/^AUTOGEN_VCS/,/^$/p' lisp/Makefile.in | \
- sed -e '/AUTOGEN_VCS/d' -e '/^$/d' -e 's/\\//' \
- >| $tempfile || die "sed error"
+find lisp -name '*.el' -exec grep '^;.*generated-autoload-file:' {} + | \
+ sed -e '/loaddefs\|esh-groups/d' -e 's|/[^/]*: "|/|' -e 's/"//g' \
+ >| $tempfile || die "Error finding targets"
genfiles=
while read genfile; do
- genfile=lisp/$genfile
+ ## Or we can just use sort -u when making tempfile...
+ case " $genfiles " in
+ *" $genfile "*) continue ;;
+ esac
+
[ -r $genfile ] || die "Unable to read $genfile"
genfiles="$genfiles $genfile"