>From 9ab88f21c376e768163b963edc36bbe087f4b378 Mon Sep 17 00:00:00 2001 From: Peter Rosin <p...@lysator.liu.se> Date: Mon, 30 Jan 2012 12:31:12 +0100 Subject: [PATCH 4/4] tests: do not assume the object file extension is .o
tests/specflg7.test: Dig out the object file extension from the OBJEXT makefile variable. tests/specflg8.test: Likewise. tests/substref.test: Likewise. tests/suffix8.tap: Add a chain rule for the case where the object file extension is .obj. --- tests/specflg7.test | 7 ++++--- tests/specflg8.test | 7 ++++--- tests/substref.test | 5 +++-- tests/suffix8.tap | 4 +++- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/tests/specflg7.test b/tests/specflg7.test index 60c1a9d..1ee9a2a 100755 --- a/tests/specflg7.test +++ b/tests/specflg7.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2011, 2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -57,7 +57,8 @@ $AUTOMAKE -a $MAKE ./true | grep true ./false | grep false -test -f ./t-false.o -test -f ./f-false.o +objext=`sed -n -e 's/^OBJEXT = //p' < Makefile` +test -f ./t-false.$objext +test -f ./f-false.$objext : diff --git a/tests/specflg8.test b/tests/specflg8.test index 18527ed..4b46e86 100755 --- a/tests/specflg8.test +++ b/tests/specflg8.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2011, 2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -57,7 +57,8 @@ $MAKE ./true ./false && Exit 1 -test -f ./true-true.o -test -f ./true-true.o +objext=`sed -n -e 's/^OBJEXT = //p' < Makefile` +test -f ./true-true.$objext +test -f ./true-true.$objext : diff --git a/tests/substref.test b/tests/substref.test index 8154496..7b30423 100755 --- a/tests/substref.test +++ b/tests/substref.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2010, 2011, 2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,8 @@ $AUTOMAKE -a ./configure -echo dlmain.c dlmain.o >exp +objext=`sed -n -e 's/^OBJEXT = //p' < Makefile` +echo dlmain.c dlmain.$objext >exp $MAKE got cat got diff exp got diff --git a/tests/suffix8.tap b/tests/suffix8.tap index 8a819a9..8cf90d2 100755 --- a/tests/suffix8.tap +++ b/tests/suffix8.tap @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2003, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2010, 2011, 2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -47,6 +47,8 @@ libfoo_la_SOURCES = bar.x_ cp `test -f '$<' || echo $(srcdir)/`$< $@ .y_.o: cp `test -f '$<' || echo $(srcdir)/`$< $@ +.y_.obj: + cp `test -f '$<' || echo $(srcdir)/`$< $@ .y_.z_: cp `test -f '$<' || echo $(srcdir)/`$< $@ .z_.lo: -- 1.7.5.1