]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* m4/init.m4 (AM_INIT_AUTOMAKE): Add `_AM_DEPENDENCIES(OBJC)'
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 20 Mar 2006 20:31:29 +0000 (20:31 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 20 Mar 2006 20:31:29 +0000 (20:31 +0000)
to `AC_PROG_OBJC' if provided, to fix Objective C depmode
handling.
* lib/Automake/Variable.pm (%_ac_macro_for_var): Add entries for
OBJC and OBJCFLAGS.
* tests/ext.test: Adjust.
* tests/objc.test, tests/objc2.test: New tests.
* tests/Makefile.am: Adjust.
* doc/automake.texi (Objective C Support): New node.
(Support for Other Languages): Adjust.
* NEWS: Update.

12 files changed:
ChangeLog
NEWS
doc/automake.texi
doc/stamp-vti
doc/version.texi
lib/Automake/Variable.pm
m4/init.m4
tests/Makefile.am
tests/Makefile.in
tests/ext.test
tests/objc.test [new file with mode: 0755]
tests/objc2.test [new file with mode: 0755]

index 5082ae3fe5acc048ba3514e0ffd7d8b4e40b5c5e..1fe798cd9f51c1b1a039004198a308ed5225e779 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-03-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Add `_AM_DEPENDENCIES(OBJC)'
+       to `AC_PROG_OBJC' if provided, to fix Objective C depmode
+       handling.
+       * lib/Automake/Variable.pm (%_ac_macro_for_var): Add entries for
+       OBJC and OBJCFLAGS.
+       * tests/ext.test: Adjust.
+       * tests/objc.test, tests/objc2.test: New tests.
+       * tests/Makefile.am: Adjust.
+       * doc/automake.texi (Objective C Support): New node.
+       (Support for Other Languages): Adjust.
+       * NEWS: Update.
+
 2006-03-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * lib/Automake/RuleDef.pm (DESCRIPTION): Typo.
diff --git a/NEWS b/NEWS
index 83d6e0b0d523208fe6563bf3dbe51ccfee6cb302..70a30ec87d16ee6ef078042a4c8da0d768b96a57 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -97,6 +97,10 @@ New in 1.9a:
     `gnits' strictness.  This means automake will complain about %-rules
     or $(GNU Make functions) unless you switch to `foreign' strictness or
     use `-Wno-portability'.
+
+  - Improved support for Objective C:
+    - Autoconf's new AC_PROG_OBJC will enable automatic dependency tracking.
+    - A new section of the manual documents the support.
 \f
 New in 1.9:
 
index c9ffb9b20afa8d865668b6e1911d64de410baa2b..25d3585701839dffd81b631d99f650b7be427748 100644 (file)
@@ -171,6 +171,7 @@ Building Programs and Libraries
 * Program variables::           Variables used when building a program
 * Yacc and Lex::                Yacc and Lex support
 * C++ Support::                 Compiling C++ sources
+* Objective C Support::         Compiling Objective C sources
 * Assembly Support::            Compiling assembly sources
 * Fortran 77 Support::          Compiling Fortran 77 sources
 * Fortran 9x Support::          Compiling Fortran 9x sources
@@ -1532,6 +1533,10 @@ Autoconf Manual}.
 This is required if any C++ source is included.  @xref{Particular
 Programs, , Particular Program Checks, autoconf, The Autoconf Manual}.
 
+@item AC_PROG_OBJC
+This is required if any Objective C source is included.  @xref{Particular
+Programs, , Particular Program Checks, autoconf, The Autoconf Manual}.
+
 @item AC_PROG_F77
 This is required if any Fortran 77 source is included.  This macro is
 distributed with Autoconf version 2.13 and later.  @xref{Particular
@@ -3063,6 +3068,7 @@ to build programs and libraries.
 * Program variables::           Variables used when building a program
 * Yacc and Lex::                Yacc and Lex support
 * C++ Support::                 Compiling C++ sources
+* Objective C Support::         Compiling Objective C sources
 * Assembly Support::            Compiling assembly sources
 * Fortran 77 Support::          Compiling Fortran 77 sources
 * Fortran 9x Support::          Compiling Fortran 9x sources
@@ -4675,6 +4681,41 @@ The command used to actually link a C++ program.
 @end vtable
 
 
+@node Objective C Support
+@section Objective C Support
+
+@cindex Objective C support
+@cindex Support for Objective C
+
+Automake includes some support for Objective C.
+
+Any package including Objective C code must define the output variable
+@code{OBJC} in @file{configure.ac}; the simplest way to do this is to use
+the @code{AC_PROG_OBJC} macro (@pxref{Particular Programs, , Particular
+Program Checks, autoconf, The Autoconf Manual}).
+
+A few additional variables are defined when an Objective C source file
+is seen:
+
+@vtable @code
+@item OBJC
+The name of the Objective C compiler.
+
+@item OBJCFLAGS
+Any flags to pass to the Objective C compiler.
+
+@item AM_OBJCFLAGS
+The maintainer's variant of @code{OBJCFLAGS}.
+
+@item OBJCCOMPILE
+The command used to actually compile a Objective C source file.  The
+file name is appended to form the complete command line.
+
+@item OBJCLINK
+The command used to actually link a Objective C program.
+@end vtable
+
+
 @node Assembly Support
 @section Assembly Support
 
@@ -5040,8 +5081,8 @@ the @code{_LDFLAGS} variable for the program.
 @section Support for Other Languages
 
 Automake currently only includes full support for C, C++ (@pxref{C++
-Support}), Fortran 77 (@pxref{Fortran 77 Support}),
-Fortran 9x (@pxref{Fortran 9x Support}),
+Support}), Objective C (@pxref{Objective C Support}), Fortran 77
+(@pxref{Fortran 77 Support}), Fortran 9x (@pxref{Fortran 9x Support}),
 and Java (@pxref{Java Support}).  There is only rudimentary support for other
 languages, support for which will be improved based on user demand.
 
index 78ae39268770eaf6e6d1ec11af55dc0ffe064ee5..c34e90abdb53941023e73ea280b0638127e403c3 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 10 March 2006
+@set UPDATED 20 March 2006
 @set UPDATED-MONTH March 2006
 @set EDITION 1.9a
 @set VERSION 1.9a
index 78ae39268770eaf6e6d1ec11af55dc0ffe064ee5..c34e90abdb53941023e73ea280b0638127e403c3 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 10 March 2006
+@set UPDATED 20 March 2006
 @set UPDATED-MONTH March 2006
 @set EDITION 1.9a
 @set VERSION 1.9a
index 059456c4847bd2954f43dd97fe69a3c585c66473..49cd2a1433d5aca293f24c87f36be61fc228501b 100644 (file)
@@ -177,6 +177,8 @@ my %_ac_macro_for_var =
    F77FLAGS => 'AC_PROG_F77',
    FC => 'AC_PROG_FC',
    FCFLAGS => 'AC_PROG_FC',
+   OBJC => 'AC_PROG_OBJC',
+   OBJCFLAGS => 'AC_PROG_OBJC',
    RANLIB => 'AC_PROG_RANLIB',
    YACC => 'AC_PROG_YACC',
    );
index 7b0258263f2f6e3af0dd8ae99a9180fae6635b67..34fa71681f8809aadf344b300a1ca17beac265df 100644 (file)
@@ -88,6 +88,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
                   [_AM_DEPENDENCIES(CXX)],
                   [define([AC_PROG_CXX],
                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+                  [_AM_DEPENDENCIES(OBJC)],
+                  [define([AC_PROG_OBJC],
+                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
 ])
 
index 5b665feaf0f594dffdb30e6d3a8eebfcf3e10d0c..ebac26407b71b7ac6a16f5027ba9f63b671d1d43 100644 (file)
@@ -373,6 +373,8 @@ noinstdir.test \
 nolink.test \
 nostdinc.test \
 number.test \
+objc.test \
+objc2.test \
 obsolete.test \
 order.test \
 outdir.test \
index dea192aeb7c5bc1e2ee7e71e602ee96d7b245f82..6c7a2915d03d8a9a914d0b7ea80b6575c34f2ed5 100644 (file)
@@ -111,56 +111,56 @@ TESTS = aclibobj.test aclocal.test aclocal3.test aclocal4.test \
        multlib.test nobase.test nodef.test nodef2.test nodep.test \
        nodepcomp.test nodist.test nodist2.test nodist3.test \
        nogzip.test nogzip2.test noinst.test noinstdir.test \
-       nolink.test nostdinc.test number.test obsolete.test order.test \
-       outdir.test output.test output2.test output3.test output4.test \
-       output5.test output6.test output7.test output8.test \
-       output9.test output10.test output11.test output12.test \
-       overrid.test parse.test percent.test percent2.test phony.test \
-       pluseq.test pluseq2.test pluseq3.test pluseq4.test \
-       pluseq5.test pluseq6.test pluseq7.test pluseq8.test \
-       pluseq9.test pluseq10.test postproc.test ppf77.test pr2.test \
-       pr9.test pr72.test pr87.test pr204.test pr211.test pr220.test \
-       pr224.test pr229.test pr243.test pr266.test pr279.test \
-       pr279-2.test pr287.test pr300-lib.test pr300-ltlib.test \
-       pr300-prog.test pr307.test pr401.test pr401b.test pr401c.test \
-       prefix.test primary.test primary2.test primary3.test \
-       proginst.test python.test python2.test python3.test \
-       python4.test python5.test python6.test python7.test \
-       python8.test python9.test python10.test python11.test \
-       python12.test recurs.test recurs2.test remake.test \
-       remake2.test remake3.test remake4.test remake5.test regex.test \
-       req.test reqd.test reqd2.test rulepat.test scripts.test \
-       seenc.test sinclude.test srcsub.test srcsub2.test space.test \
-       specflg.test specflg2.test specflg3.test specflg6.test \
-       specflg7.test specflg8.test specflg9.test spell.test \
-       spell2.test spell3.test spelling.test spy.test stamph2.test \
-       stdlib.test stdlib2.test strip.test subdir.test subdir2.test \
-       subdir3.test subdir4.test subdir5.test subdir6.test \
-       subdir7.test subdir8.test subdir9.test subdirbuiltsources.test \
-       subcond.test subcond2.test subcond3.test subobj.test \
-       subobj2.test subobj3.test subobj4.test subobj5.test \
-       subobj6.test subobj7.test subobj8.test subobj9.test \
-       subobjname.test subpkg.test subpkg2.test subpkg3.test \
-       subst.test subst2.test substref.test substre2.test \
-       substtarg.test suffix.test suffix2.test suffix3.test \
-       suffix4.test suffix5.test suffix6.test suffix7.test \
-       suffix8.test suffix9.test suffix10.test suffix11.test \
-       symlink.test symlink2.test symlink3.test syntax.test tags.test \
-       tagsub.test tar.test tar2.test tar3.test target-cflags.test \
-       targetclash.test txinfo.test txinfo2.test txinfo3.test \
-       txinfo4.test txinfo5.test txinfo6.test txinfo7.test \
-       txinfo8.test txinfo9.test txinfo10.test txinfo13.test \
-       txinfo16.test txinfo17.test txinfo18.test txinfo19.test \
-       txinfo20.test txinfo21.test txinfo22.test txinfo23.test \
-       txinfo24.test txinfo25.test txinfo26.test txinfo27.test \
-       txinfo28.test txinfo29.test txinfo30.test transform.test \
-       unused.test vars.test vars3.test vartar.test version.test \
-       version2.test version3.test version4.test version6.test \
-       version7.test version8.test vpath.test vtexi.test vtexi2.test \
-       warnopts.test werror.test werror2.test whoami.test \
-       xsource.test yacc.test yacc2.test yacc3.test yacc4.test \
-       yacc5.test yacc6.test yacc7.test yacc8.test yaccpp.test \
-       yaccvpath.test
+       nolink.test nostdinc.test number.test objc.test objc2.test \
+       obsolete.test order.test outdir.test output.test output2.test \
+       output3.test output4.test output5.test output6.test \
+       output7.test output8.test output9.test output10.test \
+       output11.test output12.test overrid.test parse.test \
+       percent.test percent2.test phony.test pluseq.test pluseq2.test \
+       pluseq3.test pluseq4.test pluseq5.test pluseq6.test \
+       pluseq7.test pluseq8.test pluseq9.test pluseq10.test \
+       postproc.test ppf77.test pr2.test pr9.test pr72.test pr87.test \
+       pr204.test pr211.test pr220.test pr224.test pr229.test \
+       pr243.test pr266.test pr279.test pr279-2.test pr287.test \
+       pr300-lib.test pr300-ltlib.test pr300-prog.test pr307.test \
+       pr401.test pr401b.test pr401c.test prefix.test primary.test \
+       primary2.test primary3.test proginst.test python.test \
+       python2.test python3.test python4.test python5.test \
+       python6.test python7.test python8.test python9.test \
+       python10.test python11.test python12.test recurs.test \
+       recurs2.test remake.test remake2.test remake3.test \
+       remake4.test remake5.test regex.test req.test reqd.test \
+       reqd2.test rulepat.test scripts.test seenc.test sinclude.test \
+       srcsub.test srcsub2.test space.test specflg.test specflg2.test \
+       specflg3.test specflg6.test specflg7.test specflg8.test \
+       specflg9.test spell.test spell2.test spell3.test spelling.test \
+       spy.test stamph2.test stdlib.test stdlib2.test strip.test \
+       subdir.test subdir2.test subdir3.test subdir4.test \
+       subdir5.test subdir6.test subdir7.test subdir8.test \
+       subdir9.test subdirbuiltsources.test subcond.test \
+       subcond2.test subcond3.test subobj.test subobj2.test \
+       subobj3.test subobj4.test subobj5.test subobj6.test \
+       subobj7.test subobj8.test subobj9.test subobjname.test \
+       subpkg.test subpkg2.test subpkg3.test subst.test subst2.test \
+       substref.test substre2.test substtarg.test suffix.test \
+       suffix2.test suffix3.test suffix4.test suffix5.test \
+       suffix6.test suffix7.test suffix8.test suffix9.test \
+       suffix10.test suffix11.test symlink.test symlink2.test \
+       symlink3.test syntax.test tags.test tagsub.test tar.test \
+       tar2.test tar3.test target-cflags.test targetclash.test \
+       txinfo.test txinfo2.test txinfo3.test txinfo4.test \
+       txinfo5.test txinfo6.test txinfo7.test txinfo8.test \
+       txinfo9.test txinfo10.test txinfo13.test txinfo16.test \
+       txinfo17.test txinfo18.test txinfo19.test txinfo20.test \
+       txinfo21.test txinfo22.test txinfo23.test txinfo24.test \
+       txinfo25.test txinfo26.test txinfo27.test txinfo28.test \
+       txinfo29.test txinfo30.test transform.test unused.test \
+       vars.test vars3.test vartar.test version.test version2.test \
+       version3.test version4.test version6.test version7.test \
+       version8.test vpath.test vtexi.test vtexi2.test warnopts.test \
+       werror.test werror2.test whoami.test xsource.test yacc.test \
+       yacc2.test yacc3.test yacc4.test yacc5.test yacc6.test \
+       yacc7.test yacc8.test yaccpp.test yaccvpath.test
 subdir = tests
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
        $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in
index 869cbdde4096278b21cb30f8cbd5c10b09a77e38..5e54aa502cbd77b4b503555ff542aa88b3ea05ab 100755 (executable)
@@ -25,8 +25,7 @@
 cat >> configure.in << 'END'
 AC_PROG_F77
 AC_PROG_FC
-_AM_DEPENDENCIES(OBJC)
-AC_SUBST(OBJC)
+AC_PROG_OBJC
 END
 
 cat > Makefile.am << 'END'
diff --git a/tests/objc.test b/tests/objc.test
new file mode 100755 (executable)
index 0000000..73b885b
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2001, 2002, 2006  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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, or (at your option)
+# any later version.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test that `.m' extension works.
+# From Ralf Corsepius (for C++).
+
+. ./defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_OBJC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = hello
+hello_SOURCES = hello.m
+END
+
+$ACLOCAL || exit 1
+$AUTOMAKE || exit 1
+
+grep '^\.SUFFIXES:.*\.m' Makefile.in
diff --git a/tests/objc2.test b/tests/objc2.test
new file mode 100755 (executable)
index 0000000..747ff76
--- /dev/null
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2002, 2003, 2006  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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, or (at your option)
+# any later version.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test that Automake suggests using AC_PROG_OBJC if Objective C sources
+# are used.
+
+. ./defs || exit 1
+
+set -e
+
+echo AC_PROG_CC >>configure.in
+
+cat >Makefile.am <<'END'
+bin_PROGRAMS = hello
+hello_SOURCES = hello.m
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep AC_PROG_OBJC stderr