summaryrefslogtreecommitdiffstats
path: root/cli_classic.c
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-08-18 02:27:19 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-08-18 02:27:19 +0000
commit56787086e3c1f5a33e0d6296818dd36951217db7 (patch)
tree5bebe4b4f1f55658769b815efb13303899ad96c3 /cli_classic.c
parent33670ba5c4829a5ce1b6a3a5edeb2c9661207180 (diff)
downloadast2050-flashrom-56787086e3c1f5a33e0d6296818dd36951217db7.zip
ast2050-flashrom-56787086e3c1f5a33e0d6296818dd36951217db7.tar.gz
Makefile: fix and simplify test program compilations
This was totally broken due to the make's shell function's temporal behavior. quote from the gnu make documentation (http://www.gnu.org/s/hello/manual/make/Shell-Function.html): "The commands run by calls to the shell function are run when the function calls are expanded" we have used the shell function to echo the test programs to a file. the file name used was equal for all tests and was overwritten for each test. the result was that all tests (in a single target?) used the last test program because the echoing of the test programs was done before all test compilations(!) see my mail for details: http://lists.gnu.org/archive/html/bug-make/2011-08/msg00010.html also the branching for testing ifeq ($(CONFIG_FT2232_SPI), yes) was unnecessarily complicated. in my approach here i am using verbatim variables (allows to define even complex test programs in the makefile without jumping through hoops) that get exported to environment variables (via "export", reference afterwards with "$$<varname>"). i have also added the missing redirection of stderr to the compiler test and changed the definition of ARCH to use simple expansion (:=). the latter is still wrong, because it uses $(CC) before we check if a compiler is installed... makes the compiler check pretty much useless. The simple expansion just reduces the number of errors printed to 1. Corresponding to flashrom svn r1416. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'cli_classic.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud