Changeset 95


Ignore:
Timestamp:
May 2, 2011, 12:21:51 PM (14 years ago)
Author:
markus
Message:

removed os2ahci.def from SVN, since it's a created file; changed makefile and bldlevel.cmd accordingly

Location:
trunk
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/Makefile

    r93 r95  
    127127        $(CC) $(CFLAGS) $(CC_INCLUDE) $*.c
    128128
     129os2ahci.def:
     130        $(BLDLEVEL) os2ahci.def.template os2ahci.def version.h
     131
     132
    129133$(TARGET): $(OBJS) os2ahci.def Makefile
    130         $(BLDLEVEL) os2ahci.def version.h
    131134        $(LD) $(LFLAGS) $(OBJS),$(TARGET),$*.map,$(LIB_DIRS) $(LIBS),$*.def
    132135        $(MAPSYM) os2ahci
  • trunk/tools/bldlvl.cmd

    r88 r95  
    6767                                           the BLDLEVEL and the Headerfile (*.H*) where
    6868                                           the required BLDLEVEL data is defined in */
    69 Parse Arg DefinitionFile HeaderFile .
    70 Do While (DefinitionFile\="" & HeaderFile\="")
     69Parse Arg TemplateFile DefinitionFile HeaderFile .
     70Do While (TemplateFile\="" & DefinitionFile\="" & HeaderFile\="")
    7171  /* We have valid commandline arguments, so first see
    7272   if the Headerfile contents are ok for us */
    7373  ReturnCode=ParseHeaderFile()
    7474  If ReturnCode\=0 Then Leave
    75   /* Parse the definition file (*.DEF) for the module
     75  /* Parse the template DEF file for the module
    7676   name, to see if we got a valid file */
    77   ReturnCode=ParseDefinitionFile()
     77  ReturnCode=ParseTemplateFile()
    7878  If ReturnCode\=0 Then Leave
    79   /* Copy the definition file, because we're going to
    80    change the original */
    81   Command="@copy "||DefinitionFile||" "||DefinitionCopy||" /v >NUL"
    82   Command
    83   Command="@del "||DefinitionFile||" >NUL 2>&1"
    84   Command
    85   If (rc\=0) Then Do
    86     ReturnCode=2
    87     Leave
    88     End
    8979 
    9080  /* Build DESCRIPTION statement for *.DEF file */
     
    9787  Description=Description_Header||BldLevel||Description_Trailer
    9888 
    99   /* Copy the module definition file to be able to change
    100    the contents of the original one. In case of an error
    101    copy back the original one */
    10289  ReturnCode=ModifyDefinitionFile()
    10390  If ReturnCode\=0 Then Do
    104     Command="@copy "||DefinitionCopy||" "||DefinitionFile||" /v >NUL"
    105     Command
    10691    Command="@del "||DefinitionCopy||" >NUL 2>&1"
    10792    Command
     
    11095
    11196  /* Exit with success */
     97  Command="@copy "||DefinitionCopy||" "||DefinitionFile||" /v >NUL"
     98  Command
    11299  Command="@del "||DefinitionCopy||" >NUL 2>&1"
    113100  Command
     
    175162 *      ReturnCode .... Error code (0 if no error)                                      *
    176163 \*--------------------------------------------------------------------------------------*/
    177 ParseDefinitionFile:
     164ParseTemplateFile:
    178165/* Read ahead 1st line */
    179   Command=Stream(DefinitionFile, 'C', 'OPEN READ')
     166  Command=Stream(TemplateFile, 'C', 'OPEN READ')
    180167  LinesLeft=2
    181   CurrentLine=LineIn(DefinitionFile)
     168  CurrentLine=LineIn(TemplateFile)
    182169/* Do while there are lines in the file */
    183170  Do While(LinesLeft>0)
     
    202189    If (Statement="DESCRIPTION") Then
    203190      DescriptionStatement=Options
    204     CurrentLine=LineIn(DefinitionFile)
     191    CurrentLine=LineIn(TemplateFile)
    205192    /* As Lines() returns 0 after having read the last line
    206193     we have to ensure that this last line will be processed too */
    207     If (Lines(DefinitionFile)=0) Then
     194    If (Lines(TemplateFile)=0) Then
    208195      LinesLeft=LinesLeft-1
    209196    End
    210197/* Close the stream */
    211   Command=Stream(DefinitionFile, 'C', 'CLOSE')
     198  Command=Stream(TemplateFile, 'C', 'CLOSE')
    212199  If (ModuleName\="" & DescriptionStatement\="") Then
    213200    Return 0
     
    225212ModifyDefinitionFile:
    226213/* Read and write ahead 1st line */
    227   Command=Stream(DefinitionFile, 'C', 'OPEN WRITE')
     214  Command=Stream(DefinitionCopy, 'C', 'OPEN WRITE')
    228215  If (Command="ERROR") Then
    229216    Return 30
    230   Command=Stream(DefinitionCopy, 'C', 'OPEN READ')
     217  Command=Stream(TemplateFile, 'C', 'OPEN READ')
    231218  If (Command="ERROR") Then
    232219    Return 31
    233220  LinesLeft=2
    234   CurrentLine=LineIn(DefinitionCopy)
     221  CurrentLine=LineIn(TemplateFile)
    235222/* Do while there are lines in the file */
    236223  Do While(LinesLeft>0)
     
    243230    Statement=Space(Statement, 0)
    244231    If (Statement="DESCRIPTION") Then Do
    245       Command=LineOut(DefinitionFile, Description)
     232      Command=LineOut(DefinitionCopy, Description)
    246233      End
    247234    Else Do
    248       Command=LineOut(DefinitionFile, CurrentLine)
    249       End
    250     CurrentLine=LineIn(DefinitionCopy)
     235      Command=LineOut(DefinitionCopy, CurrentLine)
     236      End
     237    CurrentLine=LineIn(TemplateFile)
    251238    /* As Lines() returns 0 after having read the last line
    252239     we have to ensure that this last line will be processed too */
    253     If (Lines(DefinitionCopy)=0) Then
     240    If (Lines(TemplateFile)=0) Then
    254241      LinesLeft=LinesLeft-1
    255242    End
    256243/* Close the streams */
    257   Command=Stream(DefinitionFile, 'C', 'CLOSE')
     244  Command=Stream(TemplateFile, 'C', 'CLOSE')
    258245  Command=Stream(DefinitionCopy, 'C', 'CLOSE')
    259246Return 0
Note: See TracChangeset for help on using the changeset viewer.