From 9df77524fce4dd0df7f63e2909e0b5f6170d24db Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Mon, 12 Sep 2011 07:21:22 -0400
Subject: [PATCH] only include the h file when it is being created, and make
 the #endif in the h file safer for picky compilers

---
 scripts/templates/template-cpp.cpp | 3 ++-
 scripts/templates/template-h.h     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/scripts/templates/template-cpp.cpp b/scripts/templates/template-cpp.cpp
index 7a8797698a3..35d8441c87e 100644
--- a/scripts/templates/template-cpp.cpp
+++ b/scripts/templates/template-cpp.cpp
@@ -26,4 +26,5 @@
 */
 
 
-#'%c'%35#include "#filename#.h"
+#'' if ( skip_h ) else '%cinclude "%s.h"' % (35,filename)#
+
diff --git a/scripts/templates/template-h.h b/scripts/templates/template-h.h
index de40a8e071e..ce7b4ddc877 100644
--- a/scripts/templates/template-h.h
+++ b/scripts/templates/template-h.h
@@ -28,4 +28,4 @@
 #'%c'%35#define LL_#filename.upper().replace('-','_')#_H
 
 
-#'%c'%35#endif LL_#filename.upper().replace('-','_')#_H
+#'%c'%35#endif // LL_#filename.upper().replace('-','_')#_H
-- 
GitLab