numam-dpdk/mk/internal
Adrien Mazarguil 527f2cb8a3 mk: fix command-line dependency check for quoted strings
Before recompiling a file, rte.compile-pre.mk checks whether the command
line is different from the previous one.

This is done by storing for each object file the entire command line in a
kind of dependency file with a .cmd extension (see obj2cmd). If that file
exists, the line is retrieved first and compared against $(C_TO_O_STR).
The object file gets recompiled if the file doesn't exist or if the line
is different.

The problem is that sometimes, files are recompiled for no apparent reason.

The check doesn't work properly when a command line contains double-quoted
strings such as -DFOO='"bar"' because the shell interprets and strips them.
This is fixed by protecting C_TO_O_CMD with simple quotes, knowing that
such quotes are already escaped in C_TO_O_STR.

Moreover, because simple quotes are escaped in C_TO_O_STR, the retrieved
command should be compared against C_TO_O instead.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2014-02-26 11:01:13 +01:00
..
rte.build-post.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
rte.build-pre.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
rte.clean-post.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
rte.clean-pre.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
rte.compile-post.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
rte.compile-pre.mk mk: fix command-line dependency check for quoted strings 2014-02-26 11:01:13 +01:00
rte.depdirs-post.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
rte.depdirs-pre.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
rte.install-post.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00
rte.install-pre.mk update Intel copyright years to 2014 2014-02-25 21:29:14 +01:00