[docker] Fix wrong dependency in build target 00/900/2
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 30 May 2019 12:57:13 +0000 (15:57 +0300)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Thu, 30 May 2019 13:32:14 +0000 (16:32 +0300)
commit555ff3c04c0a6344e2cf91e7923694801175b9bd
tree2ed04ebec8c5b253eded3265d4746cb63a10a5a8
parentfd66f87da2126736bb80ee3c3ffbde0e37eac15b
[docker] Fix wrong dependency in build target

Previously, we relied on the '$<' Makefile automatic variable to
determine the directory where a certain build target should run.
Although this worked for a single container (as '$<' expands to
the *first* dependency of the make target), it causes issues when
multiple subdirectories are present, since all but the first
target will have '$<' pointing to the same first subdirectory.

Instead, switch to using '$@' which always expands to the current
make target and perform some simple string manipulation to extract
the proper target directory where the build should occur.

JIRA: VAL-27

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Change-Id: Id8448c6feffb04dc14c8cd1c3d362f1d2934fd24
docker/Makefile