[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [LibTagaro] 778d85f: autogen-includes.sh: Filter by namespace.
From:       Stefan Majewsky <majewsky () gmx ! net>
Date:       2010-10-22 19:53:09
Message-ID: 20101022195309.5FD97A6095 () git ! kde ! org
[Download RAW message or body]

commit 778d85f9a3f94109f95ba65e9ad0cbd1f31bb4ca
branch master
Author: Stefan Majewsky <majewsky@gmx.net>
Date:   Tue Oct 19 18:35:07 2010 +0200

    autogen-includes.sh: Filter by namespace.

diff --git a/autogen-includes.sh b/autogen-includes.sh
index 3e4b2d5..4f471fa 100644
--- a/autogen-includes.sh
+++ b/autogen-includes.sh
@@ -6,6 +6,7 @@
 # configuration
 EXPORT_MACRO=TAGARO_EXPORT  # the macro which denotes exported classes
 HEADER_DIR=tagaro           # the directory which contains the headers of your lib
+NAMESPACE=Tagaro            # the namespace in which the classes reside
 INCLUDE_DIR=includes/Tagaro # the directory which shall be filled with the pretty \
headers  INCLUDE_INSTALL_DIR='${INCLUDE_INSTALL_DIR}/Tagaro'
                             # the directory into which CMake shall install the \
pretty headers @@ -17,10 +18,10 @@ if [ ! -f $(basename $0) ]; then
 fi
 
 (
-	echo "#NOTE: Use the $0 script to update this file."
+	echo "#NOTE: Use the $(basename $0) script to update this file."
 	echo 'install(FILES'
 	(
-		find $HEADER_DIR/ -name \*.h -a \! -name \*_p.h | while read HEADERFILE; do
+		find $HEADER_DIR/ -name \*.h -a \! -name \*_p.h | xargs grep "namespace \
$NAMESPACE" -l | while read HEADERFILE; do  grep "class $EXPORT_MACRO" $HEADERFILE | \
sed "s/^.*$EXPORT_MACRO \\([^ ]*\\).*$/\\1/" | while read CLASSNAME; do  echo \
'#include <'$HEADERFILE'>' > $INCLUDE_DIR/$CLASSNAME  echo -en "\t"; echo \
                "$CLASSNAME"
diff --git a/includes/Tagaro/CMakeLists.txt b/includes/Tagaro/CMakeLists.txt
index 9aca918..6b59a50 100644
--- a/includes/Tagaro/CMakeLists.txt
+++ b/includes/Tagaro/CMakeLists.txt
@@ -1,4 +1,4 @@
-#NOTE: Use the ./autogen-includes.sh script to update this file.
+#NOTE: Use the autogen-includes.sh script to update this file.
 install(FILES
 	AudioScene
 	Board


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic