From dd57c9cb700fd95548622e44a6769c6c78f67676 Mon Sep 17 00:00:00 2001
From: Florian Pose <fp@igh-essen.com>
Date: Fri, 13 Oct 2006 09:39:42 +0000
Subject: [PATCH] Distribution makefile for examples.

---
 Makefile.am               | 26 ++-----------------------
 configure.ac              |  1 +
 examples/Makefile.am      | 40 +++++++++++++++++++++++++++++++++++++++
 examples/mini/Makefile.am |  2 ++
 examples/msr/Makefile.am  |  9 +++++++++
 examples/rtai/Makefile.am |  2 ++
 6 files changed, 56 insertions(+), 24 deletions(-)
 create mode 100644 examples/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index b9918b38..baa571a6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,31 +37,9 @@
 
 SUBDIRS = master devices script include
 
-MINI_FILES = \
-        examples/mini/Kbuild \
-        examples/mini/Makefile.am \
-        examples/mini/Makefile.in \
-        examples/mini/mini.c
+DIST_SUBDIRS = master devices script include examples
 
-RTAI_FILES = \
-        examples/rtai/Kbuild \
-        examples/rtai/Makefile.am \
-        examples/rtai/Makefile.in \
-        examples/rtai/rtai_sample.c
-
-MSR_FILES = \
-        examples/msr/Kbuild \
-        examples/msr/libm.o_shipped \
-        examples/msr/Makefile.am \
-        examples/msr/Makefile.in \
-        examples/msr/msr_load \
-        examples/msr/msr_param.h \
-        examples/msr/msr_sample.c \
-        examples/msr/msrserv.pl \
-        examples/msr/msr_unload
-
-EXTRA_DIST = documentation/ethercat_doc.pdf \
-        $(MINI_FILES) $(RTAI_FILES) $(MSR_FILES)
+EXTRA_DIST = documentation/ethercat_doc.pdf
 
 mydist:
 	@SVNREV=`svnversion $(srcdir)` && \
diff --git a/configure.ac b/configure.ac
index d4dd3d66..00ae13c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -80,6 +80,7 @@ AC_CONFIG_FILES([
         devices/Makefile
         script/Makefile
         include/Makefile
+        examples/Makefile
         examples/mini/Makefile
         examples/rtai/Makefile
         examples/msr/Makefile
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 00000000..6a60b8f9
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,40 @@
+#------------------------------------------------------------------------------
+#
+#  Makefile.am
+#
+#  IgH EtherCAT master
+#
+#  $Id: Makefile.am 581 2006-10-09 14:47:48Z fp $
+#
+#  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
+#
+#  This file is part of the IgH EtherCAT Master.
+#
+#  The IgH EtherCAT Master is free software; you can redistribute it
+#  and/or modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2 of the
+#  License, or (at your option) any later version.
+#
+#  The IgH EtherCAT Master is distributed in the hope that it will be
+#  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with the IgH EtherCAT Master; if not, write to the Free Software
+#  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#
+#  The right to use EtherCAT Technology is granted and comes free of
+#  charge under condition of compatibility of product made by
+#  Licensee. People intending to distribute/sell products based on the
+#  code, have to sign an agreement to guarantee that products using
+#  software based on IgH EtherCAT master stay compatible with the actual
+#  EtherCAT specification (which are released themselves as an open
+#  standard) as the (only) precondition to have the right to use EtherCAT
+#  Technology, IP and trade marks.
+#
+#------------------------------------------------------------------------------
+
+DIST_SUBDIRS = mini rtai msr
+
+#------------------------------------------------------------------------------
diff --git a/examples/mini/Makefile.am b/examples/mini/Makefile.am
index 580b666d..00c4a21d 100644
--- a/examples/mini/Makefile.am
+++ b/examples/mini/Makefile.am
@@ -35,6 +35,8 @@
 #
 #------------------------------------------------------------------------------
 
+EXTRA_DIST = Kbuild mini.c
+
 all:
 	$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" modules
 
diff --git a/examples/msr/Makefile.am b/examples/msr/Makefile.am
index 580b666d..b6356988 100644
--- a/examples/msr/Makefile.am
+++ b/examples/msr/Makefile.am
@@ -35,6 +35,15 @@
 #
 #------------------------------------------------------------------------------
 
+EXTRA_DIST = \
+	Kbuild \
+	libm.o_shipped \
+	msr_load \
+	msr_unload \
+	msr_param.h \
+	msr_sample.c \
+	msrserv.pl
+
 all:
 	$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" modules
 
diff --git a/examples/rtai/Makefile.am b/examples/rtai/Makefile.am
index 580b666d..93abbea1 100644
--- a/examples/rtai/Makefile.am
+++ b/examples/rtai/Makefile.am
@@ -35,6 +35,8 @@
 #
 #------------------------------------------------------------------------------
 
+EXTRA_DIST = Kbuild rtai_sample.c
+
 all:
 	$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="@abs_srcdir@" modules
 
-- 
GitLab