[PATCH 1/2] Enable subdir-objects automake option

Filipe Brandenburger <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
This prevents the following warning when running automake:

  Makefile.am:248: warning: source file 'testsuite/libdejagnu/unit.cc' is in a subdirectory,
  Makefile.am:248: but option 'subdir-objects' is disabled
  automake: warning: possible forward-incompatibility.
  automake: At least a source file is in a subdirectory, but the 'subdir-objects'
  automake: automake option hasn't been enabled.  For now, the corresponding output
  automake: object file(s) will be placed in the top-level directory.  However,
  automake: this behaviour will change in future Automake versions: they will
  automake: unconditionally cause object files to be placed in the same subdirectory
  automake: of the corresponding sources.
  automake: You are advised to start using 'subdir-objects' option throughout your
  automake: project, to avoid future incompatibilities.

This option only affects unit.o -> testsuite/libdejagnu/unit.o which is
built while running `make check`.

While at it, also add requirement for automake 1.14 which is the one
being used to generate the Makefile.in that is being checked into git.

Tested by running `make check` and confirming that unit.o is no longer
generated at the top level and that otherwise the tests keep working.
Confirmed that `make distcheck` is also still working.

Signed-off-by: Filipe Brandenburger <[email protected]>
---
 ChangeLog    |  5 +++++
 Makefile.in  | 50 +++++++++++++++++++++++---------------------------
 configure.ac |  2 +-
 3 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b676abdcd345..308b81bb20a9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-16  Filipe Brandenburger  <[email protected]>
+
+	* Makefile.am: Enable subdir-objects, require automake 1.14
+	* Makefile.in: Regenerate.
+
 2015-05-15  Filipe Brandenburger  <[email protected]>
 
 	* doc/dejagnu.xml: Fix typos such as stray }'s and @samp{...},
diff --git a/Makefile.in b/Makefile.in
index 52994a748c14..24b048f05e73 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -114,7 +114,8 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
 mkinstalldirs = $(install_sh) -d
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-am_unit_OBJECTS = unit.$(OBJEXT)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_unit_OBJECTS = testsuite/libdejagnu/unit.$(OBJEXT)
 unit_OBJECTS = $(am_unit_OBJECTS)
 unit_LDADD = $(LDADD)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -165,10 +166,6 @@ DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 am__mv = mv -f
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 = 
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 AM_V_CXX = $(am__v_CXX_@AM_V@)
@@ -212,7 +209,6 @@ AM_V_texidevnull = $(am__v_texidevnull_@AM_V@)
 am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@)
 am__v_texidevnull_0 = > /dev/null
 am__v_texidevnull_1 = 
-am__dirstamp = $(am__leading_dot)dirstamp
 INFO_DEPS = $(srcdir)/doc/dejagnu.info
 am__TEXINFO_TEX_DIR = $(srcdir)
 DVIS = doc/dejagnu.dvi
@@ -633,6 +629,15 @@ $(am__aclocal_m4_deps):
 
 clean-checkPROGRAMS:
 	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+testsuite/libdejagnu/$(am__dirstamp):
+	@$(MKDIR_P) testsuite/libdejagnu
+	@: > testsuite/libdejagnu/$(am__dirstamp)
+testsuite/libdejagnu/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) testsuite/libdejagnu/$(DEPDIR)
+	@: > testsuite/libdejagnu/$(DEPDIR)/$(am__dirstamp)
+testsuite/libdejagnu/unit.$(OBJEXT):  \
+	testsuite/libdejagnu/$(am__dirstamp) \
+	testsuite/libdejagnu/$(DEPDIR)/$(am__dirstamp)
 
 unit$(EXEEXT): $(unit_OBJECTS) $(unit_DEPENDENCIES) $(EXTRA_unit_DEPENDENCIES) 
 	@rm -f unit$(EXEEXT)
@@ -710,39 +715,28 @@ uninstall-djlibexecSCRIPTS:
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
+	-rm -f testsuite/libdejagnu/*.$(OBJEXT)
 
 distclean-compile:
 	-rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@testsuite/libdejagnu/$(DEPDIR)/unit.Po@am__quote@
 
 .cc.o:
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
 
 .cc.obj:
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-unit.o: testsuite/libdejagnu/unit.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT unit.o -MD -MP -MF $(DEPDIR)/unit.Tpo -c -o unit.o `test -f 'testsuite/libdejagnu/unit.cc' || echo '$(srcdir)/'`testsuite/libdejagnu/unit.cc
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/unit.Tpo $(DEPDIR)/unit.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='testsuite/libdejagnu/unit.cc' object='unit.o' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o unit.o `test -f 'testsuite/libdejagnu/unit.cc' || echo '$(srcdir)/'`testsuite/libdejagnu/unit.cc
-
-unit.obj: testsuite/libdejagnu/unit.cc
-@am__fastdepCXX_TRUE@	$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT unit.obj -MD -MP -MF $(DEPDIR)/unit.Tpo -c -o unit.obj `if test -f 'testsuite/libdejagnu/unit.cc'; then $(CYGPATH_W) 'testsuite/libdejagnu/unit.cc'; else $(CYGPATH_W) '$(srcdir)/testsuite/libdejagnu/unit.cc'; fi`
-@am__fastdepCXX_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/unit.Tpo $(DEPDIR)/unit.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='testsuite/libdejagnu/unit.cc' object='unit.obj' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o unit.obj `if test -f 'testsuite/libdejagnu/unit.cc'; then $(CYGPATH_W) 'testsuite/libdejagnu/unit.cc'; else $(CYGPATH_W) '$(srcdir)/testsuite/libdejagnu/unit.cc'; fi`
 doc/$(am__dirstamp):
 	@$(MKDIR_P) doc
 	@: > doc/$(am__dirstamp)
@@ -1311,6 +1305,8 @@ distclean-generic:
 	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
 	-rm -f doc/$(am__dirstamp)
+	-rm -f testsuite/libdejagnu/$(DEPDIR)/$(am__dirstamp)
+	-rm -f testsuite/libdejagnu/$(am__dirstamp)
 	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
 maintainer-clean-generic:
@@ -1323,7 +1319,7 @@ clean-am: clean-aminfo clean-checkPROGRAMS clean-generic \
 
 distclean: distclean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-	-rm -rf ./$(DEPDIR)
+	-rm -rf testsuite/libdejagnu/$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-DEJAGNU distclean-compile \
 	distclean-generic distclean-tags
@@ -1464,7 +1460,7 @@ installcheck-am:
 maintainer-clean: maintainer-clean-am
 	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
 	-rm -rf $(top_srcdir)/autom4te.cache
-	-rm -rf ./$(DEPDIR)
+	-rm -rf testsuite/libdejagnu/$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-aminfo \
 	maintainer-clean-generic
diff --git a/configure.ac b/configure.ac
index 70ea257067c3..6f441137f687 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ dnl Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
 
 AC_PREREQ(2.50)
 AC_INIT([GNU DejaGnu], 1.5.1, [[email protected]])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE([1.14 subdir-objects])
 AM_MAINTAINER_MODE
 AC_PROG_MAKE_SET
 
-- 
2.2.0.rc0.207.ga3a616c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.