LibraryDefinition.st
author Stefan Vogel <sv@exept.de>
Fri, 15 Sep 2006 10:41:51 +0200
changeset 9902 74fab44fab6e
parent 9899 1c1ed66c7163
child 9907 8f907d537b9c
permissions -rw-r--r--
Add newline at end of libInit.cc

"
 COPYRIGHT (c) 2006 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

"{ Package: 'stx:libbasic' }"

ProjectDefinition subclass:#LibraryDefinition
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'System-Support-Projects'
!

!LibraryDefinition class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 2006 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"
! !

!LibraryDefinition class methodsFor:'defaults'!

defaultDescription
    ^ 'a classLibrary'
! !

!LibraryDefinition class methodsFor:'description - project information'!

description
    "Returns a description string which will appear in nt.def / bc.def"

    self module = 'stx' ifTrue:[
        ^ 'Smalltalk/X Class library'
    ].

    ^ 'Class Library'

    "Created: / 17-08-2006 / 20:52:16 / cg"
    "Modified: / 18-08-2006 / 16:15:53 / cg"
!

fileDescription
    "Return a description string which will appear in nt.def / bc.def"

    ^self description , ' ClassLibrary'

    "Created: / 14-09-2006 / 10:55:23 / cg"
! !

!LibraryDefinition class methodsFor:'file generation'!

basicFileNamesToGenerate
    ^ #( 
          #('Make.proto'        #'generate_make_dot_proto')
          #('Make.spec'         #'generate_make_dot_spec')
          #('libInit.cc'        #'generate_libInit_dot_cc')
          #('bc.def'            #'generate_bc_dot_def')
          #('nt.mak'            #'generate_nt_dot_mak')
"
          #('nt.def'            #'generate_nt_dot_def')
"
          #('abbrev.stc'        #'generate_abbrev_dot_stc') 
          #('bmake.bat'         #'generate_bmake_dot_mak') 
     ) , (Array
            with:
                (Array 
                    with:self rcFilename
                    with:#'generate_packageName_dot_rc')
         ).

    "Created: / 14-09-2006 / 14:36:14 / cg"
    "Modified: / 14-09-2006 / 21:02:08 / cg"
!

generateFile:filename
    filename = 'libInit.cc' ifTrue:[
        ^ self generate_libInit_dot_cc
    ].
    ((filename = 'lib.rc') or:[filename = self rcFilename]) ifTrue:[
        ^ self generate_packageName_dot_rc
    ].
    ^ super generateFile:filename

    "Created: / 22-08-2006 / 18:36:24 / cg"
    "Modified: / 07-09-2006 / 17:07:46 / cg"
!

generate_libInit_dot_cc

    ^self replaceMappings: self libInit_dot_cc_mappings 
            in: self libInit_dot_cc

"
  DapasXProject generate_libInit_dot_cc
  DapasX_Datenbasis generate_libInit_dot_cc

"

    "Created: / 08-08-2006 / 12:47:16 / fm"
    "Modified: / 09-08-2006 / 11:30:52 / fm"
! !

!LibraryDefinition class methodsFor:'file templates'!

bc_dot_def
    "the template code for the bc.def file"

^ 
'LIBRARY         %(LIBRARY_NAME)
DESCRIPTION     %(DESCRIPTION)
CODE            PRELOAD MOVEABLE DISCARDABLE
SEGMENTS
    INITCODE    PRELOAD DISCARDABLE
EXPORTS
    __%(LIBRARY_NAME)_Init     @1
'

    "Created: / 08-08-2006 / 12:26:58 / fm"
    "Modified: / 08-08-2006 / 19:32:27 / fm"
    "Modified: / 18-08-2006 / 17:13:45 / cg"
!

classLine_libInit_dot_cc

^'_%(CLASS)_Init(pass,__pRT__,snd);'

    "Created: / 08-08-2006 / 12:51:44 / fm"
    "Modified: / 08-08-2006 / 15:46:05 / fm"
!

extensionLine_libInit_dot_cc

^'_%(LIBRARY_NAME)_extensions_Init(pass,__pRT__,snd);'

    "Created: / 08-08-2006 / 15:48:56 / fm"
    "Modified: / 08-08-2006 / 19:32:33 / fm"
!

libInit_dot_cc
    "the template code for the libInit.cc file"

^ 
'/*
 * $','Header','$
 *
 * DO NOT EDIT 
 * automagically generated from the projectDefinition: ',self name,'.
 */
#define __INDIRECTVMINITCALLS__
#include <stc.h>
#define INIT_TEXT_SECT /* as nothing */
#ifdef WIN32
# pragma codeseg INITCODE "INITCODE"
#else /* not WIN32 */
# if defined(__GNUC__) && !!defined(NO_SECTION_ATTRIBUTES)
#  if (__GNUC__  == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2
#   undef INIT_TEXT_SECT
#   define INIT_TEXT_SECT __attribute__((section(".stxitext")))
#  endif
# endif /* not GNUC */
#endif /* not WIN32 */
#ifdef INIT_TEXT_SECT
extern void _%(LIBRARY_NAME)_Init() INIT_TEXT_SECT;
#endif
void _%(LIBRARY_NAME)_Init(pass, __pRT__, snd)
OBJ snd; struct __vmData__ *__pRT__; {
__BEGIN_PACKAGE2__("%(LIBRARY_NAME)", _%(LIBRARY_NAME)_Init, "%(PACKAGE)");
%(CLASSES)
%(EXTENSION)
__END_PACKAGE__();
}
'

    "Created: / 08-08-2006 / 12:40:45 / fm"
    "Modified: / 08-08-2006 / 19:33:01 / fm"
    "Modified: / 18-08-2006 / 12:57:02 / cg"
!

lib_dot_rc

^ 
'/*------------------------------------------------------------------------
 * $','Header','$                                                            
 *
 * DO NOT EDIT 
 * automagically generated from the projectDefinition: ',self name,'.
 *------------------------------------------------------------------------*/

// #if (__BORLANDC__ < 0x0550)
// #include <ver.h>
// #endif

VS_VERSION_INFO VERSIONINFO
  FILEVERSION     %(FILEVERSION)
  PRODUCTVERSION  %(PRODUCTVERSION)
  FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
  FILEFLAGS       VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
  FILEOS          VOS_NT_WINDOWS32
  FILETYPE        %(FILETYPE)
  FILESUBTYPE     VS_USER_DEFINED

BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904E4"
    BEGIN
      VALUE "CompanyName", %(COMPANYNAME)
      VALUE "FileDescription", "Smalltalk/X Additional Developer Basic Classes Library\0"
      VALUE "FileVersion", "5.2.8.1\0"
      VALUE "InternalName", "libbasic3\0"
      VALUE "LegalCopyright", "Copyright eXept Software AG 1998-2006\0"
      VALUE "ProductName", "Smalltalk/X\0"
      VALUE "ProductVersion", "5.2.8.1\0"
    END

  END

  BLOCK "VarFileInfo"
  BEGIN                               //  Language   |    Translation
    VALUE "Translation", 0x409, 0x4E4 // U.S. English, Windows Multilingual
  END
END
'

    "Created: / 17-08-2006 / 19:37:50 / cg"
    "Modified: / 18-08-2006 / 12:57:09 / cg"
!

make_dot_proto

^ 
'# $','Header','$
#
# DO NOT EDIT 
# automagically generated from the projectDefinition: ',self name,'.
#
# Warning: once you modify this file, do not rerun
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
#
# The Makefile as generated by this Make.proto supports the following targets:
#    make         - compile all st-files to a classLib
#    make clean   - clean all temp files
#    make clobber - clean all
#
# This file contains definitions for Unix based platforms.
# It shares common definitions with the win32-make in Make.spec.

#
# position (of this package) in directory hierarchy:
# (must point to ST/X top directory, for tools and includes)
TOP=%(TOP)
INCLUDE_TOP=$(TOP)/..

# subdirectories where targets are to be made:
SUBDIRS=%(SUBDIRECTORIES)


# subdirectories where Makefiles are to be made:
# (only define if different from SUBDIRS)
# ALLSUBDIRS=


# if your embedded C code requires any system includes, 
# add the path(es) here:, 
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
LOCALINCLUDES=%(LOCAL_INCLUDES)


# if you need any additional defines for embedded C code, 
# add them here:, 
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALDEFINES=-Dfoo -Dbar -DDEBUG
LOCALDEFINES=%(LOCAL_DEFINES)

LIBNAME=%(LIBRARY_NAME)
STCLOCALOPT=''-package=$(PACKAGE)'' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(HEADEROUTPUTARG) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME)


# ********** OPTIONAL: MODIFY the next line ***
# additional C-libraries that should be pre-linked with the class-objects
LD_OBJ_LIBS=%(ADDITIONAL_LINK_LIBRARIES)


# ********** OPTIONAL: MODIFY the next line ***
# additional C targets or libraries should be added below
LOCAL_EXTRA_TARGETS=

OBJS= $(COMMON_OBJS) $(UNIX_OBJS)

%(ADDITIONAL_DEFINITIONS)

all:: preMake classLibRule postMake

pre_objs:: %(ADDITIONAL_TARGETS)

%(ADDITIONAL_RULES)

# add more install actions here
install::

# add more install actions for aux-files (resources) here
installAux::

# add more preMake actions here
preMake::

# add more postMake actions here
postMake:: cleanjunk

cleanjunk::

clean::
%(TAB)-rm -f *.o *.H

clobber::
%(TAB)-rm -f *.so *.dll

',
"
$(INSTALLBASE)::
%(TAB)@test -d $@ || mkdir $@

$(INSTALLBASE)/packages:: $(INSTALLBASE)
%(TAB)@test -d $@ || mkdir $@

$(INSTALLBASE)/packages/$(MODULE):: $(INSTALLBASE)/packages
%(TAB)@test -d $@ || mkdir $@

$(INSTALLBASE)/packages/$(MODULE)/dapasx:: $(INSTALLBASE)/packages/$(MODULE)
%(TAB)@test -d $@ || mkdir $@

$(INSTALLBASE)/packages/$(MODULE)/dapasx/interactiver_editor:: $(INSTALLBASE)/packages/$(MODULE)/dapasx
%(TAB)@test -d $@ || mkdir $@

$(INSTALLBASE)/packages/$(MODULE)/$(MODULE_DIR):: $(INSTALLBASE)/packages/$(MODULE)
%(TAB)@test -d $@ || mkdir $@
"
'
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
%(DEPENDENCIES)
# ENDMAKEDEPEND --- do not remove this line

'

    "Created: / 08-08-2006 / 20:45:36 / fm"
    "Modified: / 09-08-2006 / 16:50:23 / fm"
    "Modified: / 14-09-2006 / 15:48:02 / cg"
!

nt_dot_def

^
'LIBRARY        %(LIBRARY_NAME)
DESCRIPTION     %(DESCRIPTION)
VERSION         %(VERSION_NUMBER)
CODE            EXECUTE READ 
DATA            READ WRITE
SECTIONS
    INITCODE    READ EXECUTE 
    INITDATA    READ WRITE
EXPORTS 
    _%(LIBRARY_NAME)_Init      @1
IMPORTS'

    "Modified: / 08-08-2006 / 19:33:14 / fm"
!

nt_dot_mak

^
'# $','Header','$
#
# DO NOT EDIT 
# automagically generated from the projectDefinition: ',self name,'.
#
# Warning: once you modify this file, do not rerun
# stmkmp or projectDefinition-build again - otherwise, your changes are lost.
#
# This file contains make rules for the win32 platform (using borland-bcc).
# It shares common definitions with the unix-make in Make.spec.
# The nt.mak supports the following targets:
#    bmake         - compile all st-files to a classLib (dll)
#    bmake clean   - clean all temp files
#    bmake clobber - clean all
#
#
TOP=%(TOP)
INCLUDE_TOP=$(TOP)\..

!!INCLUDE $(TOP)\rules\stdHeader_nt

!!INCLUDE Make.spec

LIBNAME=%(LIBRARY_NAME)
RESFILES=%(RESFILENAME)
LOCALINCLUDES=%(LOCAL_INCLUDES)

STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) %(HEADEROUTPUTARG) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) %(COMMONSYMFLAG) -varPrefix=$(LIBNAME)

%(ADDITIONAL_DEFINITIONS)

OBJS= $(COMMON_OBJS) $(WIN32_OBJS)

ALL::  %(ADDITIONAL_TARGETS) $(LIBDIR)\$(LIBNAME).lib $(BINDIR)\$(LIBNAME).dll

!!INCLUDE $(TOP)\rules\stdRules_nt

%(ADDITIONAL_RULES)

# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
%(DEPENDENCIES)
# ENDMAKEDEPEND --- do not remove this line
'

    "Created: / 09-08-2006 / 11:44:20 / fm"
    "Modified: / 09-08-2006 / 19:59:32 / fm"
    "Modified: / 14-09-2006 / 15:48:18 / cg"
! !

!LibraryDefinition class methodsFor:'mappings'!

bc_dot_def_mappings
    ^ (super bc_dot_def_mappings)
        at:'LIBRARY_NAME' put:( self libraryName );
        yourself

    "Created: / 09-08-2006 / 11:17:59 / fm"
    "Modified: / 16-08-2006 / 18:19:25 / User"
    "Modified: / 14-09-2006 / 18:56:11 / cg"
!

classLine_libInit_dot_cc_mappings: aClassName

^Dictionary new                                               
    at: 'CLASS' put: ( self st2c:aClassName );
    yourself

    "Created: / 08-08-2006 / 14:04:00 / fm"
    "Modified: / 09-08-2006 / 18:27:07 / fm"
    "Modified: / 14-09-2006 / 18:56:18 / cg"
!

extensionLine_libInit_dot_cc_mappings

^Dictionary new                                               
    at: 'LIBRARY_NAME' put: ( self st2c:(self package copy asString replaceAny:':/' with:$_) );
    yourself

    "Created: / 09-08-2006 / 11:19:59 / fm"
    "Modified: / 14-09-2006 / 18:56:26 / cg"
!

libInit_dot_cc_mappings

^Dictionary new
    at: 'LIBRARY_NAME' put: (self libraryName);
    at: 'PACKAGE' put: (self package);
    at: 'CLASSES' put: (self generateClassLines_libInit_dot_cc);
    at: 'EXTENSION' put: (self generateExtensionLine_libInit_dot_cc);

    yourself

    "Created: / 09-08-2006 / 11:20:24 / fm"
    "Modified: / 16-08-2006 / 18:19:03 / User"
    "Modified: / 14-09-2006 / 18:56:42 / cg"
!

make_dot_proto_mappings
    ^ Dictionary new
        at: 'TAB' put: ( Character tab asString );
        at: 'TOP' put: ( self pathToTop_unix );
        at: 'LIBRARY_NAME' put: ( self libraryName );
        at: 'SUBDIRECTORIES' put: (self generateSubDirectories);
        at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_unix);
        at: 'LOCAL_DEFINES' put: '';
        at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag);
        at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg);
        at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_make_dot_proto);
        at: 'ADDITIONAL_RULES' put: (self additionalRules_make_dot_proto);
        at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_make_dot_proto);
        at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_make_dot_proto);
        at: 'DEPENDENCIES' put: (self generateDependencies_unix);
        yourself

    "Created: / 09-08-2006 / 11:20:45 / fm"
    "Modified: / 09-08-2006 / 16:44:48 / fm"
    "Modified: / 14-09-2006 / 18:57:52 / cg"
!

nt_dot_def_mappings

^Dictionary new
    at: 'LIBRARY_NAME' put: (self libraryName);
    at: 'DESCRIPTION' put: (self description asString storeString);
    at: 'VERSION_NUMBER' put: (self versionNumber);
    yourself

    "Created: / 09-08-2006 / 11:21:21 / fm"
    "Modified: / 14-09-2006 / 18:58:07 / cg"
!

nt_dot_mak_mappings
    |d resFileName|

    resFileName := (self package copyFrom:(self package lastIndexOfAny:':/')+1),'.res'.

    d := super nt_dot_mak_mappings.
    d
        at: 'LIBRARY_NAME' put: ( self libraryName );
        at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32);
        at: 'COMMONSYMFLAG' put: (self commonSymbolsFlag);
        at: 'HEADEROUTPUTARG' put: (self headerFileOutputArg);
        at: 'RESFILENAME' put: resFileName;
        at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_nt_dot_mak);
        at: 'ADDITIONAL_RULES' put: (self additionalRules_nt_dot_mak);
        at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_nt_dot_mak);
        at: 'DEPENDENCIES' put: (self generateDependencies_win32);
        yourself.
    ^ d.

    "Created: / 09-08-2006 / 11:44:36 / fm"
    "Modified: / 09-08-2006 / 20:00:01 / fm"
    "Modified: / 14-09-2006 / 18:58:15 / cg"
!

st2c:aString
        ^ (aString asString
            copyReplaceString:'_' withString:('_',($_ codePoint printStringRadix:8)))
                replaceAny:':' with:$_
! !

!LibraryDefinition class methodsFor:'mappings support'!

commonSymbolsFlag
    "some libraries are compiled with COMMONSYMBOLS -
     This saves a lot of space in the generated dll/so files;
     However, it also requires the librun to be rebuilt, whenever one of
     the commonSymbols-libs changes.
     Therefore, NEVER do this for end-user or application libraries;
     ONLY do it for a subset of the predefined, eXept-provided standard stx libraries"

    (
        #(
            'stx:libbasic'        'stx:libview'         'stx:libtool'   
            'stx:libbasic2'       'stx:libview2'        'stx:libtool2'
            'stx:libbasic3'       'stx:libwidg'         'stx:libhtml'
            'stx:libcomp'         'stx:libwidg2'        'stx:libui'
            'stx:libboss'         'stx:libdb'
        )
    includes:self package) ifTrue:[
        ^ '$(COMMONSYMBOLS)'
    ].
    ^ ''

    "Created: / 18-08-2006 / 13:01:52 / cg"
    "Modified: / 23-08-2006 / 09:48:11 / cg"
!

generateClassLines_libInit_dot_cc
    ^ String streamContents:[:s |
        |classNames classesLoaded classNamesUnloaded classNamesSorted putLineForClassName|

        putLineForClassName := [:className | 
                |newClassLine mappings|

                mappings := self classLine_libInit_dot_cc_mappings: className.
                newClassLine := self replaceMappings:mappings in:self classLine_libInit_dot_cc.
                s nextPutLine: newClassLine 
            ].

        classNames := self common_compiled_classNames.
        classesLoaded := classNames 
                    collect:[:nm | |cls| cls := Smalltalk classNamed:nm]
                    thenSelect:[:cls |  cls notNil and:[cls isLoaded] ].
        classNamesUnloaded := classNames 
                    select:[:nm | |cls| cls := Smalltalk classNamed:nm. cls isNil or:[cls isLoaded not]].

        classNamesSorted := (Class classesSortedByLoadOrder:classesLoaded) collect:[:cls |cls name].
        
        classNamesSorted do:putLineForClassName.
        classNamesUnloaded do:putLineForClassName.

        self namesAndAttributesIn:(self additionalClassNamesAndAttributes) do:[:nm :attr |
            (attr isEmptyOrNil or:[(attr includes:#autoload) not]) ifTrue:[
                putLineForClassName value:nm.
            ].
        ].

        #(
                ('UNIX'  #unix)
                ('WIN32' #win32)
                ('VMS'   #vms)
                ('BEOS'  #beos)
        ) pairsDo:[:ifdef :id|
            |archClassNames archClassesLoaded|

            archClassNames := self compiled_classNamesForArchitecture:id.    
            archClassesLoaded := archClassNames 
                        collect:[:nm | |cls| cls := Smalltalk classNamed:nm]
                        thenSelect:[:cls |  cls notNil and:[cls isLoaded] ].

            archClassesLoaded notEmpty ifTrue:[
                s nextPutLine: '#ifdef ',ifdef.
                (Class classesSortedByLoadOrder:archClassesLoaded) do:[:cls | putLineForClassName value:cls name].
                s nextPutLine: '#endif /* ',ifdef,' */'.
            ].
        ].
    ]

    "
     bosch_dapasx_datenbasis  generateClassLines_libInit_dot_cc
     bosch_dapasx_kernel  generateClassLines_libInit_dot_cc
     stx_libbasic3 generateClassLines_libInit_dot_cc
    "

    "Created: / 09-08-2006 / 11:21:48 / fm"
    "Modified: / 16-08-2006 / 18:52:10 / User"
    "Modified: / 14-09-2006 / 13:11:57 / cg"
!

generateExtensionLine_libInit_dot_cc
    |mappings|

    ^self hasExtensions 
        ifFalse:['']
        ifTrue:[ 
            mappings := self extensionLine_libInit_dot_cc_mappings.
            self replaceMappings: mappings in: self extensionLine_libInit_dot_cc.]

    "
     DapasXProject generateExtensionLine_libInit_dot_cc
     DapasX_Datenbasis generateExtensionLine_libInit_dot_cc
    "

    "Created: / 09-08-2006 / 11:23:34 / fm"
    "Modified: / 14-09-2006 / 14:19:59 / cg"
!

generateLocalIncludes_unix
    ^ String streamContents:[:s |
        s nextPutAll:(self localIncludes_unix).
        self searchForProjectsWhichProvideHeaderFiles
            do:[:includeProject | 
                s nextPutAll:' -I$(INCLUDE_TOP)/',(self topRelativePathToPackage_unix: includeProject) 
            ]
    ]

    "
     bosch_dapasx generateLocalIncludes_unix
     bosch_dapasx_datenbasis generateLocalIncludes_unix  
     stx_libbasic generateLocalIncludes_unix  
     stx_libview generateLocalIncludes_unix                   
     stx_libtool2 generateLocalIncludes_unix            
     stx_libui generateLocalIncludes_unix   
    "

    "Created: / 09-08-2006 / 16:46:49 / fm"
    "Modified: / 14-09-2006 / 15:38:16 / cg"
!

generateSubDirectories
    ^ String streamContents:[:s |
        self subProjects 
            do:[:projectID |    
                s space; nextPutAll:projectID
            ]
    ]

    "
     DapasXProject generateSubDirectories
     DapasX_Datenbasis generateSubDirectories
    "

    "Created: / 09-08-2006 / 11:26:59 / fm"
    "Modified: / 14-09-2006 / 18:46:18 / cg"
!

generateUnixLocalIncludes
    ^ String streamContents:[:s |
        s nextPutAll:(self localIncludes_unix).
        self searchForProjectsWhichProvideHeaderFiles
            do:[:includeProjectName |    
                s nextPutAll:' -I',(self pathToPackage_unix: includeProjectName) 
            ]
    ]

    "
     DapasXProject generateLocalIncludes
     DapasX_Datenbasis generateLocalIncludes
    "

    "Created: / 09-08-2006 / 16:46:49 / fm"
    "Modified: / 14-09-2006 / 13:22:03 / cg"
!

headerFileOutputArg
"/    "all stx stuff goes to the common include directory.
"/     Everything else is left locally"
"/
"/    (
"/        #(
"/            'stx:libbasic'        'stx:libview'         'stx:libtool'   
"/            'stx:libbasic2'       'stx:libview2'        'stx:libtool2'
"/            'stx:libbasic3'       'stx:libwidg'         'stx:libhtml'
"/            'stx:libcomp'         'stx:libwidg2'        'stx:libui'
"/            'stx:libboss'         'stx:libdb'
"/        )
"/    includes:self package) ifTrue:[
"/        ^ '-H$(INCLUDE)'
"/    ].
    ^ '-H.'

    "Created: / 18-08-2006 / 13:01:52 / cg"
    "Modified: / 14-09-2006 / 15:38:25 / cg"
! !

!LibraryDefinition class methodsFor:'queries'!

canHaveExtensions
    "return true, if this class allows extensions from other packages.
     Private classes, namespaces and projectDefinitions dont allow this"

    ^ self == ApplicationDefinition

    "
     Smalltalk allClasses select:[:each | each canHaveExtensions not]
    "

    "Created: / 30-08-2006 / 15:29:53 / cg"
! !

!LibraryDefinition class methodsFor:'sanity checks'!

searchForInconsistencies
    self searchForNeverCompiledSuperclasses.

"
    self searchForInconsistencies
    DapasX_Datenbasis searchForInconsistencies  
"

    "Created: / 09-08-2006 / 16:30:46 / fm"
!

searchForNeverCompiledSuperclasses
      self compiled_classesDo:[:includedClass | 
            includedClass allSuperclassesDo:[:eachSuperClass |
                eachSuperClass package == Project noProjectID ifTrue:[ 
                    self inconsistency:'uncompiled superclass: ' , eachSuperClass name
                ].
            ]
      ].

"
    self searchForNeverCompiledSuperclasses
    DapasX_Datenbasis searchForNeverCompiledSuperclasses  
"

    "Created: / 09-08-2006 / 16:31:54 / fm"
! !

!LibraryDefinition class methodsFor:'testing'!

isLibraryDefinition
    ^ self ~~ LibraryDefinition

    "
     stx_libboss isLibraryDefinition
     ProjectDefinition isLibraryDefinition
     LibraryDefinition isLibraryDefinition
    "

    "Created: / 23-08-2006 / 15:17:50 / cg"
!

isProjectDefinition
    ^ self ~~ LibraryDefinition

    "
     stx_libboss isProjectDefinition
     ProjectDefinition isProjectDefinition
    "

    "Created: / 17-08-2006 / 14:11:46 / cg"
    "Modified: / 21-08-2006 / 15:50:13 / cg"
! !

!LibraryDefinition class methodsFor:'update description'!

forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition
    super forEachMethodsCodeToCompileDo:aTwoArgBlock ignoreOldDefinition:ignoreOldDefinition.

    "Created: / 10-08-2006 / 16:35:47 / cg"
    "Modified: / 18-08-2006 / 16:22:49 / cg"
! !

!LibraryDefinition class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.66 2006-09-15 08:41:51 stefan Exp $'
! !