+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.
`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:
* 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
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
* 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
@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
@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.
-@set UPDATED 10 March 2006
+@set UPDATED 20 March 2006
@set UPDATED-MONTH March 2006
@set EDITION 1.9a
@set VERSION 1.9a
-@set UPDATED 10 March 2006
+@set UPDATED 20 March 2006
@set UPDATED-MONTH March 2006
@set EDITION 1.9a
@set VERSION 1.9a
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',
);
[_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
])
])
nolink.test \
nostdinc.test \
number.test \
+objc.test \
+objc2.test \
obsolete.test \
order.test \
outdir.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
cat >> configure.in << 'END'
AC_PROG_F77
AC_PROG_FC
-_AM_DEPENDENCIES(OBJC)
-AC_SUBST(OBJC)
+AC_PROG_OBJC
END
cat > Makefile.am << 'END'
--- /dev/null
+#! /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
--- /dev/null
+#! /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