[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, experimental/suffix-rules-m
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, experimental/suffix-rules-mutilation, created. v1.12-326-g3852615 |
Date: |
Sat, 26 May 2012 11:39:00 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=385261531351cddfda47fd71c856e077c1a2a819
The branch, experimental/suffix-rules-mutilation has been created
at 385261531351cddfda47fd71c856e077c1a2a819 (commit)
- Log -----------------------------------------------------------------
commit 385261531351cddfda47fd71c856e077c1a2a819
Author: Stefano Lattarini <address@hidden>
Date: Sat May 26 11:39:29 2012 +0200
suffixes: remove Automake-time chaining of suffix rules
For any file listed in a _SOURCES variable whose suffix is not recognized
internally by automake (as, say, '.c' or '.f90' or '.h++' are), it will now
be assumed that the user has defined an explicit or a suffix rule which can
turn that file into a corresponding object file (same basename, but with a
'.$(OBJEXT)' suffix if it built as part of a program or a static library,
and with a '.lo' suffix if it is built as part of a libtool library). For
example, on an input like:
bin_PROGRAMS = foo
lib_LTLIBRARIES = libbar.la
foo_SOURCES = mu.ext1 fu.ext1
libbar_la_SOURCES = zap.ext2
automake will expect that the two "plain" object 'mu.$(OBJEXT)' and
'fu.$(OBJEXT)' are to be used in the linking of the 'foo' program, that
a libtool object 'zap.lo' is to be used in the linking of the 'libbar.la'
libtool library, *and* that the user has provided proper declarations for
those objects to be built at make time. Here is an example of how such
declarations cold look like:
%.$(OBJEXT): %.ext2
my-compiler --static -c -o $@ $<
%.lo: %.ext2
my-compiler --dynamic -c -o $@ $<
# We need to compile mu with debugging enabled.
mu.$(OBJEXT): mu.ext1
my-compiler --static -DDEBUG=1 -c -o $@ $<
A first consequence of this is that one can't use "headers" with extensions
unrecognized to Automake anymore; for example, this:
%.h: %.my-hdr
$(preprocess-header) $< >$@
foo_SOURCES = foo.c foo.my-hdr
BUILT_SOURCES = foo.h
will cause the generated Makefile to die on "make all" like this:
XXX
Another, more important consequence
This means that more help and verbosity from the user will be required,
in case the generation.
But it also mean we have to perform less magic and less Automake-time
preprocessing, and doing so is one of the main purposes of Automake-NG.
As a more complex example, usages like this:
%.cc: %.zoo
$(preprocess-source) $< >$@
%.h++: %.my-hdr
$(preprocess-header) $< >$@
prog_SOURCES = foo.zoo bar.cc baz.h++
BUILT_SOURCES = baz.h++
should be converted to read something like this now:
XXX
XXX
Signed-off-by: Stefano Lattarini <address@hidden>
commit f7f58282c27cc4daf5f68e510d0ad9b322a81b0d
Author: Stefano Lattarini <address@hidden>
Date: Fri May 25 20:43:38 2012 +0200
[ng] build: use more GNU make features in our Makefile.am
Mostly to show that we can do so without upsetting Automake-NG.
* Makefile.am (do_subst): Remove some code duplication through the use of
the $(foreach) builtin, and take advantage of GNU make automatic variables
to require less boilerplate in the callers.
* All its callers: Adjusted.
(EXTRA_DIST): Remove some code duplication through the use of and the
$(addprefix) builtin. Since we are at it, remove some erroneously
duplicated entries (probably resulting from a botched merge).
(bin_SCRIPTS): Rewrite in function of $(AUTOMAKESOURCES), using the
$(basename) builtin.
(man1_MANS): Split contents into ...
(versioned_mans, unversioned_mans): ... these two variables.
(doc/aclocal-$(APIVERSION).1, doc/automake-$(APIVERSION).1): Rewrite
common rules using GNU make static pattern rules.
(automake, aclocal): Likewise.
(installcheck-executable-scripts): Take more advantage of GNU make
builtins in the recipe.
(install-data-hook): Likewise.
(doc/aclocal.1, doc/automake.1): Likewise. Consequently ...
(update_mans): ... remove this variable, now unneeded.
($(top_srcdir)/m4/amversion.m4): Renamed ...
($(srcdir)/m4/amversion.m4): ... to this. Since we are in a non-recursive
setup, $(srcdir) and $(top_srcdir) are the same; and according to the
comments, the use of $(top_srcdir) in this target was only needed to avoid
confusing some non-GNU make implementation.
($(srcdir)/autodeps.am): Fix a typo in the target name, renaming it ...
($(srcdir)/testsuite-autodeps.am): ... to this. Use GNU make automatic
variables to avoid some verbosity in the recipe. And fix a typo in
comments while we are at it.
Signed-off-by: Stefano Lattarini <address@hidden>
-----------------------------------------------------------------------
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, experimental/suffix-rules-mutilation, created. v1.12-326-g3852615,
Stefano Lattarini <=