[XS] Change in osmo-mgw[master]: mgcp_client: generate mgcp_common.h banner with printf
Andrei G has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email ) Change subject: mgcp_client: generate mgcp_common.h banner with printf ...................................................................... mgcp_client: generate mgcp_common.h banner with printf The rule in include/osmocom/mgcp_client/Makefile.am that copies <osmocom/mgcp/mgcp_common.h> into the mgcp_client include directory writes its banner with "echo -e". The -e option is a bash extension. Shells whose echo follows the XSI convention expand the backslash escapes on their own and do not take options, so -e is passed through as the first argument to print. The generated header then starts with -e /* and every file that includes it fails to compile: mgcp_common.h:1:2: error: unknown type name 'e' Measured on macOS, where /bin/sh is bash invoked as sh: the escapes are expanded as intended, but the leading "-e " is printed literally. Any shell with an XSI-style echo, dash among them, behaves the same way. The build only works where /bin/sh accepts -e. Replace it with printf and one argument per line. printf is POSIX, takes no such option, and produces the same seven lines on every shell. Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5 Signed-off-by: Andrei Gosman <andrei.gosman@gmail.com> --- M include/osmocom/mgcp_client/Makefile.am 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/76/43576/1 diff --git a/include/osmocom/mgcp_client/Makefile.am b/include/osmocom/mgcp_client/Makefile.am index 7415142..5374dc5 100644 --- a/include/osmocom/mgcp_client/Makefile.am +++ b/include/osmocom/mgcp_client/Makefile.am @@ -9,7 +9,7 @@ $(NULL) mgcp_common.h: $(top_srcdir)/include/osmocom/mgcp/mgcp_common.h - echo -e "/*\n\n DO NOT EDIT THIS FILE!\n THIS IS OVERWRITTEN DURING BUILD\n This is an automatic copy of <osmocom/mgcp/mgcp_common.h>\n\n */" > mgcp_common.h + printf '%s\n' "/*" "" " DO NOT EDIT THIS FILE!" " THIS IS OVERWRITTEN DURING BUILD" " This is an automatic copy of <osmocom/mgcp/mgcp_common.h>" "" " */" > mgcp_common.h cat $(top_srcdir)/include/osmocom/mgcp/mgcp_common.h >> mgcp_common.h version.h: version.h.tpl -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5 Gerrit-Change-Number: 43576 Gerrit-PatchSet: 1 Gerrit-Owner: Andrei G <andrei.gosman@gmail.com>
participants (1)
-
Andrei G