pfmaptst.gms : Checks files in distribution

Description

Compares the list of existing files with the list of expected files.

Contributor: Lutz

 For changes on all platforms


Small Model of Type : GAMS


Category : GAMS Test library


Main file : pfmaptst.gms

$title 'Checks files in distribution' (GMSPFMAPTEST,SEQ=352)

$ontext
Compares the list of existing files with the list of expected files.

Contributor: Lutz
$offtext

$offlisting
$if not set GOLD $set GOLD 0
*For changes on all platforms
$set ALLPF (DEG,LEG,WEI)
$set ALLUX (DEG,LEG,   )

alias (*,prd,prda,dir,fil);
set ppp                                Possible platforms /aix,bgp,lnx,sig,sol,sox,vs8,deg,dei,dig,leg,wei/;

*Sets containing input data
set curfil(prd,dir,fil)                Files of current version
    lstall(ppp,prd,dir,fil)            Files of last version containing all platforms
    lstfil(prd,dir,fil)                Files of last version
    curprd(prd)                        All products contained in current version
    lstprd(prd)                        All products contained in last version
*Sets containing expected products/files
    expprd(prd)                        Expected products
    expfil(prd,dir,fil)                Expected files
*Sets containing errors
    nexprd(prd)                        Products being not expected but contained in current version
    misprd(prd)                        Products missing in current version
    drwprd(prd)                        Products dropped wrongly (dropped but not in previous version)
    adwprd(prd)                        Products added wrongly (added but already in previous version)
    nexfil(prd,dir,fil)                Files per product and directory being not expected but contained in current version
    misfil(prd,dir,fil)                Files per product and directory missing in current version
    drwfil(prd,dir,fil)                Files per product and directory dropped wrongly (dropped but not in previous version)
    adwfil(prd,dir,fil)                Files per product and directory added wrongly (added but already in previous version)
    nexfila(prd,dir,fil)               Files per product and directory being not expected but contained in current version (for solver aliases)
    misfila(prd,dir,fil)               Files per product and directory missing in current version (for solver aliases)
    wronga(prd)                        Alias entered for a product which does not exist
*Sets containing expected changes
$onempty
    newprd(ppp,prd)             New products
                                /
                                /
    drpprd(ppp,prd)             Dropped products
                                /
                                /

*$onecho > modlib.txt
*$offecho

$onecho > tstlib.txt
'platform01.861', 'qcp12.862', 'asyncfix01.863', 'savep2.864', 'convert16.865', 'embpy09.866', 'scensol8.867', 'gdxrename1.868', 'gdxrename2.869'
'scensol9.870', 'embpy10.871', 'etsuf01.872'
'emp33.873'
$offecho

*$onecho > emplib.txt
*$offecho

$onecho > datalib.txt
'ls.gdx', 'diabetes_data.gdx'
$offecho

*$onecho > apilib.txt
*$offecho

$onEchoV > wrapperlib.inc
                               (AIX,LEG,SOX).(%1 . '%2'           .('lib%3lib64.so'))
                                DEG         .(%1 . '%2'           .('lib%3lib64.dll'))
                                WEI         .(%1 . '%2'           .('%3lib64.dll'))
$offEcho

$onEchoV > api.inc
                                %ALLPF% . %1     .('./apifiles/C/api'        .('%2cc.c','%2cc.h')
                                                   './apifiles/CSharp/api'   . '%2cs.cs'
                                                   './apifiles/Delphi/api'   . '%2dcpdef.pas'
                                                   './apifiles/Fortran/api'  .('%2f9def.f90','%2f9glu.c','%2f9glu.h')
                                                   './apifiles/Java/api'     .('%2.java','%2jni.c')
                                                   './apifiles/Python/src'   .('%2cc.i','%2cc.py','%2cc_wrap.c','%2setup.py')
                                                   './apifiles/VBA/api'      . '%2vba.bas'
                                                   './apifiles/VBnet/api'    . '%2vbnet.vb')
                                    DEG . %1     .('./apifiles/Java/api'     . 'lib%2jni64.dylib'
                                                   './apifiles/Python/api_36'.('_%2cc.so', '%2cc.py')
                                                   './apifiles/Python/api_37'.('_%2cc.so', '%2cc.py')
                                                   './apifiles/Python/api_38'.('_%2cc.so', '%2cc.py')
                                                   './apifiles/Python/api_39'.('_%2cc.so', '%2cc.py'))
                                    LEG . %1     .('./apifiles/Java/api'     . 'lib%2jni64.so'
                                                   './apifiles/Python/api_36'.('_%2cc.so', '%2cc.py')
                                                   './apifiles/Python/api_37'.('_%2cc.so', '%2cc.py')
                                                   './apifiles/Python/api_38'.('_%2cc.so', '%2cc.py')
                                                   './apifiles/Python/api_39'.('_%2cc.so', '%2cc.py'))
                                    WEI . %1     .('./apifiles/Java/api'     . '%2jni64.dll'
                                                   './apifiles/Python/api_36'.('_%2cc.pyd', '%2cc.py')
                                                   './apifiles/Python/api_37'.('_%2cc.pyd', '%2cc.py')
                                                   './apifiles/Python/api_38'.('_%2cc.pyd', '%2cc.py')
                                                   './apifiles/Python/api_39'.('_%2cc.pyd', '%2cc.py'))
$offEcho

    newfil(ppp,prd,dir,fil)     New files per product and directory /

                                 %ALLPF% .(
*                                          ModelLibrary  . './gamslib_ml'.(
*$include modlib.txt
*)
                                          TestLibrary   . './testlib_ml'.(
$include tstlib.txt
)
                                          DataLibrary   . './datalib_ml'.(
$include datalib.txt
)
*                                          EmpLibrary    . './emplib_ml'.(
*$include emplib.txt
*)
*                                          APILibrary    . './apilib_ml'.(
*$include apilib.txt
*)
                                          (Tools,GDXRRW).'./gdxrrw/source'  . 'gdxrrw_1.0.10.tar.gz'
                                          gamsAPI.'./apifiles/VBA' . ('transport.xlsm','chp.xlsm','chp2.xlsm','portfolio.xlsm','samurai.xlsm',
                                                                      'SpawnGAMS.xlsm','sudoku.xlsm')
                                          gamsCPP.'./apifiles/C++' .  'include.cmake'
                                          DataLibrary.'./apifiles/VBA' . ('transport.xlsm','chp.xlsm','chp2.xlsm','portfolio.xlsm','samurai.xlsm',
                                                                          'SpawnGAMS.xlsm','sudoku.xlsm')
                                          DataLibrary.'./datalib_ml' . ('transport.xlsm','chp.xlsm','chp2.xlsm','portfolio.xlsm','samurai.xlsm',
                                                                          'SpawnGAMS.xlsm','sudoku.xlsm')
                                          GAMS.'./inclib'.('rank.gms','gdxservice.gms','linalg.gms')
                                          matlabapi   . './apifiles/Matlab/api/+GAMS'.'HoldFixedAsync.m'
                                         )
*                                 %ALLUX%.(
*                                         )
                                DEG     .(
                                          gamsCPP.'./apifiles/C++/lib/clang'. 'libgamscpp.dylib'
                                          (Tools,GDXRRW).'./gdxrrw/osx'     . 'gdxrrw_1.0.10.tgz'
                                          scensolver.'.'.'libscncclib64.dylib'
                                          gams.          '.'                . 'libgfortran.5.dylib'
                                          baron.'.'.('libxprs360111.dylib','libxprl360111.dylib')
                                          knitro.'.'.'libknitro1240.dylib'
                                          localsolver.'.'.'liblocalsolver105.dylib'
                                          mosek.'.'.'libmosek64.9.3.dylib'
                                         )
                                LEG     .(
                                          (Tools,GDXRRW).'./gdxrrw/linux64' . 'gdxrrw_1.0.10_R_x86_64-pc-linux-gnu.tar.gz'
                                          odhcplex.'.'.'libheuristic604.so'
                                          odhcplex.'.'.'libcplex2010.so.odh604'
                                          odhcplex.'.'.'odh.lic'
                                          scensolver.'.'.'libscncclib64.so'
                                          xpress.'.'.'libxprs.so.38.01'
                                          xpress.'.'.'libxprs.so.38.01.03'
                                          xpress.'.'.'libxprl-3.1.5-x8.12.so'
                                          xpress.'.'.'libxprl.so.x8.12'
                                          baron.'.'.'libxprs.so.36.01.11'
                                          baron.'.'.'libxprl.so.x8.10'
                                          knitro.'.'.'libknitro1240.so'
                                          localsolver.'.'.'liblocalsolver105.so'
                                          mosek.'.'.'libmosek64.so.9.3'
                                         )
                                WEI     .(
                                          gamsCPP    .('./apifiles/C++/lib/vs2017'    . 'gamscpp.dll.manifest'
                                                       './apifiles/C++/lib/vs2019'    .('gamscpp.dll', 'gamscpp.dll.manifest', 'gamscpp.exp', 'gamscpp.lib')
                                                       './apifiles/C++'               . 'examples-vs2019.sln'
                                                       './apifiles/C++/domainchecking'. 'DomainChecking-vs2019.vcxproj'
                                                       './apifiles/C++/transportGDX'  . 'TransportGDX-vs2019.vcxproj'
                                                       './apifiles/C++/transport1'    . 'Transport1-vs2019.vcxproj'
                                                       './apifiles/C++/transport2'    . 'Transport2-vs2019.vcxproj'
                                                       './apifiles/C++/transport3'    . 'Transport3-vs2019.vcxproj'
                                                       './apifiles/C++/transport4'    . 'Transport4-vs2019.vcxproj'
                                                       './apifiles/C++/transport5'    . 'Transport5-vs2019.vcxproj'
                                                       './apifiles/C++/transport6'    . 'Transport6-vs2019.vcxproj'
                                                       './apifiles/C++/transport7'    . 'Transport7-vs2019.vcxproj'
                                                       './apifiles/C++/transport8'    . 'Transport8-vs2019.vcxproj'
                                                       './apifiles/C++/transport9'    . 'Transport9-vs2019.vcxproj'
                                                       './apifiles/C++/transport10'   . 'Transport10-vs2019.vcxproj'
                                                       './apifiles/C++/transport11'   . 'Transport11-vs2019.vcxproj'
                                                       './apifiles/C++/transport12'   . 'Transport12-vs2019.vcxproj'
                                                       './apifiles/C++/transport13'   . 'Transport13-vs2019.vcxproj'
                                                       './apifiles/C++/transport14'   . 'Transport14-vs2019.vcxproj'
                                                       './apifiles/C++/warehouse'     . 'Warehouse-vs2019.vcxproj')
                                          (Tools,GDXRRW).'./gdxrrw/win3264'  . 'gdxrrw_1.0.10.zip'
                                          scensolver.'.'.'scncclib64.dll'
                                          'GAMS'.        './inclib'.          'win32.gms'
*                                          'GAMS'.        '.'.                 'tbb12.dll'
                                          baron.'.'.('xprs360111.dll','xpbl.dll')
                                          knitro.'.'.'knitro1240.dll'
                                          odhcplex.'.'.'heuristic604.dll'
                                          odhcplex.'.'.'odh.lic'
                                          localsolver.'.'.'localsolver105.dll'
                                          mosek.'.'.'mosek64_9_3.dll'
                                         )
                                /

    drpfil(ppp,prd,dir,fil)     Dropped files per product and directory /
                                %ALLPF% .(
                                          (Tools,GDXRRW).'./gdxrrw/source'  . 'gdxrrw_1.0.8.tar.gz'
                                          gamsAPI.'./apifiles/Delphi/api'   . 'gopdopdef.pas'
                                          gamsAPI.'./apifiles/VBA' . ('transport.xls','chp.xls','chp2.xls','portfolio.xls','samurai.xls','samurai2.xls'
                                                                      'SpawnGAMS.xls','sudoku.xls')
                                          gamsAPI  .('./apifiles/Fortran'    .('xp_example1ifort32.f90', 'xp_example1ifort64.f90')
                                                     './apifiles/Delphi'     .('xp_example1do.cfg', 'xp_example1do.dof', 'xp_example1do.dpr', 'xp_example1do.dproj',
                                                                               'xp_example1dp.cfg', 'xp_example1dp.dof', 'xp_example1dp.dpr', 'xp_example1dp.dproj')
                                                     './apifiles/Delphi/api' .('gamsxdocpdef.pas', 'gamsxdopdef.pas', 'gamsxdpdef.pas')
                                                     './apifiles/Fortran/api'.('gamsxifort32def.def', 'gamsxifort32def.f90', 'gamsxifort32deflib.f90',
                                                                               'gamsxifort64def.def', 'gamsxifort64def.f90', 'gamsxifort64deflib.f90',
                                                                               'gamsxlfdef.def', 'gamsxlfdef.f90', 'gamsxlfdeflib.f90'))
                                          gdxAPI   .('./apifiles/Delphi/api' .('gdxdocpdef.pas', 'gdxdopdef.pas', 'gdxdpdef.pas')
                                                     './apifiles/Fortran/api'.('gdxifort32def.def', 'gdxifort32def.f90', 'gdxifort32deflib.f90',
                                                                               'gdxifort64def.def', 'gdxifort64def.f90', 'gdxifort64deflib.f90',
                                                                               'gdxlfdef.def', 'gdxlfdef.f90', 'gdxlfdeflib.f90'))
                                          optionAPI.('./apifiles/Delphi/api' .('optdocpdef.pas', 'optdopdef.pas', 'optdpdef.pas')
                                                     './apifiles/Fortran/api'.('optifort32def.def', 'optifort32def.f90', 'optifort32deflib.f90',
                                                                               'optifort64def.def', 'optifort64def.f90', 'optifort64deflib.f90',
                                                                               'optlfdef.def', 'optlfdef.f90', 'optlfdeflib.f90'))
                                          idxgdxAPI.('./apifiles/Delphi/api' .('idxdocpdef.pas', 'idxdopdef.pas', 'idxdpdef.pas')
                                                     './apifiles/Fortran/api'.('idxifort32def.def', 'idxifort32def.f90', 'idxifort32deflib.f90',
                                                                               'idxifort64def.def', 'idxifort64def.f90', 'idxifort64deflib.f90',
                                                                               'idxlfdef.def', 'idxlfdef.f90', 'idxlfdeflib.f90'))
                                          gamsCPP    .('./apifiles/C++'                .('qt-vs2015.props', 'qt-vs2017.props', 'examples.pri', 'examples.pro')
                                                       './apifiles/C++/api'            . 'LICENSE.Qt'
                                                       './apifiles/C++/domainchecking' . 'domainchecking.pro'
                                                       './apifiles/C++/transportGDX'   . 'transportGDX.pro'
                                                       './apifiles/C++/transport1'     . 'transport1.pro'
                                                       './apifiles/C++/transport2'     . 'transport2.pro'
                                                       './apifiles/C++/transport3'     . 'transport3.pro'
                                                       './apifiles/C++/transport4'     . 'transport4.pro'
                                                       './apifiles/C++/transport5'     . 'transport5.pro'
                                                       './apifiles/C++/transport6'     . 'transport6.pro'    
                                                       './apifiles/C++/transport7'     . 'transport7.pro'
                                                       './apifiles/C++/transport8'     . 'transport8.pro'
                                                       './apifiles/C++/transport9'     . 'transport9.pro'    
                                                       './apifiles/C++/transport10'    . 'transport10.pro'
                                                       './apifiles/C++/transport11'    . 'transport11.pro'   
                                                       './apifiles/C++/transport12'    . 'transport12.pro'
                                                       './apifiles/C++/transport13'    . 'transport13.pro'   
                                                       './apifiles/C++/transport14'    . 'transport14.pro'
                                                       './apifiles/C++/warehouse'      . 'warehouse.pro')
                                          DataLibrary.'./apifiles/VBA' . ('transport.xls','chp.xls','chp2.xls','portfolio.xls','samurai.xls','samurai2.xls'
                                                                          'SpawnGAMS.xls','sudoku.xls')
                                          DataLibrary.'./datalib_ml' . ('transport.xls','chp.xls','chp2.xls','portfolio.xls','samurai.xls','samurai2.xls'
                                                                          'SpawnGAMS.xls','sudoku.xls','Samurai2.gms')
                                          (Tools,gdxrank).'./inclib'.'rank.gms'
                                         )
*                                %ALLUX% .(
*                                         )
                                DEG     .(
                                          gamsCPP    .('./apifiles/C++/lib'            . 'QtCore')
                                          (Tools,GDXRRW).'./gdxrrw/osx'  . 'gdxrrw_1.0.8.tgz'
                                          gams.'.'.'libgamsxdclib64.dylib'
                                          scensolver.'.'.'libscndclib64.dylib'
                                          gams.          '.'                . 'libgfortran.4.dylib'
                                          gams.          '.'                . 'libcilkrts.5.dylib'
                                          knitro.'.'.'libknitro1230.dylib'
                                          localsolver.'.'.'liblocalsolver100.dylib'
                                          mosek.'.'.'libmosek64.9.2.dylib'
                                         )
                                LEG     .(
                                          gamsCPP    .('./apifiles/C++/lib'            .('libQt5Core.so', 'libQt5Core.so.5'))
                                          (Tools,GDXRRW).'./gdxrrw/linux64'  . 'gdxrrw_1.0.8_R_x86_64-linux-gnu.tar.gz'
                                          gams.'.'.'libgamsxdclib64.so'
                                          odhcplex.'.'.'libheuristic534.so'
                                          odhcplex.'.'.'libcplex2010.so.odh534'
                                          scensolver.'.'.'libscndclib64.so'
                                          xpress.'.'.'libxprs.so.36.01'
                                          xpress.'.'.'libxprs.so.36.01.11'
                                          xpress.'.'.'libxprl-3.1.3-x8.10.so'
                                          xpress.'.'.'libxprl.so.x8.10'
                                          knitro.'.'.'libknitro1230.so'
                                          localsolver.'.'.'liblocalsolver100.so'
                                          mosek.'.'.'libmosek64.so.9.2'
                                         )
                                WEI     .(
                                          gamsCPP    .('./apifiles/C++'                   . 'examples-vs2015.sln'
                                                       './apifiles/C++/domainchecking'    . 'DomainChecking-vs2015.vcxproj'
                                                       './apifiles/C++/transportGDX'      . 'TransportGDX-vs2015.vcxproj'
                                                       './apifiles/C++/transport1'        . 'Transport1-vs2015.vcxproj'
                                                       './apifiles/C++/transport2'        . 'Transport2-vs2015.vcxproj'
                                                       './apifiles/C++/transport3'        . 'Transport3-vs2015.vcxproj'
                                                       './apifiles/C++/transport4'        . 'Transport4-vs2015.vcxproj'
                                                       './apifiles/C++/transport5'        . 'Transport5-vs2015.vcxproj'
                                                       './apifiles/C++/transport6'        . 'Transport6-vs2015.vcxproj'
                                                       './apifiles/C++/transport7'        . 'Transport7-vs2015.vcxproj'
                                                       './apifiles/C++/transport8'        . 'Transport8-vs2015.vcxproj'
                                                       './apifiles/C++/transport9'        . 'Transport9-vs2015.vcxproj'
                                                       './apifiles/C++/transport10'       . 'Transport10-vs2015.vcxproj'
                                                       './apifiles/C++/transport11'       . 'Transport11-vs2015.vcxproj'
                                                       './apifiles/C++/transport12'       . 'Transport12-vs2015.vcxproj'
                                                       './apifiles/C++/transport13'       . 'Transport13-vs2015.vcxproj'
                                                       './apifiles/C++/transport14'       . 'Transport14-vs2015.vcxproj'
                                                       './apifiles/C++/warehouse'         . 'Warehouse-vs2015.vcxproj'
                                                       './apifiles/C++/xp_associative'    . 'xp_associative-vs2015.vcxproj'
                                                       './apifiles/C++/xp_associative_vec'. 'xp_associative_vec-vs2015.vcxproj'
                                                       './apifiles/C++/xp_dataWrite'      . 'xp_dataWrite-vs2015.vcxproj'
                                                       './apifiles/C++/xp_example1'       . 'xp_example1-vs2015.vcxproj'
                                                       './apifiles/C++/xp_example2'       . 'xp_example2-vs2015.vcxproj'
                                                       './apifiles/C++/lib/vs2015'        .('gamscpp.dll', 'gamscpp.exp', 'gamscpp.lib', 'vcredist_x64.exe')
                                                       './apifiles/C++/lib/vs2017'        . 'vc_redist.x64.exe'
                                                       ('./apifiles/C++/lib/vs2015',
                                                        './apifiles/C++/lib/vs2017')      .('D3Dcompiler_47.dll', 'Qt5Core.dll', 'Qt5Gui.dll', 'Qt5Svg.dll', 'Qt5Widgets.dll', 'libEGL.dll', 'libGLESv2.dll', 'opengl32sw.dll', 'Qt5Sql.dll')
                                                       ('./apifiles/C++/lib/vs2015/iconengines',
                                                        './apifiles/C++/lib/vs2017/iconengines') . 'qsvgicon.dll'
                                                       ('./apifiles/C++/lib/vs2015/imageformats',
                                                        './apifiles/C++/lib/vs2017/imageformats').('qgif.dll', 'qicns.dll', 'qico.dll', 'qjpeg.dll', 'qsvg.dll', 'qtga.dll', 'qtiff.dll', 'qwbmp.dll', 'qwebp.dll')
                                                       ('./apifiles/C++/lib/vs2015/platforms',
                                                        './apifiles/C++/lib/vs2017/platforms')   . 'qwindows.dll'
                                                       ('./apifiles/C++/lib/vs2015/sqldrivers',
                                                        './apifiles/C++/lib/vs2017/sqldrivers')  .('qsqlite.dll', 'qsqlodbc.dll', 'qsqlpsql.dll')
                                                       ('./apifiles/C++/lib/vs2015/styles',
                                                        './apifiles/C++/lib/vs2017/styles')      . 'qwindowsvistastyle.dll')
                                          (Tools,GDXRRW).'./gdxrrw/win3264'  . 'gdxrrw_1.0.8.zip'
                                          gams.'.'.('gamsxdclib64.dll','gamsxdclib.dll')
*, 'tbb.dll')
                                          odhcplex.'.'.'heuristic534.dll'
                                          scensolver.'.'.'scndclib64.dll'
                                          baron.'.'.('xprs.dll','xprl.dll')
                                          knitro.'.'.'knitro1230.dll'
                                          localsolver.'.'.'localsolver100.dll'
                                          mosek.'.'.'mosek64_9_2.dll'
                                         )
$batinclude api.inc gamsAPI gamsx
                                %ALLPF%.gamsAPI.'./apifiles/Delphi/api'.'gamsxddec.inc'
                                /
$offempty
;

SET APM(ppp,prda,prd) 'Alias Product Map' /
  (        deg,leg,wei).COINBONMIN. BONMIN
  (        deg,leg,wei).BONMINH.    BONMIN
  (        deg,leg,wei).COINCBC.    CBC
  (        deg,leg,wei).COINIPOPT.  IPOPT
  (        deg,leg,wei).IPOPTH.     IPOPT
  (        deg,leg,wei).COINSCIP.   SCIP
  (aix,sox,deg,leg,wei).CONOPT.     CONOPTD
  (aix,sox,deg,leg,wei).CONOPT3.    CONOPTD
  (aix,sox,deg,leg,wei).CONVERTD.   CONVERT
  (aix,sox,deg,leg,wei).CPLEXD.     CPLEX
  (    sox,deg,leg,wei).LGO.        LGOD
  (aix,sox,deg,leg,wei).LOGMIP.     JAMS
  (aix,sox,deg,leg,wei).MILESE.     MILES
  (aix,sox,deg,leg,wei).MINOS.      MINOS55
  (aix,sox,deg,leg,wei).MINOS5.     MINOS55
  (aix,sox,deg,leg,wei).PATH.       PATHC
  (        deg,leg,wei).SOPLEX.     OSISOPLEX
/;

SET prdAlias(prda) 'Aliases of Products';
option prdAlias < APM;

$call rm -f apilib.txt datalib.txt emplib.txt modlib.txt tstlib.txt wrapperlib.inc api.inc

$gdxin "%gams.sysdir%gmspfmap"
$load curfil=pfmap

$gdxin allpfmap
$load lstall=pfmap

$if %GOLD% == 1 $goto mkallpf

lstfil(prd,dir,fil)=lstall('%system.buildcode%',prd,dir,fil);

option curprd<curfil, lstprd<lstfil;

* Skiplist
$onempty
set sPrd(prd)   'Products to be skipped' /
                (GAMSDOTNET, GAMSJAVA, GAMSPYTHON)      'These are skipped in mkpfmap, see #2579'
                Documents                               'too many files and changing too often'
                /;
$offempty

expprd(prd)$(not prdAlias(prd)) = lstprd(prd) and not drpprd('%system.buildcode%',prd) or newprd('%system.buildcode%',prd);
expfil(prd,dir,fil)$(not prdAlias(prd)) = lstfil(prd,dir,fil) and not (drpfil('%system.buildcode%',prd,dir,fil) or drpprd('%system.buildcode%',prd)) or newfil('%system.buildcode%',prd,dir,fil);

nexprd(curprd)$(not prdAlias(curprd) and not sPrd(curprd)) = not expprd(curprd);
misprd(expprd)$(not prdAlias(expprd) and not sPrd(expprd)) = not curprd(expprd);
drwprd(prd)$(not prdAlias(prd) and not sPrd(prd))          = drpprd('%system.buildcode%',prd) and not lstprd(prd);
adwprd(prd)$(not prdAlias(prd) and not sPrd(prd)   )       = newprd('%system.buildcode%',prd) and     lstprd(prd);

nexfil(curfil(prd,dir,fil))$(not prdAlias(prd) and not sPrd(prd)) = not expfil(curfil);
misfil(expfil(prd,dir,fil))$(not prdAlias(prd) and not sPrd(prd)) = not curfil(expfil);
drwfil(prd,dir,fil)$(not prdAlias(prd) and not sPrd(prd))         = drpfil('%system.buildcode%',prd,dir,fil) and not lstfil(prd,dir,fil);
adwfil(prd,dir,fil)$(not prdAlias(prd) and not sPrd(prd))         = newfil('%system.buildcode%',prd,dir,fil) and     lstfil(prd,dir,fil);

nexfila(prdAlias,dir,fil) = curfil(prdAlias,dir,fil) and not sum(APM('%system.buildcode%',prdAlias,prd)$(not sPrd(prd)),expfil(prd,dir,fil));
* This is slow, use loop instead
* misfila(prdAlias,dir,fil) = (not curfil(prdAlias,dir,fil)) and sum(APM('%system.buildcode%',prdAlias,prd)$(not sPrd(prd)),expfil(prd,dir,fil));
set fa(dir,fil),fo(dir,fil);
loop(APM('%system.buildcode%',prda,prd)$(not sPrd(prd)),
  fa(dir,fil) = curfil(prda,dir,fil);
  fo(dir,fil) = expfil(prd,dir,fil);
  misfila(prda,dir,fil) = not fa(dir,fil) and fo(dir,fil);
);
wronga(prdAlias) = sum(APM('%system.buildcode%',prdAlias,prd)$(not sPrd(prd)),1) and (sum(APM('%system.buildcode%',prdAlias,expprd),1)=0);

option nexfil:0:0:3,misfil:0:0:3,drwfil:0:0:3,adwfil:0:0:3,nexfila:0:0:3,misfila:0:0:3,wronga:0:0:3;

abort$(card(nexprd) + card(misprd) + card(drwprd) + card(adwprd) + card(nexfil) + card(misfil) + card(drwfil) + card(adwfil) + card(nexfila) + card(misfila) + card(wronga))
      nexprd, misprd, drwprd, adwprd, nexfil, misfil, drwfil, adwfil, nexfila, misfila, wronga;
$exit
$label mkallpf
set curall(ppp,prd,dir,fil)     Files of current version containing all platforms;
curall(ppp,prd,dir,fil) = lstall(ppp,prd,dir,fil) and not (drpfil(ppp,prd,dir,fil) or drpprd(ppp,prd)) or newfil(ppp,prd,dir,fil);
execute_unload 'allpfmap' curall=pfmap;