hi Stefano, Le 28 mars 2012 à 09:33, Stefano Lattarini a écrit :
> Hi Tim. Just a minor nit w.r.t. make portability ... > >> --- a/doc/local.mk >> +++ b/doc/local.mk >> @@ -124,7 +124,7 @@ DOXYGEN = doxygen >> doc: html >> >> html-local: doc/Doxyfile >> - $(AM_V_GEN) cd doc && $(DOXYGEN) >> + $(AM_V_GEN) $(DOXYGEN) $< >> > My understanding is that currently the bison build system strives to > be portable to non-GNU make implementations as well, in which case the > '$<' automatic variable should be considered unusable outside suffix > rules; you should spell out the target name explicitly. > > And now that I look, I see some other pre-existing dubious usages of > '$<' in the bison makefiles: > > examples/calc++/local.mk: $(AM_V_at)$(YACCCOMPILE) -o $*.cc $< > doc/local.mk: $(AM_V_GEN)$< --version >doc/bison.help.t > doc/local.mk: $(AM_V_at)$< --help >>doc/bison.help.t > tests/local.mk:## Leave testsuite.at first for the "testsuite" rule's $<. > tests/local.mk: $(AM_V_GEN)$(AUTOTEST) $(AUTOTESTFLAGS) $< -o [email protected] You are right, I have fixed these guys. But I'll be much happier with automake-ng :) I installed this. From 04c3e5d45cbd6d70223db50886d84fa55b49ec33 Mon Sep 17 00:00:00 2001 From: Akim Demaille <[email protected]> Date: Sun, 1 Apr 2012 14:27:23 +0200 Subject: [PATCH] build: don't rely on $< in non-pattern rules. * doc/local.mk, tests/local.mk: here. Reported by Stefano Lattarini. Prefer [email protected] for temporary files to become $@. --- doc/local.mk | 6 +++--- tests/local.mk | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/local.mk b/doc/local.mk index 513e548..4e92cdc 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -80,9 +80,9 @@ doc/refcard.ps: doc/refcard.dvi EXTRA_DIST += $(top_srcdir)/doc/bison.help MAINTAINERCLEANFILES += $(top_srcdir)/doc/bison.help $(top_srcdir)/doc/bison.help: src/bison$(EXEEXT) - $(AM_V_GEN)$< --version >doc/bison.help.t - $(AM_V_at)$< --help >>doc/bison.help.t - $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.t $@ + $(AM_V_GEN)src/bison$(EXEEXT) --version >[email protected] + $(AM_V_at) src/bison$(EXEEXT) --help >>[email protected] + $(AM_V_at)$(top_srcdir)/build-aux/move-if-change [email protected] $@ ## ----------- ## diff --git a/tests/local.mk b/tests/local.mk index 2cb1f3c..4f2ee52 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -40,7 +40,6 @@ $(top_srcdir)/tests/package.m4: $(top_srcdir)/configure ## Generate the test suite. ## ## ------------------------- ## -## Leave testsuite.at first for the "testsuite" rule's $<. TESTSUITE_AT = \ tests/testsuite.at \ \ @@ -71,7 +70,8 @@ TESTSUITE = $(top_srcdir)/tests/testsuite AUTOTEST = $(AUTOM4TE) --language=autotest AUTOTESTFLAGS = -I $(top_srcdir)/tests $(TESTSUITE): $(TESTSUITE_AT) - $(AM_V_GEN)$(AUTOTEST) $(AUTOTESTFLAGS) $< -o [email protected] + $(AM_V_GEN) \ + $(AUTOTEST) $(AUTOTESTFLAGS) $(srcdir)/tests/testsuite.at -o [email protected] $(AM_V_at)mv [email protected] $@ -- 1.7.9.5
