Message ID | 20190312150538.11449-2-christian.storm@siemens.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] Makefile: SWDESCRIPTION sanity check | expand |
On 12/03/19 16:05, Christian Storm wrote: > Just like the SWDESCRIPTION sanity check, check for a non-empty > CONFIG_EXTPARSERNAME if CONFIG_SETEXTPARSERNAME it set. If not, > the external parser script cannot be loaded at run-time. Hence, > fail early at compile-time. > > Signed-off-by: Christian Storm <christian.storm@siemens.com> > --- > Makefile | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/Makefile b/Makefile > index 1589bf6..6f1f509 100644 > --- a/Makefile > +++ b/Makefile > @@ -383,6 +383,10 @@ cfg-sanity-check: > echo "ERROR: CONFIG_SETSWDESCRIPTION set but not CONFIG_SWDESCRIPTION"; \ > exit 1; \ > fi > + @if [ "x$(CONFIG_SETEXTPARSERNAME)" = "xy" -a -z "$(patsubst "%",%,$(strip $(CONFIG_EXTPARSERNAME)))" ]; then \ > + echo "ERROR: CONFIG_SETEXTPARSERNAME set but not CONFIG_EXTPARSERNAME"; \ > + exit 1; \ > + fi > > all: swupdate ${tools-bins} ${lua_swupdate} > > Applied to -master, thanks ! Best regards, Stefano Babic
diff --git a/Makefile b/Makefile index 1589bf6..6f1f509 100644 --- a/Makefile +++ b/Makefile @@ -383,6 +383,10 @@ cfg-sanity-check: echo "ERROR: CONFIG_SETSWDESCRIPTION set but not CONFIG_SWDESCRIPTION"; \ exit 1; \ fi + @if [ "x$(CONFIG_SETEXTPARSERNAME)" = "xy" -a -z "$(patsubst "%",%,$(strip $(CONFIG_EXTPARSERNAME)))" ]; then \ + echo "ERROR: CONFIG_SETEXTPARSERNAME set but not CONFIG_EXTPARSERNAME"; \ + exit 1; \ + fi all: swupdate ${tools-bins} ${lua_swupdate}
Just like the SWDESCRIPTION sanity check, check for a non-empty CONFIG_EXTPARSERNAME if CONFIG_SETEXTPARSERNAME it set. If not, the external parser script cannot be loaded at run-time. Hence, fail early at compile-time. Signed-off-by: Christian Storm <christian.storm@siemens.com> --- Makefile | 4 ++++ 1 file changed, 4 insertions(+)