home *** CD-ROM | disk | FTP | other *** search
- /* Make.CED
- Passes the contents of the editor file into PIPE:, and
- loads the compiler to compile it. Then it calls the
- assembler and linker. */
-
- options results
-
- 'status 21'
- filename = result
-
- if lastpos('.',filename) = 0 then
- OutFileName = ' T:' || filename || '.s'
- else
- OutFileName = ' T:' || Left(filename, LastPos('.',filename) - 1) || '.s'
-
- if open('InputFile', 'PIPE:' || filename, 'W') then do
- Address command 'run >nil: <nil: Pascal >PIPE:PCQ.errors -q PIPE:' || filename || OutFileName
- 'status 17'
- TotalLines = Result
- do CurrentLine = 1 to TotalLines
- 'jumpto 'CurrentLine' 1'
- 'status 55'
- dummy = writech('InputFile', Result)
- end
- Close('InputFile')
- ErrorCount = 0
- if Open('ErrorFile', 'PIPE:PCQ.errors', 'R') then do
- ErrorMsg = ReadLn('ErrorFile')
- do while ErrorMsg ~= ""
- if ErrorMsg = "Compilation Aborted" then
- 'okay1 'ErrorMsg
- else do
- Parse var ErrorMsg 'Line ' LineNumber ' :' Description
- 'Jumpto 'LineNumber' 1'
- 'Okay1 'Description
- ErrorCount = ErrorCount + 1
- end;
- ErrorMsg = ReadLn('ErrorFile')
- end;
- Close('ErrorFile')
- end; else do
- 'okay1 Could not open the Error File'
- Exit
- end
- end
-
- if ErrorCount ~= 0 then do
- 'okay1 There were 'ErrorCount' errors'
- Exit
- end;
-
- InFileName = OutFileName
-
- if lastpos('.',filename) = 0 then
- OutFileName = filename || '.o'
- else
- OutFileName = Left(filename, LastPos('.',filename) - 1) || '.o'
-
- 'status 20'
-
- OutFileName = Result || OutFileName /* add path information */
-
- address command 'A68k 'InFileName' 'OutFileName
-
- if Exists(OutFileName) then do
-
- Address command 'delete 'InFileName
-
- InFileName = OutFileName
-
- if lastpos('.',filename) = 0 then
- OutFileName = filename
- else
- OutFileName = Left(filename, LastPos('.',filename) - 1)
-
- 'status 20'
- OutFileName = Result || OutFileName
-
- Address command 'Blink 'InFileName' to 'OutFileName' library PCQ.lib'
-
- if Exists(OutFileName) then
- 'okay1 'OutFileName' compiled and linked successfully'
- else
- 'okay1 Could not link correctly'
- end; else
- 'Okay1 Could not assemble correctly'
-