Changeset 95
- Timestamp:
- May 2, 2011, 12:21:51 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/os2ahci/Makefile
r93 r95 127 127 $(CC) $(CFLAGS) $(CC_INCLUDE) $*.c 128 128 129 os2ahci.def: 130 $(BLDLEVEL) os2ahci.def.template os2ahci.def version.h 131 132 129 133 $(TARGET): $(OBJS) os2ahci.def Makefile 130 $(BLDLEVEL) os2ahci.def version.h131 134 $(LD) $(LFLAGS) $(OBJS),$(TARGET),$*.map,$(LIB_DIRS) $(LIBS),$*.def 132 135 $(MAPSYM) os2ahci -
trunk/tools/bldlvl.cmd
r88 r95 67 67 the BLDLEVEL and the Headerfile (*.H*) where 68 68 the required BLDLEVEL data is defined in */ 69 Parse Arg DefinitionFile HeaderFile .70 Do While ( DefinitionFile\="" & HeaderFile\="")69 Parse Arg TemplateFile DefinitionFile HeaderFile . 70 Do While (TemplateFile\="" & DefinitionFile\="" & HeaderFile\="") 71 71 /* We have valid commandline arguments, so first see 72 72 if the Headerfile contents are ok for us */ 73 73 ReturnCode=ParseHeaderFile() 74 74 If ReturnCode\=0 Then Leave 75 /* Parse the definition file (*.DEF)for the module75 /* Parse the template DEF file for the module 76 76 name, to see if we got a valid file */ 77 ReturnCode=Parse DefinitionFile()77 ReturnCode=ParseTemplateFile() 78 78 If ReturnCode\=0 Then Leave 79 /* Copy the definition file, because we're going to80 change the original */81 Command="@copy "||DefinitionFile||" "||DefinitionCopy||" /v >NUL"82 Command83 Command="@del "||DefinitionFile||" >NUL 2>&1"84 Command85 If (rc\=0) Then Do86 ReturnCode=287 Leave88 End89 79 90 80 /* Build DESCRIPTION statement for *.DEF file */ … … 97 87 Description=Description_Header||BldLevel||Description_Trailer 98 88 99 /* Copy the module definition file to be able to change100 the contents of the original one. In case of an error101 copy back the original one */102 89 ReturnCode=ModifyDefinitionFile() 103 90 If ReturnCode\=0 Then Do 104 Command="@copy "||DefinitionCopy||" "||DefinitionFile||" /v >NUL"105 Command106 91 Command="@del "||DefinitionCopy||" >NUL 2>&1" 107 92 Command … … 110 95 111 96 /* Exit with success */ 97 Command="@copy "||DefinitionCopy||" "||DefinitionFile||" /v >NUL" 98 Command 112 99 Command="@del "||DefinitionCopy||" >NUL 2>&1" 113 100 Command … … 175 162 * ReturnCode .... Error code (0 if no error) * 176 163 \*--------------------------------------------------------------------------------------*/ 177 Parse DefinitionFile:164 ParseTemplateFile: 178 165 /* Read ahead 1st line */ 179 Command=Stream( DefinitionFile, 'C', 'OPEN READ')166 Command=Stream(TemplateFile, 'C', 'OPEN READ') 180 167 LinesLeft=2 181 CurrentLine=LineIn( DefinitionFile)168 CurrentLine=LineIn(TemplateFile) 182 169 /* Do while there are lines in the file */ 183 170 Do While(LinesLeft>0) … … 202 189 If (Statement="DESCRIPTION") Then 203 190 DescriptionStatement=Options 204 CurrentLine=LineIn( DefinitionFile)191 CurrentLine=LineIn(TemplateFile) 205 192 /* As Lines() returns 0 after having read the last line 206 193 we have to ensure that this last line will be processed too */ 207 If (Lines( DefinitionFile)=0) Then194 If (Lines(TemplateFile)=0) Then 208 195 LinesLeft=LinesLeft-1 209 196 End 210 197 /* Close the stream */ 211 Command=Stream( DefinitionFile, 'C', 'CLOSE')198 Command=Stream(TemplateFile, 'C', 'CLOSE') 212 199 If (ModuleName\="" & DescriptionStatement\="") Then 213 200 Return 0 … … 225 212 ModifyDefinitionFile: 226 213 /* Read and write ahead 1st line */ 227 Command=Stream(Definition File, 'C', 'OPEN WRITE')214 Command=Stream(DefinitionCopy, 'C', 'OPEN WRITE') 228 215 If (Command="ERROR") Then 229 216 Return 30 230 Command=Stream( DefinitionCopy, 'C', 'OPEN READ')217 Command=Stream(TemplateFile, 'C', 'OPEN READ') 231 218 If (Command="ERROR") Then 232 219 Return 31 233 220 LinesLeft=2 234 CurrentLine=LineIn( DefinitionCopy)221 CurrentLine=LineIn(TemplateFile) 235 222 /* Do while there are lines in the file */ 236 223 Do While(LinesLeft>0) … … 243 230 Statement=Space(Statement, 0) 244 231 If (Statement="DESCRIPTION") Then Do 245 Command=LineOut(Definition File, Description)232 Command=LineOut(DefinitionCopy, Description) 246 233 End 247 234 Else Do 248 Command=LineOut(Definition File, CurrentLine)249 End 250 CurrentLine=LineIn( DefinitionCopy)235 Command=LineOut(DefinitionCopy, CurrentLine) 236 End 237 CurrentLine=LineIn(TemplateFile) 251 238 /* As Lines() returns 0 after having read the last line 252 239 we have to ensure that this last line will be processed too */ 253 If (Lines( DefinitionCopy)=0) Then240 If (Lines(TemplateFile)=0) Then 254 241 LinesLeft=LinesLeft-1 255 242 End 256 243 /* Close the streams */ 257 Command=Stream( DefinitionFile, 'C', 'CLOSE')244 Command=Stream(TemplateFile, 'C', 'CLOSE') 258 245 Command=Stream(DefinitionCopy, 'C', 'CLOSE') 259 246 Return 0
Note:
See TracChangeset
for help on using the changeset viewer.