c $! $! Build procedure for generating binary database files from wml $! $! P1 is the WML file that a binary database will be build for $! $! P2 is the string to be passed to the /DEFINE qualifier for conditional $! compilation of the UILWMDCREATE.C file. Added so that the user may add $! IFDEFs to the code and have the command procedure compile accordingly. $! $! Define logical needed to find header file $! $ if .NOT. (f$logical("SYS")) $ then $ define sys sys$library $ endif $! $! Find out if DEC C compiler is being used $! $ if f$search("sys$system:decc$compiler.exe") .nes. "" $ then $ cc = "cc/standard=vaxc" $ endif $! $! First figure out the various file names $! $ wmlfilespec = F$PARSE ("''p1'",".WML") $ tmpfilespec = F$PARSE ("''wmlfilespec'",,,"NAME") $ wmdfilespec = F$PARSE ("''tmpfilespec'",".WMD") $ mmfilespec = F$PARSE ("''tmpfilespec'",".MM") $ sdmlfilespec = F$PARSE ("''tmpfilespec'",".SDML") $! $! Define WML as a symbol so it can be run as a foreign command $! Create the temporary directory to do all this work in $! $ WML = "$ SYS$SYSTEM:DECW$WML.EXE" $ CREATE/DIR/prot=w:rwed [.DECW$WMLTEMP] $ SET DEF [.DECW$WMLTEMP] $ COPY [-]UILWMDCREATE.C UILWMDCREATE.C $! $! WML the source file $! $! $! WMLing the source file produces *.h files which are included $! in UILWMDCREATE.C (e.g. UilSymGen.h etc.) $! $! Compile the UILWMDCREATE.C with the generated source files. $! Link UILWMDCREATE $! $ WML 'wmlfilespec $ COPY WML-UIL.MM 'mmfilespec $ COPY WML-UIL.SDML 'sdmlfilespec $ if P2 .nes. "" then p2 = ","+p2 $ CC/DEFINE=(DEC_MOTIF_EXTENSION 'P2 ) UILWMDCREATE.C $ LINK UILWMDCREATE+SYS$INPUT:/OPT SYS$SHARE:DECW$DXMLIBSHR12/SHARE SYS$SHARE:DECW$XMLIBSHR12.EXE/SHARE SYS$SHARE:DECW$XLIBSHR.EXE/SHARE SYS$SHARE:DECW$XTLIBSHRR5.EXE/SHARE $! $! Define UILWMDCREATE as a symbol so it can be run as a foreign command. $! $ UILWMDCREATE = "$ SYS$DISK:[]UILWMDCREATE.EXE" $! $! Run UILWMDCREATE and generate the WMD file in the same directory as the $! source file $! $ UILWMDCREATE -o 'wmdfilespec $ $! $! Clean up and return $! $ DELETE *.*;* $ SET DEF [-] $ DELETE DECW$WMLTEMP.DIR;*