From be320541566a4dd7ddffd368de8f3d839aded4a9 Mon Sep 17 00:00:00 2001
From: Joerg Wunsch <j@uriah.heep.sax.de>
Date: Fri, 18 Aug 2006 20:10:20 +0000
Subject: [PATCH] Add a dist-hook, and make it remove lexer.c, config_gram.c,
 and config_gram.h from the source distribution archive.  These files are
 supposed to be generated on the target system.

Closes bug #15536: avrdude-5.1 compilation fails on Gentoo/amd64


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@613 81a1dc3b-b13d-400b-aceb-764788c761c2
---
 avrdude/ChangeLog   |  8 ++++++++
 avrdude/Makefile.am | 15 +++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog
index 986c59fd..5eab3353 100644
--- a/avrdude/ChangeLog
+++ b/avrdude/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-18 Joerg Wunsch <j@uriah.heep.sax.de>
+
+	* Makefile.am: Add a dist-hook, and make it remove lexer.c,
+	config_gram.c, and config_gram.h from the source distribution
+	archive.  These files are supposed to be generated on the target
+	system.
+	Closes bug #15536: avrdude-5.1 compilation fails on Gentoo/amd64
+
 2006-08-17 Joerg Wunsch <j@uriah.heep.sax.de>
 
 	* stk500v2.c: unreverse the argument order for
diff --git a/avrdude/Makefile.am b/avrdude/Makefile.am
index 6d807f6f..2776d88b 100644
--- a/avrdude/Makefile.am
+++ b/avrdude/Makefile.am
@@ -51,6 +51,21 @@ avrdude_LDADD  = @LIBUSB@
 
 bin_PROGRAMS = avrdude
 
+# automake thinks these generated files should be in the distribution,
+# but this might cause trouble for some users, so we rather don't want
+# to have them there.
+#
+# See
+#
+# https://savannah.nongnu.org/bugs/index.php?func=detailitem&item_id=15536
+#
+# for why we don't want to have them.
+dist-hook:
+	rm -f \
+	$(distdir)/lexer.c \
+	$(distdir)/config_gram.c \
+	$(distdir)/config_gram.h
+
 avrdude_SOURCES = \
 	config_gram.y \
 	lexer.l \