[gccsdk] Building package gettext

Jan-Jaap van der Geer jjvdgeer at inbox.com
Sun Nov 22 10:28:58 PST 2009


On Sun, 2009-11-22 at 09:08 -0800, Peter Naulls wrote:
> There are certain assumptions with this short cut, but look at the fixed
> version.  Also look at libjpeg.  The hack here is that you need to
> do 'rm -rf $A' once you create the first package.

Yes, I see that would work (assuming the first package after the
ab_create_app is the one containing the application, but I suppose it
normally will be).

After I had written my original email I had a go at build-program and
ended up with this:

===================================================================
--- build-program	(revision 4219)
+++ build-program	(working copy)
@@ -67,6 +67,7 @@
 ab_create_command_app() {
   local app
   local section
+  local package
 
   if [ -z "$2" ] ; then
     section=$1
@@ -76,16 +77,22 @@
     section=$2
   fi
 
+  if [ -z "$3" ] ; then
+    package=""
+  else
+    package=$3/
+  fi
+
   if [ -z "$AB_CATEGORY" ] ; then
     AB_CATEGORY=$(sed s#^Apps/## <<<$section)
   fi
 
-  A=$D/$section/\!$app/
+  A=$D/$package$section/\!$app/
   AA=$app
   mkdir -p $A
 
   if [ -e $H/\!$app ] ; then
-    /bin/cp -av $H/\!$app $D/$section
+    /bin/cp -av $H/\!$app $D/$package$section
   fi
 
   if ! [ -e $A/\!Run,feb ] ; then
@@ -114,7 +121,7 @@
 
 # Might vary in future
 ab_create_app() {
-  ab_create_command_app $1 $2
+  ab_create_command_app $1 $2 $3
 }
 
 
This adds a third parameter to ab_create_app to indicate which package.
This worked for me, although I'm not really sure if it is OK to add a
third parameter when the second one can be empty. I've not seen that
kind of ab_create_app commands though, so I'm not sure if it is
relevant.

Should I check this in or is it not a good idea for some reason? It
feels less hacky to me.

Cheers,
Jan-Jaap

____________________________________________________________
FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your desktop!
Check it out at http://www.inbox.com/marineaquarium




More information about the gcc mailing list