#!/bin/sh shlibSuffix="@SHLIB_SUFFIX@" libtool=@BABEL_LIBTOOL@ supportShared=@LIBTOOL_SUPPORT_SHARED@ supportStatic=@LIBTOOL_SUPPORT_STATIC@ function usage () { echo "$0: usage: [dynamic ] [headers ]" > /dev/stderr echo "This script generates to stdout .cca files which are installed next to the" > /dev/stderr echo "library in the same directory under some name xxxxxx.depl.cca." > /dev/stderr echo " Arguments: "> /dev/stderr echo " libpath is the full path of the .la, .o, $shlibSuffix, or .a file" > /dev/stderr echo " c++ClassName is the full colon-qualified neo::class::name of the component." > /dev/stderr echo " C-constructorName is the name of the c function wrapping the c++ constructor." > /dev/stderr echo " palette-alias is the string classname to be used in user interfaces" > /dev/stderr echo " Optional arguments (if library is dynamically loadable)" > /dev/stderr echo " dynamic -- required literal. just put it there." > /dev/stderr echo " scope is global or private" > /dev/stderr echo " resolution is now or lazy" > /dev/stderr echo " If optional dynamic argument is not given, static is assumed." > /dev/stderr echo " Optional arguments (if compiling drivers is to be supported)" > /dev/stderr echo " headers -- required literal. just put it there." > /dev/stderr echo " path is a : separated include directory list." > /dev/stderr echo " files is a : separated include file list, less suffixes." > /dev/stderr echo "e.g.: $0 /somewhere/lib/libComponent2.so test2::Component1 Comp2 dynamic global lazy" > /dev/stderr echo "e.g.: $0 /somewhere/lib/libComponent0.la test0::Component1 test0.Component1" > /dev/stderr echo "e.g.: $0 /somewhere/lib/libComponent0.la test0::Component1 test0.Component1 headers /somewhere/include test0_Component1" > /dev/stderr } if test $# -lt 3; then usage exit 1; fi dstring=`date` pstring=`pwd`/ libpath=$1 shift # if it's an la file, set libpath_lt, libpath_static # else don't. libpath_lt="" libpath_static="" libpath_shared="" loading="none" libpath_base=`echo $libpath |sed -e 's/\.la$//g'` if test "x$libpath" = "x$libpath_base"; then libpath_lt="" libpath_base=`echo $libpath |sed -e 's/\.a$//g'` if test "x$libpath" = "x$libpath_base"; then : else libpath_static="$libpath" loading=static fi libpath_base=`echo $libpath |sed -e "s/$shlibSuffix$//g"` if test "x$libpath" = "x$libpath_base"; then : else libpath_shared="$libpath" loading=dynamic fi else libpath_lt="$libpath" loading="libtool" # make an assumption that probably always works for cca. if test "x$supportStatic" = "x1" ; then libpath_static="$libpath_base.a" fi if test "x$supportShared" = "x1" ; then libpath_shared="$libpath_base$shlibSuffix" fi fi className=$1 shift constructorName=$1 shift palias="paletteClassAlias=\"$1\"" shift scope=global resolution=now incpath= incfiles= if test "x$1" = "xstatic"; then echo "$0: static is not a supported word, it is the default" > /dev/stderr exit 1; fi if test $# -ge 3; then if test "x$1" = "xdynamic"; then loading=dynamic if test $# -ge 2; then scope=$2 shift fi if test $# -ge 2; then resolution=$2 loading=dynamic shift fi shift fi fi if test $# -ge 3; then if test "x$1" = "xheaders"; then if test $# -ge 2; then incpath=$2 shift fi if test $# -ge 2; then incfiles=$2 shift fi shift fi fi if test $# -ge 2; then if test "x$1" = "xdynamic"; then echo "$0: dynamic and its modifiers must appear before headers" > /dev/stderr exit 1; else echo "$0: extra or missing arguments starting at $1." > /dev/stderr exit 1; fi fi staticinfo="" if ! test "x$libpath_static" = "x"; then staticinfo="static-archive=\"$libpath_static\"" fi libtoolinfo="" if ! test "x$libpath_lt" = "x"; then libtoolinfo="libtool-archive=\"$libpath_lt\"" fi sharedinfo="" if ! test "x$libpath_shared" = "x"; then sharedinfo="shared-archive=\"$libpath_shared\"" fi if test "x$GENDEBUG_ERROR" = "x1"; then echo $libpath echo $libpath_lt echo $libpath_static echo $className echo $palias echo $loading echo $dynamic echo $scope echo $resolution echo $incpath echo $incfiles fi cat << __EOF2 __EOF2 exit 0