changeset 20328:d6879b59f46f

eliminate recursive make invocation in examples directory tree * examples/module.mk: New file. * Makefile.am: Include examples/module.mk. (SUBDIRS): Remove examples from the list. * configure.ac (AC_OUTPUT): Don't generate examples/Makefile, examples/code/Makefile, or examples/data/Makefile. * examples/Makefile.am, examples/code/@FIRfilter/module.mk, examples/code/@polynomial/module.mk, examples/code/Makefile.am, examples/data/Makefile.am: Delete.
author John W. Eaton <jwe@octave.org>
date Thu, 02 Jul 2015 17:11:29 -0400
parents 64f6d0543626
children 2102c4582e32
files Makefile.am configure.ac examples/Makefile.am examples/code/@FIRfilter/module.mk examples/code/@polynomial/module.mk examples/code/Makefile.am examples/data/Makefile.am examples/module.mk
diffstat 8 files changed, 64 insertions(+), 160 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Thu Jul 02 14:23:18 2015 -0400
+++ b/Makefile.am	Thu Jul 02 17:11:29 2015 -0400
@@ -24,6 +24,9 @@
 ## to a confusing error message stream
 .NOTPARALLEL:
 
+octdata_DATA =
+octetc_DATA =
+
 ACLOCAL_AMFLAGS = -I m4
 
 BUILT_DISTFILES = AUTHORS BUGS ChangeLog INSTALL.OCTAVE
@@ -65,6 +68,7 @@
   etc/gdbinit \
   run-octave.in
 
+include examples/module.mk
 include m4/module.mk
 
 # Subdirectories in which to run `make all'.  Including "." before
@@ -81,7 +85,7 @@
 if AMCOND_BUILD_GUI
 SUBDIRS += libgui
 endif
-SUBDIRS += src scripts . @DOCDIR@ examples etc/icons test .
+SUBDIRS += src scripts . @DOCDIR@ etc/icons test .
 
 if ! AMCOND_BUILD_DOCS
 dist-hook:
@@ -171,7 +175,7 @@
 	$(AM_V_GEN)$(changelog-from-hg-log)
 .PHONY: ChangeLog
 
-octetc_DATA = \
+octetc_DATA += \
   CITATION \
   NEWS
 
--- a/configure.ac	Thu Jul 02 14:23:18 2015 -0400
+++ b/configure.ac	Thu Jul 02 17:11:29 2015 -0400
@@ -3004,9 +3004,6 @@
   doc/liboctave/Makefile
   doc/refcard/Makefile
   etc/icons/Makefile
-  examples/Makefile
-  examples/code/Makefile
-  examples/data/Makefile
   libgnu/Makefile
   libgui/Makefile
   libinterp/Makefile
--- a/examples/Makefile.am	Thu Jul 02 14:23:18 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-# Makefile for Octave's example directory
-#
-# Copyright (C) 1993-2015 John W. Eaton
-#
-# This file is part of Octave.
-#
-# Octave 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 3 of the License, or (at
-# your option) any later version.
-#
-# Octave 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 Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-## Pass-through layer.  Simply pass make commands down to SUBDIRS.
-
-include $(top_srcdir)/build-aux/common.mk
-
-EXTRA_DIST = \
-  Makefile.am
-
-SUBDIRS = code data
-
--- a/examples/code/@FIRfilter/module.mk	Thu Jul 02 14:23:18 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-FCN_FILE_DIRS += @FIRfilter
-
-EXTRA_DIST += @FIRfilter/module.mk
-
-at_FIRfilter_FCN_FILES = \
-  @FIRfilter/display.m \
-  @FIRfilter/FIRfilter_aggregation.m \
-  @FIRfilter/FIRfilter.m \
-  @FIRfilter/subsasgn.m \
-  @FIRfilter/subsref.m
-
-FCN_FILES += $(at_FIRfilter_FCN_FILES)
--- a/examples/code/@polynomial/module.mk	Thu Jul 02 14:23:18 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-FCN_FILE_DIRS += @polynomial
-
-EXTRA_DIST += @polynomial/module.mk
-
-at_polynomial_FCN_FILES = \
-  @polynomial/display.m \
-  @polynomial/double.m \
-  @polynomial/end.m \
-  @polynomial/get.m \
-  @polynomial/mtimes.m \
-  @polynomial/numel.m \
-  @polynomial/plot.m \
-  @polynomial/polynomial.m \
-  @polynomial/polynomial_superiorto.m \
-  @polynomial/polyval.m \
-  @polynomial/roots.m \
-  @polynomial/set.m \
-  @polynomial/subsasgn.m \
-  @polynomial/subsref.m
-
-FCN_FILES += $(at_polynomial_FCN_FILES)
--- a/examples/code/Makefile.am	Thu Jul 02 14:23:18 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-# Makefile for Octave's examples directory
-#
-# Copyright (C) 1996-2015 John W. Eaton
-#
-# This file is part of Octave.
-#
-# Octave 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 3 of the License, or (at
-# your option) any later version.
-#
-# Octave 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 Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-include $(top_srcdir)/build-aux/common.mk
-
-EXTRA_DIST =
-
-FCN_FILE_DIRS =
-
-FCN_FILES =
-
-include @polynomial/module.mk
-include @FIRfilter/module.mk
-
-EXTRA_DIST += \
-  $(FCN_FILES) \
-  addtwomatrices.cc \
-  celldemo.cc \
-  embedded.cc \
-  fortrandemo.cc \
-  fortransub.f \
-  funcdemo.cc \
-  globaldemo.cc \
-  helloworld.cc \
-  make_int.cc \
-  mex_demo.c \
-  mycell.c \
-  myfeval.c \
-  myfevalf.f \
-  myfunc.c \
-  myhello.c \
-  mypow2.c \
-  myprop.c \
-  myset.c \
-  mysparse.c \
-  mystring.c \
-  mystruct.c \
-  oct_demo.cc \
-  oregonator.cc \
-  oregonator.m \
-  paramdemo.cc \
-  standalone.cc \
-  standalonebuiltin.cc \
-  stringdemo.cc \
-  structdemo.cc \
-  unwinddemo.cc
-
--- a/examples/data/Makefile.am	Thu Jul 02 14:23:18 2015 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-# Makefile for Octave's examples/data directory
-#
-# Copyright (C) 2012-2015 John W. Eaton
-#
-# This file is part of Octave.
-#
-# Octave 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 3 of the License, or (at
-# your option) any later version.
-#
-# Octave 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 Octave; see the file COPYING.  If not, see
-# <http://www.gnu.org/licenses/>.
-
-include $(top_srcdir)/build-aux/common.mk
-
-DATA_FILES = \
-   penny.mat
-
-octdata_DATA = $(DATA_FILES)
-
-EXTRA_DIST = $(DATA_FILES)
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/module.mk	Thu Jul 02 17:11:29 2015 -0400
@@ -0,0 +1,58 @@
+examples_data_SRC = \
+   examples/data/penny.mat
+
+octdata_DATA += \
+  $(examples_data_SRC)
+
+EXTRA_DIST += \
+  $(examples_data_SRC) \
+  examples/code/@FIRfilter/FIRfilter.m \
+  examples/code/@FIRfilter/FIRfilter_aggregation.m \
+  examples/code/@FIRfilter/display.m \
+  examples/code/@FIRfilter/subsasgn.m \
+  examples/code/@FIRfilter/subsref.m \
+  examples/code/@polynomial/display.m \
+  examples/code/@polynomial/double.m \
+  examples/code/@polynomial/end.m \
+  examples/code/@polynomial/get.m \
+  examples/code/@polynomial/mtimes.m \
+  examples/code/@polynomial/numel.m \
+  examples/code/@polynomial/plot.m \
+  examples/code/@polynomial/polynomial.m \
+  examples/code/@polynomial/polynomial_superiorto.m \
+  examples/code/@polynomial/polyval.m \
+  examples/code/@polynomial/roots.m \
+  examples/code/@polynomial/set.m \
+  examples/code/@polynomial/subsasgn.m \
+  examples/code/@polynomial/subsref.m \
+  examples/code/addtwomatrices.cc \
+  examples/code/celldemo.cc \
+  examples/code/embedded.cc \
+  examples/code/fortrandemo.cc \
+  examples/code/fortransub.f \
+  examples/code/funcdemo.cc \
+  examples/code/globaldemo.cc \
+  examples/code/helloworld.cc \
+  examples/code/make_int.cc \
+  examples/code/mex_demo.c \
+  examples/code/mycell.c \
+  examples/code/myfeval.c \
+  examples/code/myfevalf.f \
+  examples/code/myfunc.c \
+  examples/code/myhello.c \
+  examples/code/mypow2.c \
+  examples/code/myprop.c \
+  examples/code/myset.c \
+  examples/code/mysparse.c \
+  examples/code/mystring.c \
+  examples/code/mystruct.c \
+  examples/code/oct_demo.cc \
+  examples/code/oregonator.cc \
+  examples/code/oregonator.m \
+  examples/code/paramdemo.cc \
+  examples/code/standalone.cc \
+  examples/code/standalonebuiltin.cc \
+  examples/code/stringdemo.cc \
+  examples/code/structdemo.cc \
+  examples/code/unwinddemo.cc \
+  examples/module.mk