(linenum→info "unix/slp.c:2238")

gauche/0.8.12/framework.sh

    1: #!/bin/sh
    2: # Install Gauche as a framework on MacOSX
    3: # $Id: framework.sh,v 1.2 2005/11/08 00:16:44 shirok Exp $
    4: 
    5: # This script installs the Gauche stuff under Gauche.framework.
    6: # It can be just copied into the application bundle as a private
    7: # framework.  The advantage is that the application bundle can
    8: # just simply copied to the machine that doesn't have Gauche installed.
    9: #
   10: # We don't, and probably won't, support a shared framework, though.
   11: # A shared framework needs installation process anyway, and it embeds
   12: # its abosolute path in it so that it can't be casually copied 
   13: # afterwards.  So it doesn't have the advantage of private frameworks,
   14: # and we'll get all the disadvantages of the frameworks (e.g. nonstandard
   15: # header paths, difficulty of using gauche auxiliary scripts, etc).
   16: 
   17: version=$1
   18: framework_dir=`pwd`/Gauche.framework
   19: prefix=$framework_dir/Versions/$version
   20: 
   21: # Install stuff under $prefix.
   22: rm -rf $framework_dir
   23: (cd lib; make prefix=$prefix install)
   24: (cd ext; make prefix=$prefix install)
   25: (cd src; make prefix=$prefix TARGETLIB=@executable_path/../Frameworks/Gauche.framework install)
   26: mkdir $prefix/Resources
   27: cp src/Info.plist $prefix/Resources
   28: 
   29: # Creates apropriate links
   30: rm -f $framework_dir/Versions/Current
   31: ln -s ./$version $framework_dir/Versions/Current
   32: rm -f $framework_dir/Headers
   33: ln -s ./Versions/Current/lib/gauche/$version/include $framework_dir/Headers
   34: rm -f $framework_dir/libgauche.dylib
   35: ln -s ./Versions/Current/lib/libgauche.dylib $framework_dir/libgauche.dylib
   36: rm -f $framework_dir/Gauche
   37: ln -s ./libgauche.dylib $framework_dir/Gauche
   38: rm -f $framework_dir/Resources
   39: ln -s ./Versions/Current/Resources $framework_dir/Resources
   40: 
   41: # Modifies header to meet MacOSX convention (duh!)
   42: for h in $framework_dir/Headers/*.h $framework_dir/Headers/gauche/*.h
   43: do
   44:   sed -e 's@^#include <gc\.h>@#include <Gauche/gc.h>@' \
   45:       -e 's@^# *include <\(gauche.*\)\.h>@#include <Gauche/\1.h>@' \
   46:       -e 's@^# *include "\(gc.*\)\.h"@#include "Gauche/\1.h"@' $h > tmp.h && \
   47:    mv -f $h $h.bak && \
   48:    mv tmp.h $h && \
   49:    chmod 444 $h && \
   50:    rm -f $h.bak
   51: done
Syntax (Markdown)