LibraryDefinition.st
author Claus Gittinger <cg@exept.de>
Fri, 18 Aug 2006 17:21:18 +0200
changeset 9590 4b6cfa035ecb
parent 9586 eb87399baea3
child 9593 b98246e98b36
permissions -rw-r--r--
*** empty log message ***

"
 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:libbasic3' }"

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"
! !

!LibraryDefinition class methodsFor:'file generation'!

fileNamesToGenerate
    ^ #( 
          #('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') 
     )

    "Modified: / 17-08-2006 / 20:03:00 / 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.

#
# position (of this package) in directory hierarchy:
# (must point to ST/X top directory, for tools and includes)
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)


#
# The next 2 defines should be left as-is
#  for a class-library package, you can uncomment the following:
#  (it does not hurt much, if you leave it as is - but you may NOT
#   uncomment it if object files are to be loaded individually later).
# INITCODESEPFLAG=$(SEPINITCODE)
#
#  the following MAY ONLY be uncommented for classes/classLibs,
#  which are ALWAYS statically included in the executable.
#  (i.e. NEVER for those which are subject to dynamic loading).
# COMMONSYMFLAG=$(COMMONSYMBOLS)
#
PACKAGE=$(MODULE):$(MODULE_DIR)
STCLOCALOPT=-I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -H. ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG)


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


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

all:: preMake classLibRule postMake


# 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 $@
"
'
# if other things are to be compiled,
# add target definitions here,
# and list them in LOCAL_EXTRA_TARGETS above.
# (care for make syntax - TABS are required in the actions)
# foo:  foo.o
#%(TAB)$(CC) -o foo foo.o

# ''make depend'' will add dependency info between
# BEGIN...END below
#
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
# ENDMAKEDEPEND --- do not remove this line

'

    "Created: / 08-08-2006 / 20:45:36 / fm"
    "Modified: / 09-08-2006 / 16:50:23 / fm"
    "Modified: / 18-08-2006 / 15:32:40 / cg"
!

make_dot_spec

^ 
'# $','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 specifications which are common to all platforms.
#

# Do NOT CHANGE THESE DEFINITIONS
# (otherwise, ST/X will have a hard time to find out the packages location from its packageID,
#  to find the source code of a class and to find the library for a package)
MODULE=%(MODULE)
MODULE_DIR=%(MODULE_DIRECTORY)
LIBNAME=%(LIBRARY_NAME)


# Argument(s) to the stc compiler (stc --usage).
#  -H.         : create header files locally
#                (if removed, they will be created as common
#  -Pxxx       : defines the package
#  -Zxxx       : a prefix for variables within the classLib
#  -Dxxx       : defines passed to to CC for inline C-code
#  -Ixxx       : include path passed to CC for inline C-code
#  +optspace   : optimized for space
#  +optspace2  : optimized more for space
#  +optspace3  : optimized even more for space
#  +optinline  : generate inline code for some ST constructs
#  +inlineNew  : additionally inline new
#  +inlineMath : additionally inline some floatPnt math stuff
#
# ********** OPTIONAL: MODIFY the next line(s) ***
# STCLOCALOPTIMIZATIONS=+optinline +inlineNew
# STCLOCALOPTIMIZATIONS=+optspace3
STCLOCALOPTIMIZATIONS=%(STCOPTIMIZATIONOPTIONS)


# Argument(s) to the stc compiler (stc --usage).
#  -warn            : no warnings
#  -warnNonStandard : no warnings about ST/X extensions
#  -warnEOLComments : no warnings about EOL comment extension
#  -warnPrivacy     : no warnings about privateClass extension
#
# ********** OPTIONAL: MODIFY the next line(s) ***
# STCWARNINGS=-warn
# STCWARNINGS=-warnNonStandard
# STCWARNINGS=-warnEOLComments
STCWARNINGS=%(STCWARNINGOPTIONS)


OBJS= \
%(OBJECTS)
'

    "Created: / 08-08-2006 / 19:31:29 / fm"
    "Modified: / 09-08-2006 / 15:10:57 / fm"
    "Modified: / 18-08-2006 / 15:32: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).
#
TOP=%(TOP)

!!INCLUDE $(TOP)\rules\stdHeader_nt

!!INCLUDE Make.spec

LOCALINCLUDES=%(LOCAL_INCLUDES)

PACKAGE=$(MODULE):$(MODULE_DIR)
STCLOCALOPT=-I. $(LOCALINCLUDES) -H. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) ''-P$(PACKAGE)'' ''-Z$(LIBNAME)'' $(COMMONSYMFLAG) $(INITCODESEPFLAG)
RESFILES=%(RESFILENAME)

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

!!INCLUDE $(TOP)\rules\stdRules_nt

# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
# ENDMAKEDEPEND --- do not remove this line
'

    "Created: / 09-08-2006 / 11:44:20 / fm"
    "Modified: / 09-08-2006 / 19:59:32 / fm"
    "Modified: / 18-08-2006 / 17:18:55 / cg"
!

objectLine_make_dot_spec

^'    %(CLASS).$(O) \'

    "Created: / 08-08-2006 / 20:16:46 / fm"
! !

!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: / 18-08-2006 / 17:14:00 / 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"
!

extensionLine_libInit_dot_cc_mappings

^Dictionary new                                               
    at: #'LIBRARY_NAME' put: [self libraryName];
    yourself

    "Created: / 09-08-2006 / 11:19:59 / fm"
!

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"
!

lib_dot_rc_mappings

^Dictionary new
    at: #'FILEVERSION' put: ['5,2,8,1'];
    at: #'PRODUCTVERSION' put: ['5,2,8,1'];
    at: #'FILETYPE' put: 'VFT_DLL';
    yourself

    "Created: / 17-08-2006 / 19:35:05 / cg"
!

make_dot_proto_mappings
    ^ Dictionary new
        at: #'TAB' put: ( Character tab asString );
        at: #'TOP' put: ( self unixPathToTop );
        at: #'SUBDIRECTORIES' put: [self generateSubDirectories];
        at: #'LOCAL_INCLUDES' put: [self generateUnixLocalIncludes];
        at: #'LOCAL_DEFINES' put: '';
        at: #'COMMONSYMFLAG' put: (self commonSymbolsFlag);
        yourself

    "Created: / 09-08-2006 / 11:20:45 / fm"
    "Modified: / 09-08-2006 / 16:44:48 / fm"
    "Modified: / 18-08-2006 / 12:59:05 / cg"
!

make_dot_spec_mappings
    |d|

    d := super make_dot_spec_mappings.
    d
        at: #'LIBRARY_NAME' put: ( self libraryName );
        at: #'OBJECTS' put: [self generateObjects_make_dot_spec].
    ^ d

    "Created: / 09-08-2006 / 11:21:06 / fm"
    "Modified: / 18-08-2006 / 11:45:18 / cg"
!

nt_dot_def_mappings

^Dictionary new
    at: #'LIBRARY_NAME' put: [self libraryName];
    at: #'DESCRIPTION' put: [self description storeString];
    at: #'VERSION_NUMBER' put: [self versionNumber];
    yourself

    "Created: / 09-08-2006 / 11:21:21 / fm"
!

nt_dot_mak_mappings
    |d resFileName|

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

    d := super nt_dot_mak_mappings.
    d
        at: #'LOCAL_INCLUDES' put: [self generateMsdosLocalIncludes];
        at: #'COMMONSYMFLAG' put: (self commonSymbolsFlag);
        at: #'RESFILENAME' put: resFileName.
    ^ d.

    "Created: / 09-08-2006 / 11:44:36 / fm"
    "Modified: / 09-08-2006 / 20:00:01 / fm"
    "Modified: / 18-08-2006 / 17:20:25 / cg"
!

objectLine_make_dot_spec_mappings: aClassName

^Dictionary new                                               
    at: #'CLASS' put: [(Smalltalk classNamed:aClassName) classFilename asFilename withoutSuffix baseName];
    yourself

    "Created: / 08-08-2006 / 20:17:28 / fm"
    "Modified: / 09-08-2006 / 18:26:52 / fm"
!

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'
        )
    includes:self package) ifTrue:[
        ^ '$(COMMONSYMBOLS)'
    ].
    ^ ''

    "Created: / 18-08-2006 / 13:01:52 / cg"
!

generateClassLines_libInit_dot_cc
    ^ String streamContents:[:s |
        |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 
            ].

        self compiled_classNames do:putLineForClassName.
        self compiled_classNames_unix notEmpty ifTrue:[
            self compiled_classNames_unix do:putLineForClassName
        ].
        self compiled_classNames_windows notEmpty ifTrue:[
            self compiled_classNames_windows do:putLineForClassName
        ].
    ]

    "
     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: / 18-08-2006 / 13:41:37 / cg"
!

generateExtensionLine_libInit_dot_cc
    |mappings|

    ^self extensionMethodNames isEmpty
        ifTrue:['']
        ifFalse:[ 
            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: / 18-08-2006 / 12:00:18 / cg"
!

generateMsdosLocalIncludes
    ^ String streamContents:[:s |
        self searchForProjectsWhichProvideHeaderFiles
            do:[:includeProjectName |    
                s nextPutAll:' -I',(self msdosPathToPackage: includeProjectName) 
            ]
    ]

    "
     DapasXProject generateLocalIncludes
     DapasX_Datenbasis generateLocalIncludes
    "

    "Created: / 09-08-2006 / 16:46:49 / fm"
    "Modified: / 18-08-2006 / 11:58:40 / cg"
!

generateObjects_make_dot_spec 
    |pivateClassesOf classes|

    classes := self compiled_classes.
    pivateClassesOf := IdentityDictionary new.
    classes do:[:each | pivateClassesOf at:each put:(each allPrivateClasses)].

    classes topologicalSort:[:a :b |
        "/ a must come before b iff:
        "/    b is a subclass of a
        "/    b has a private class which is a subclass of a

        |mustComeBefore pivateClassesOfB|

        mustComeBefore := false.                        
        (a isSharedPool and:[(b sharedPools includes: a name)]) ifTrue:[
            mustComeBefore := true
        ].

        mustComeBefore := mustComeBefore or:[b isSubclassOf:a].
        pivateClassesOfB := pivateClassesOf at:b.
        pivateClassesOfB do:[:eachClassInB |
            mustComeBefore := mustComeBefore or:[eachClassInB isSubclassOf:a]
        ].
        mustComeBefore
    ].

    ^ String streamContents:[:s |
        classes do:[:eachClass |
            |mappings newObjectLine|

            mappings := self objectLine_make_dot_spec_mappings: eachClass name.
            newObjectLine := self replaceMappings: mappings in: self objectLine_make_dot_spec.
            s nextPutLine:newObjectLine. 
        ].
        self extensionMethodNames notEmpty
            ifTrue:[
                s nextPutLine:'    extensions.$(O) \'. 
            ]
    ]
"
    bosch_dapasx_hw_schnittstellen_Definition generateObjects_make_dot_spec
    DapasXProject generateObjects_make_dot_spec
    DapasX_Datenbasis generateObjects_make_dot_spec

"

    "Created: / 09-08-2006 / 11:24:39 / fm"
!

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

    "
     DapasXProject generateSubDirectories
     DapasX_Datenbasis generateSubDirectories
    "

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

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

    "
     DapasXProject generateLocalIncludes
     DapasX_Datenbasis generateLocalIncludes
    "

    "Created: / 09-08-2006 / 16:46:49 / fm"
    "Modified: / 18-08-2006 / 11:58:45 / 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'!

isProjectDefinition
    ^ self ~~ ProjectDefinition

    "Created: / 17-08-2006 / 14:11:46 / cg"
! !

!LibraryDefinition class methodsFor:'update description'!

autoloadedClassNames_code
    |compiled excluded|

    compiled := self compiled_classNames , self compiled_classNames_windows , self compiled_classNames_unix.
    excluded := self excluded_classNames.
    ^ String streamContents:[:s |
        s nextPutLine:'autoloaded_classNames'.
        s nextPutLine:'    ^ #('.
        self searchForClasses do:[:eachClass |
            (false "eachClass wasAutoloaded" or:[ eachClass isLoaded not ]) ifTrue:[
                (compiled includes:eachClass name) ifFalse:[
                    (excluded includes:eachClass name) ifFalse:[
                        s nextPutAll:'        '; nextPutLine:eachClass name asString storeString
                    ]
                ]
             ]
        ].
        s nextPutLine:')'
    ].

    "
     DapasXProject autoloadedClassNames_code
     DapasX_Datenbasis autoloadedClassNames_code
     stx_libbasic3 autoloadedClassNames_code
    "

    "Created: / 17-08-2006 / 20:55:35 / cg"
    "Modified: / 18-08-2006 / 13:38:37 / cg"
!

classNames_code
    |autoloaded excluded|

    autoloaded := self autoloaded_classNames.
    excluded := self excluded_classNames.

    ^ String streamContents:[:s |
        s nextPutLine:'compiled_classNames'.
        s nextPutLine:'    ^ #('.
        self searchForClasses do:[:eachClass |
            eachClass isPrivate ifFalse:[
                (autoloaded includes:eachClass name) ifFalse:[ 
                    (excluded includes:eachClass name) ifFalse:[ 
                        s nextPutAll:'        '; nextPutLine:eachClass name asString storeString
                     ]
                 ]
             ]
        ].
        s nextPutLine:')'
    ].

"
    bosch_dapasx_interactiver_editor classNamesGeneratedString
"

    "Modified: / 08-08-2006 / 19:24:34 / fm"
    "Created: / 17-08-2006 / 21:03:07 / cg"
!

extensionMethodNames_code
    |generatedString |

    ^ String streamContents:[:s |
        s nextPutLine:'extensionMethodNames'.
        s nextPutLine:'    ^ #('.
        self searchForExtensions do:[:eachMethod | 
            s nextPutAll:eachMethod mclass name storeString. 
            s nextPutAll:' '.
            s nextPutLine: eachMethod selector storeString. 
        ]. 
        s nextPutLine:')'
    ].

"
    self extensionMethodNames_code
"

    "Created: / 17-08-2006 / 21:21:48 / cg"
!

forEachMethodsCodeToCompileDo:aTwoArgBlock
    super forEachMethodsCodeToCompileDo:aTwoArgBlock.

    aTwoArgBlock 
        value:self autoloadedClassNames_code
        value:'description'.

    aTwoArgBlock
        value: self classNames_code
        value: 'description'.

    (self theMetaclass includesSelector:#excluded_classNames) ifFalse:[
        aTwoArgBlock
            value: 'excluded_classNames\^ #()' withCRs
            value: 'description'.
    ].

    aTwoArgBlock 
        value: self extensionMethodNames_code
        value: 'description'.

    "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.26 2006-08-18 15:21:18 cg Exp $'
! !