[XS] Change in osmo-mgw[master]: mgcp_client: generate mgcp_common.h with printf
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/43576?usp=email ) Change subject: mgcp_client: generate mgcp_common.h with printf ...................................................................... mgcp_client: generate mgcp_common.h 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 a single format string. 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(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/include/osmocom/mgcp_client/Makefile.am b/include/osmocom/mgcp_client/Makefile.am index 7415142..7cb9e4f 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 '/*\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 */\n' > 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: merged Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: Ibc547513745104212469ccddbc2e636c985cffe5 Gerrit-Change-Number: 43576 Gerrit-PatchSet: 5 Gerrit-Owner: andrei.gosman@gmail.com <andrei.gosman@gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de>
participants (1)
-
laforge