Changeset 413 for trunk/Library


Ignore:
Timestamp:
Feb 22, 2019, 1:44:06 AM (6 years ago)
Author:
ataylor
Message:

Revamp of build system, and added ConfigApps to repository.

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]
  • trunk/Library/makeall.cmd

    r17 r413  
    1 /* Rexx */
    2 
    31/* ------------------------------------------------------------------------- */
    42/* NewView - a new OS/2 Help Viewer                                          */
    53/*                                                                           */
    64/* 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)                       */
    86/*                                                                           */
    97/* This software is released under the Gnu Public License                    */
     
    1412/* 3.) Compile                                                               */
    1513/* ------------------------------------------------------------------------- */
     14Signal On NoValue
     15Signal On Error
     16Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
     17Call SysLoadFuncs
     18
     19Call SetLocal
     20nv_rc = SetUpPaths()
     21If nv_rc <> 0 Then Exit rc
     22
     23nv_build_dir = Value('NV_BUILD',,'OS2ENVIRONMENT')
     24nv_rc = SysMkDir( nv_build_dir )
    1625
    1726
    18 nv_build_dir = value('NV_BUILD', , 'OS2ENVIRONMENT')
    19 nv_rc = SysMkDir(nv_build_dir)
     27/* Project-specific section follows */
    2028
    2129nv_build_dir_lib = nv_build_dir||'\library'
    22 nv_rc = SysMkDir(nv_build_dir_lib)
    23 
    24 /* TODO dir cleanup */
    25 
     30nv_rc = SysMkDir( nv_build_dir_lib )
    2631
    2732/* create temp project file */
    2833sprFile = 'acl_build.spr'
    2934
    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'
     35If 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'
     46End
    4747
    4848'spc20' sprFile
    4949
    50 /* spc20 acllibrary.spr */
     50Call EndLocal
     51Exit 0
    5152
     53
     54/* -------------------------------------------------------------------------- *
     55 * SetUpPaths                                                                 *
     56 * -------------------------------------------------------------------------- */
     57SetUpPaths: 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%;'
     77Return 0
     78
     79
     80/* -------------------------------------------------------------------------- *
     81 * GetVar                                                                     *
     82 * -------------------------------------------------------------------------- */
     83GetVar: 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
     100Return val
     101
     102
     103/* -------------------------------------------------------------------------- *
     104 * Condition Handlers                                                         *
     105 * -------------------------------------------------------------------------- */
     106NoValue:
     107    Say
     108    Call Lineout 'STDERR:', Right( sigl, 6 ) '+++' STRIP( SOURCELINE( sigl ))
     109    Call Lineout 'STDERR:', Right( sigl, 6 ) '+++ Non-initialized variable.'
     110    Say
     111Exit sigl
     112
     113Error:
     114    Say
     115    Call Lineout 'STDERR:', '+++ Error:' Condition('D')
     116    Say
     117Exit sigl
     118
     119
Note: See TracChangeset for help on using the changeset viewer.