[lttng-dev] [PATCH] lttng-gen-tp: Allow generation from templates in subdirectories
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Mon Sep 3 13:53:37 EDT 2012
* Shawn Bohrer (sbohrer at rgmadvisors.com) wrote:
> If a template is located in a subdirectory as is common in large
> software projects then the include guard will contain forward slash
> characters which are not allowed. This replaces those characters with
> an underscore. Additional the include guards previously started with
> an underscore and capital letter which is reserved thus this
> additionally removes the leading underscore.
[for lttng-tools]
Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
>
> Fixes: #298
>
> Signed-off-by: Shawn Bohrer <sbohrer at rgmadvisors.com>
> ---
> tools/lttng-gen-tp | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/lttng-gen-tp b/tools/lttng-gen-tp
> index d54559a..8cd3191 100755
> --- a/tools/lttng-gen-tp
> +++ b/tools/lttng-gen-tp
> @@ -61,7 +61,7 @@ extern "C"{{
>
> def write(self):
> outputFile = open(self.outputFilename,"w")
> - includeGuard = "_"+self.outputFilename.upper().replace(".","_")
> + includeGuard = self.outputFilename.upper().replace(".","_").replace("/","_")
>
> outputFile.write(HeaderFile.HEADER_TPL.format(providerName=self.template.domain,
> includeGuard = includeGuard,
> --
> 1.7.7.6
>
>
> --
>
> ---------------------------------------------------------------
> This email, along with any attachments, is confidential. If you
> believe you received this message in error, please contact the
> sender immediately and delete all copies of the message.
> Thank you.
>
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
--
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com
More information about the lttng-dev
mailing list