Jos�, put all three scripts in your path (and in the same directory). 
Usage:

$ check_compile.sh ExternalTemplate.h
ExternalTemplate.h was compiled successfully.
$ check_compile.sh ExternalTemplate.C
ExternalTemplate.C was compiled successfully.

$ check_strip.sh includes ExternalTemplate.C
ExternalTemplate.C before: 565, after: 562, total saved 3
$ check_strip.sh includes ExternalTemplate.h
ExternalTemplate.h before: 131, after: 126, total saved 5

$ cvs diff ExternalTemplate.C
Index: ExternalTemplate.C
===================================================================
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/insets/ExternalTemplate.C,v
retrieving revision 1.33
diff -u -p -r1.33 ExternalTemplate.C
--- ExternalTemplate.C  7 Oct 2003 22:59:58 -0000       1.33
+++ ExternalTemplate.C  4 Nov 2003 23:59:12 -0000
@@ -20,11 +20,8 @@
 #include "support/lstrings.h"
 #include "support/path.h"
 #include "support/path_defines.h"
-#include "support/translator.h"

-#include <boost/assert.hpp>

-#include <algorithm>

 namespace support = lyx::support;
$ cvs diff ExternalTemplate.h
Index: ExternalTemplate.h
===================================================================
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/insets/ExternalTemplate.h,v
retrieving revision 1.25
diff -u -p -r1.25 ExternalTemplate.h
--- ExternalTemplate.h  7 Oct 2003 22:59:58 -0000       1.25
+++ ExternalTemplate.h  4 Nov 2003 23:59:36 -0000
@@ -17,10 +17,6 @@

 #include <boost/utility.hpp>

-#include <iosfwd>
-#include <map>
-#include <string>
-#include <vector>

 class LyXLex;

@@ -90,7 +86,6 @@ struct Template {
        Formats formats;
 };

-#include "ExternalTransforms.h"

 /**
  *  A singleton class that manages the external inset templates



Hope this helps,
-- 
Angus

Attachment: check_compile.sh
Description: application/shellscript

Attachment: check_strip.sh
Description: application/shellscript

Attachment: compile_utils.sh
Description: application/shellscript

Reply via email to