From 8e355c01d0b0a16a9727d38d77a1bc8cde23389a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 4 Nov 2021 16:50:26 +0200 Subject: [PATCH] Improve generated checks source file formatting --- libbuild2-autoconf/libbuild2/autoconf/buildfile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/libbuild2-autoconf/libbuild2/autoconf/buildfile b/libbuild2-autoconf/libbuild2/autoconf/buildfile index e7be180..9cf1ec6 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/buildfile +++ b/libbuild2-autoconf/libbuild2/autoconf/buildfile @@ -54,23 +54,32 @@ lib{build2-autoconf}: {hxx ixx txx cxx}{* -checks} {hxx cxx}{checks} \ #include const build2::autoconf::check build2::autoconf::checks[$n] = { - {\"\", \"\" + { + \"\", + + \"\" EOI # @@ TODO: add \n once sed supports it. # cat $i | sed -n \ - -e 's|^// ([^ ]+) *$|},{"\1",|p' \ + -e 's|^// ([^ ]+) *$|},\n\n{\n"\1",\n|p' \ -e 's|^(.*)\\$|"\1\\\\\\n"|p' \ -e 's|^(.*)$|"\1\\n"|p' \ - >>$s cat <>$s }, - {"zzz_TEST_DUMMY1_H", + + { + "zzz_TEST_DUMMY1_H", + "#define zzz_TEST_DUMMY1_H 1" }, - {"zzz_TEST_DUMMY2_H", + + { + "zzz_TEST_DUMMY2_H", + "#define zzz_TEST_DUMMY2_H 1" } };