Author: sebastien.lelong
Date: Thu Jan  1 04:02:10 2009
New Revision: 689

Modified:
    trunk/tools/Makefile
    trunk/tools/jalapi.py
    trunk/tools/jalapi_html.tmpl

Log:
flatten sample and quick/dirty fix in jalapi for this + fix README files  
and empty dir in release packages

Modified: trunk/tools/Makefile
==============================================================================
--- trunk/tools/Makefile        (original)
+++ trunk/tools/Makefile        Thu Jan  1 04:02:10 2009
@@ -58,11 +58,9 @@
        mkdir distrib
        mkdir distrib/jallib-${VERSION}
        mkdir distrib/jallib-${VERSION}/lib
-       mkdir distrib/jallib-${VERSION}/compiler
        mkdir -p distrib/jallib-${VERSION}/doc/html
        mkdir distrib/jallib-all_devices-${VERSION}
        mkdir distrib/jallib-all_devices-${VERSION}/lib
-       mkdir distrib/jallib-all_devices-${VERSION}/compiler
        mkdir distrib/jallib-all_devices-${VERSION}/blink
        mkdir -p distrib/jallib-all_devices-${VERSION}/doc/html
        # generate VERSION file for each
@@ -80,11 +78,12 @@
        # flatten library files
        cd  distrib/jallib-${VERSION} && for f in `cat 
../jallib-export/TORELEASE  
| grep -v ^\# | grep ^include\/ | sed 's#\r##g'`; do  
cp ../jallib-export/$$f lib; done
        # keep sample structure, but only for those in TORELEASE
-       cd  distrib/jallib-${VERSION} && for f in `cat 
../jallib-export/TORELEASE  
| grep -v ^\# | grep ^sample\/ | sed 's#\r##g'`; do mkdir -p `dirname  
$$f` ; done
-       cd  distrib/jallib-${VERSION} && for f in `cat 
../jallib-export/TORELEASE  
| grep -v ^\# | grep ^sample\/ | sed 's#\r##g'`; do cp ../jallib-export/$$f  
`dirname $$f`; done
+       ###cd  distrib/jallib-${VERSION} && for f in  
`cat ../jallib-export/TORELEASE | grep -v ^\# | grep ^sample\/ |  
sed 's#\r##g'`; do mkdir -p `dirname $$f` ; done
+       cd  distrib/jallib-${VERSION} && mkdir sample
+       cd  distrib/jallib-${VERSION} && for f in `cat 
../jallib-export/TORELEASE  
| grep -v ^\# | grep ^sample\/ | sed 's#\r##g'`; do cp ../jallib-export/$$f  
sample/; done
        # for all_devices package, keep everything...
        find distrib/jallib-export/include/device -type f -exec cp {}  
distrib/jallib-all_devices-${VERSION}/lib \;
-       for f in `find distrib/jallib-export/sample/by_device/ -type f | grep  
-e 'blink_[[:digit:]]\{2\}[[:alpha:]]\+.*\.jal'`; \
+       for f in `find distrib/jallib-export/sample/by_device/ -type f | grep  
-e '[[:digit:]]\{2\}[[:alpha:]]\+.*_blink\.jal'`; \
        do \
                cp $$f distrib/jallib-all_devices-${VERSION}/blink;\
        done
@@ -118,6 +117,7 @@
        cp distrib/jallib-extra/LICENSE.bsd distrib/jallib-${VERSION}/
        cp distrib/jallib-extra/LICENSE.zlib distrib/jallib-${VERSION}/
        cp distrib/jallib-extra/README.release distrib/jallib-${VERSION}/README
+       cp distrib/jallib-extra/README.blink  
distrib/jallib-${VERSION}/README.blink
        #       jallib-all_devices
        cp distrib/jallib-extra/LICENSE.bsd 
distrib/jallib-all_devices-${VERSION}/
        cp distrib/jallib-extra/LICENSE.zlib  
distrib/jallib-all_devices-${VERSION}/

Modified: trunk/tools/jalapi.py
==============================================================================
--- trunk/tools/jalapi.py       (original)
+++ trunk/tools/jalapi.py       Thu Jan  1 04:02:10 2009
@@ -159,7 +159,10 @@
                print >> sys.stderr, "Set SAMPLEDIR env. variable, so I can 
search for  
sample using %s" % filename
                sys.exit(2)
        # point to by_device map, to avoid test files
-       SAMPLEDIR = os.path.join(SAMPLEDIR,"by_device")
+       # if local, this means samples are flatten in "sample" dir
+       # no more tree structure
+       if not localsamples:
+         SAMPLEDIR = os.path.join(SAMPLEDIR,"by_device")
        # yeah, that's a grep, this should be re-implemened in pure python
        # to be used under MS win.
        libname = re.sub("\.jal$","",os.path.basename(filename))

Modified: trunk/tools/jalapi_html.tmpl
==============================================================================
--- trunk/tools/jalapi_html.tmpl        (original)
+++ trunk/tools/jalapi_html.tmpl        Thu Jan  1 04:02:10 2009
@@ -164,12 +164,13 @@
        #for (pic,file),url in sorted($dsamples.items(),lambda x,y:  
cmp(x[0][0],y[0][0]))
                #if $localsamples
                        ## ensure it actually exists !
-                       #if not os.path.isfile(os.path.join('%s' %  
$sampledir,'by_device','%s' % $pic,'%s' % $file))
-                               #silent print >> sys.stderr, "sample %s does 
not exist" %  
os.path.join('%s' % $sampledir,'by_device','%s' % $pic,'%s' % $file)
+                       #set samplefile = os.path.join('%s' % $sampledir,'%s' % 
$file)
+                       #if not os.path.isfile(samplefile)
+                               #silent print >> sys.stderr, "sample %s does 
not exist" % samplefile
                                #continue
                        #end if
                        <tr>
-                       <td><b>$pic</b></td><td><a 
href="../../sample/by_device/$pic/$file"  
target="_blank">$file</a></td>
+                       <td><b>$pic</b></td><td><a href="../../sample/$file"  
target="_blank">$file</a></td>
                        </tr>
                #else
                        <tr>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to