Changeset 413 for trunk/Library
- Timestamp:
- Feb 22, 2019, 1:44:06 AM (6 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:ignore
set to
[Ee][Nn][Vv].[Ii][Nn][Cc]
-
Property svn:ignore
set to
-
trunk/Library/makeall.cmd
r17 r413 1 /* Rexx */2 3 1 /* ------------------------------------------------------------------------- */ 4 2 /* NewView - a new OS/2 Help Viewer */ 5 3 /* */ 6 4 /* Copyright 2003-2006 Aaron Lawrence (aaronl at consultant dot com) */ 7 /* Copyright 2006 Ronald Brill (rbri at rbri.org)*/5 /* Copyright 2006-2017 Ronald Brill (rbri at rbri.org) */ 8 6 /* */ 9 7 /* This software is released under the Gnu Public License */ … … 14 12 /* 3.) Compile */ 15 13 /* ------------------------------------------------------------------------- */ 14 Signal On NoValue 15 Signal On Error 16 Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs' 17 Call SysLoadFuncs 18 19 Call SetLocal 20 nv_rc = SetUpPaths() 21 If nv_rc <> 0 Then Exit rc 22 23 nv_build_dir = Value('NV_BUILD',,'OS2ENVIRONMENT') 24 nv_rc = SysMkDir( nv_build_dir ) 16 25 17 26 18 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT') 19 nv_rc = SysMkDir(nv_build_dir) 27 /* Project-specific section follows */ 20 28 21 29 nv_build_dir_lib = nv_build_dir||'\library' 22 nv_rc = SysMkDir(nv_build_dir_lib) 23 24 /* TODO dir cleanup */ 25 30 nv_rc = SysMkDir( nv_build_dir_lib ) 26 31 27 32 /* create temp project file */ 28 33 sprFile = 'acl_build.spr' 29 34 30 if STREAM(sprFile,'C','QUERY EXISTS') <> "" 31 then do 32 say sprFile 'exists, deleting' 33 'erase ' sprFile 34 end 35 36 call lineout sprFile, '[Directories]' 37 call lineout sprFile, '' 38 call lineout sprFile, 'OutDir='||nv_build_dir_lib 39 call lineout sprFile, 'LibDir='||nv_build_dir||'\sibyl\lib' 40 call lineout sprFile, '' 41 call lineout sprFile, '[Project Files]' 42 call lineout sprFile, '' 43 call lineout sprFile, 'Primary=.\ACLLibrary.pas' 44 call lineout sprFile 45 46 say sprFile 'created' 35 If Stream( sprFile,'C','QUERY EXISTS') == '' Then Do 36 Call Lineout sprFile, '[Directories]' 37 Call Lineout sprFile, '' 38 Call Lineout sprFile, 'OutDir='||nv_build_dir_lib 39 Call Lineout sprFile, 'LibDir='||nv_build_dir||'\sibyl\lib' 40 Call Lineout sprFile, '' 41 Call Lineout sprFile, '[Project Files]' 42 Call Lineout sprFile, '' 43 Call Lineout sprFile, 'Primary=.\ACLLibrary.pas' 44 Call Lineout sprFile 45 Say sprFile 'created' 46 End 47 47 48 48 'spc20' sprFile 49 49 50 /* spc20 acllibrary.spr */ 50 Call EndLocal 51 Exit 0 51 52 53 54 /* -------------------------------------------------------------------------- * 55 * SetUpPaths * 56 * -------------------------------------------------------------------------- */ 57 SetUpPaths: PROCEDURE EXPOSE g. 58 g.!env_inc = Stream('..\env.inc', 'C', 'QUERY EXISTS') 59 g.!watcom = GetVar('WATCOM') 60 If g.!watcom == '' Then Do 61 Say '%WATCOM% environment variable is not set.' 62 Say 'Please set %WATCOM% to the location of your OpenWatcom installation.' 63 Return 1 64 End 65 g.!nv_dev = GetVar('NV_DEV') 66 If g.!nv_dev == '' Then Do 67 Say '%NV_DEV% environment variable is not set.' 68 Say 'Please set %NV_DEV% to the top-level path of the development tree.' 69 Return 1 70 End 71 '@SET NV_BUILD='g.!nv_dev'\build' 72 '@SET PATH=%WATCOM%\BINP;%WATCOM%\BINW;%NV_BUILD%\newview;%NV_BUILD%\newview_stub;%PATH%' 73 '@SET INCLUDE=%WATCOM%\H;%WATCOM%\H\OS2;%PMPRINTF_PATH%;' 74 '@SET HELP=%WATCOM%\BINP\HELP;%HELP%' 75 '@SET BOOKSHELF=%WATCOM%\BINP\HELP;%BOOKSHELF%' 76 '@SET BEGINLIBPATH=%WATCOM%\BINP\DLL;%BEGINLIBPATH%;' 77 Return 0 78 79 80 /* -------------------------------------------------------------------------- * 81 * GetVar * 82 * -------------------------------------------------------------------------- */ 83 GetVar: Procedure Expose g. 84 Parse Upper Arg env_var 85 val = Value( env_var,, 'OS2ENVIRONMENT') 86 If val == '' Then Do 87 if g.!env_inc <> '' Then Do 88 match.0 = 0 89 mstring = 'SET' env_var'=' 90 Call SysFileSearch mstring, g.!env_inc, 'match.' 91 If match.0 > 0 Then Do i = 1 to match.0 92 match.i = Translate( Strip( match.i )) 93 If Left( match.i, Length( mstring )) == mstring Then Do 94 Parse Var match.i '='val 95 Leave 96 End 97 End 98 End 99 End 100 Return val 101 102 103 /* -------------------------------------------------------------------------- * 104 * Condition Handlers * 105 * -------------------------------------------------------------------------- */ 106 NoValue: 107 Say 108 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++' STRIP( SOURCELINE( sigl )) 109 Call Lineout 'STDERR:', Right( sigl, 6 ) '+++ Non-initialized variable.' 110 Say 111 Exit sigl 112 113 Error: 114 Say 115 Call Lineout 'STDERR:', '+++ Error:' Condition('D') 116 Say 117 Exit sigl 118 119
Note:
See TracChangeset
for help on using the changeset viewer.