$set noon $ ! $ ! DEMO_BUILD.COM - Build the VMS DECwindows example programs $ ! $ !**************************************************************************** $ ! (c) Copyright 2010 Hewlett-Packard Development Company, L.P. $ ! $ ! Proprietary computer software. Valid license from HP required for $ ! possession, use or copying. Consistent with FAR 12.211 and 12.212, $ ! Commercial Computer Software, Computer Software Documentation, and $ ! Technical Data for Commercial Items are licensed to the U.S. Government $ ! under vendor's standard commercial license. $ !**************************************************************************** $ ! $ ! Build the VMS DECwindows example programs $ ! $ ! Determine the architecture $ ! $ axp_or_i64 = "False" $ if f$getsyi("ARCH_NAME") .nes. "VAX" then axp_or_i64 = "True" ! Verified for I64 port - DMP $ ! $ ! Make sure that the prerequisite files and logicals exist. This command $ ! procedure requires that the DECwindows programming be installed. $ ! $ if f$search("sys$system:decw$uilmotif.exe") .nes. "" then goto startupok $ write sys$output "DECwindows programming environment not installed." $ write sys$output "DECwindows example program build aborted." $ exit $startupok: $ ! $ ! Define logical names for UIL compiler $ ! $ define/nolog uil$include decw$include $ ! $ ! Compile the .UIL files $ ! $ write sys$output "Compiling UIL files..." $ uil/motif decw$examples:cutpaste.uil $ uil/motif decw$examples:decburger.uil $ uil/motif decw$examples:decw$cdplayer.uil $ uil/motif decw$examples:dogs.uil $ uil/motif decw$examples:fileview_english.uil $ uil/motif decw$examples:fileview_french.uil $ uil/motif decw$examples:fileview_german.uil $ uil/motif decw$examples:helloint.uil $ uil/motif decw$examples:localstrings_english.uil $ uil/motif decw$examples:localstrings_french.uil $ uil/motif decw$examples:localstrings_hebrew.uil $ uil/motif decw$examples:localstrings_japan.uil $ uil/motif decw$examples:hellomotif.uil $ uil/motif decw$examples:motifanim.uil $ uil/motif decw$examples:dog_anim.uil/out=dog $ uil/motif decw$examples:plane.uil $ uil/motif decw$examples:superman.uil $ uil/motif decw$examples:motifbur.uil $ uil/motif decw$examples:periodic.uil $ uil/motif decw$examples:textedit.uil $ uil/motif decw$examples:trip.uil $ uil/motif decw$examples:client.uil $ uil/motif decw$examples:menu.uil $ $ copy/log fileview_english.uid fileview.uid $ copy/log fileview_english.dat fileview.dat $ copy/log localstrings_english.uid localstrings.uid $ $ copy/log fileview.dat,periodic,xmdemos,xmtravel decw$user_defaults: $ ! $ ! Compile and link the DECwindows example programs $ ! $ decc = "False" $ if (axp_or_i64 .or. f$search("sys$system:vaxc.exe") .eqs. "") $ then $ if f$search("sys$system:decc$compiler.exe") .nes. "" $ then $ decc = "True" $ else $ goto do_pascal $ endif $ endif $ ! $ ! Define the logical names for the C language include files and libraries $ ! $ if decc $ then $ define/nolog decc$user_include decw$examples,decw$include,sys$library $ define/nolog decc$system_include decc$user_include $ if f$search("sys$library:decc$rtldef.tlb") .nes. "" then - define/nolog decc$text_library sys$library:decc$rtldef.tlb $ cc = "cc/standard=vaxc" $ else $ define/nolog c$include decw$examples,decw$include,sys$library $ define/nolog vaxc$include c$include $ if f$search("sys$library:vaxcdef.tlb") .nes. "" then - define/nolog c$library sys$library:vaxcdef.tlb $ cc = "cc" $ endif $ define/nolog sys sys$library ! needed for MIT demos $ $ call cc_and_link cutpaste "" motif $ call cc_and_link decburger "" motif $ call cc_and_link decw$cdplayer "" motif $ call cc_and_link dnddemo dnddraw motif $ call cc_and_link dogs dog,square motif $ call cc_and_link fileview text,vfile motif X_LOCALE,X_WCHAR,_WCHAR_T_,XLIB_XPG4_FUNCS $ call cc_and_link helloint "" motif $ call cc_and_link hellomotif "" motif $ call cc_and_link ico "" ext MULTIBUFFER $ call cc_and_link motifanim "" motif $ call cc_and_link motifbur "" motif $ call cc_and_link motifgif "" motif $ call cc_and_link motifshell "" motif $ call cc_and_link periodic "" motif $ call cc_and_link pict image,xgifload motif $ call cc_and_link svnmsample svnmsamplesource motif $ call cc_and_link textedit app,dlg,tfile,tk motif $ call cc_and_link xlibintro "" "" $ call cc_and_link xmapdef "" motif $ call cc_and_link xmdialogs "" motif $ call cc_and_link xmeditor "" motif $ call cc_and_link xmforc "" motif $ call cc_and_link xmfonts "" motif $ call cc_and_link xmform "" motif $ call cc_and_link xmgetres "" motif $ call cc_and_link xmlist "" motif $ call cc_and_link xmmap "" motif $ call cc_and_link xmpiano "" motif $ call cc_and_link xmprotocol "" motif $ call cc_and_link xmter "" motif_ext $ call cc_and_link xmtravel client_cb,dialogs,menu_cb,trip_cb motif $ ! $do_pascal: $ ! $ ! If Pascal is installed on the system and DECwindows is installed $ ! with the Pascal bindings then compile and link the Pascal example. $ ! $ if f$search("sys$system:pascal.exe") .eqs. "" then goto do_fortran $ if f$search("sys$library:decw$xlibdef.pas") .eqs. "" then goto do_fortran $ if f$search("sys$library:decw$motif.pen") .eqs. "" then goto do_fortran $ write sys$output "Building Pascal examples..." $ pascal decw$examples:hellomotif $ link hellomotif,sys$input/opt sys$share:decw$mrmlibshr12/share sys$share:decw$dxmlibshr12/share sys$share:decw$xmlibshr12/share sys$share:decw$xtlibshrr5/share sys$share:decw$xlibshr/share $ ! $ ! If Fortran is installed on the system and DECwindows is installed $ ! with the Fortran bindings then compile and link the Fortran example. $ ! $do_fortran: $ if f$search("sys$system:fortran.exe") .eqs. "" then goto do_ada $ if f$search("sys$library:decw$xlibdef.for") .eqs. "" then goto do_ada $ if f$search("sys$library:decw$motif.for") .eqs. "" then goto do_ada $ if f$search("sys$library:decw$dwtstruct.for") .eqs. "" then goto do_ada $ write sys$output "Building Fortran examples..." $ fortran decw$examples:motifburger $ fortran decw$examples:hellomotif $ fortran decw$examples:xlibintro $ link motifburger,sys$input:/opt sys$share:decw$mrmlibshr12/share sys$share:decw$dxmlibshr12/share sys$share:decw$xmlibshr12/share sys$share:decw$xtlibshrr5/share sys$share:decw$xlibshr/share $ link hellomotif,sys$input:/opt sys$share:decw$mrmlibshr12/share sys$share:decw$dxmlibshr12/share sys$share:decw$xmlibshr12/share sys$share:decw$xtlibshrr5/share sys$share:decw$xlibshr/share $ link xlibintro,sys$input/opt sys$share:decw$xlibshr/share $ ! $ ! If Ada is installed on the system and DECwindows is installed $ ! with the Ada bindings then compile and link the Ada examples. $ ! $do_ada: $ if f$search("sys$system:ada.exe") .eqs. "" then goto end $ if f$search("ada$predefined:DWT_.ADC") .eqs. "" then goto end $ if f$search("ada$predefined:DECW$MOTIF_.ADC") .eqs. "" then goto end $ write sys$output "Building Ada examples..." $ acs create lib [.xlibintro] /prot=(owner:rwed) $ acs set lib [.xlibintro] $ ada decw$examples:xlibintro,hellomotif,motifburger $ acs link xlibintro $ acs link hellomotif $ acs link motifburger $ acs delete lib [.xlibintro] $ ! $end: $ exit $ ! $ ! Subroutine to compile and link each C example $ ! $ ! P1 = primary source file & exe name $ ! P2 = additional source files $ ! P3 = libraries to link against $ ! P4 = additional C defines $ ! $cc_and_link: subroutine $ $ defs = "" $ if p4 .nes. "" then defs = ",''p4'" $ write sys$output "Compiling ''p1'.C..." $ cc/define=(DEC_MOTIF_BUG_FIX'defs') 'p1' $ $ n = 0 $next_module: $ module = f$element(n, ",", p2) $ if module .eqs. "" .or. module .eqs. "," then goto start_link $ write sys$output "Compiling ''module'.C..." $ cc/define=(DEC_MOTIF_BUG_FIX'defs') 'module' $ n = n + 1 $ goto next_module $ $start_link: $ write sys$output "Linking ''p1'..." $ modules = p1 $ if p2 .nes. "" then modules = modules + "," + p2 $ $ if p3 .eqs. "MOTIF" $ then $ link 'modules',sys$input/opt sys$share:decw$mrmlibshr12/share sys$share:decw$dxmlibshr12/share sys$share:decw$xmlibshr12/share sys$share:decw$xtlibshrr5/share sys$share:decw$xlibshr/share $ endif $ $ if p3 .eqs. "MOTIF_EXT" $ then $ link 'modules',sys$input/opt sys$share:decw$mrmlibshr12/share sys$share:decw$dxmlibshr12/share sys$share:decw$xmlibshr12/share sys$share:decw$xtlibshrr5/share sys$share:decw$xextlibshr/share sys$share:decw$xlibshr/share $ endif $ $ if p3 .eqs. "EXT" $ then $ link 'modules',sys$input/opt sys$share:decw$xextlibshr/share sys$share:decw$xlibshr/share $ endif $ $ if p3 .eqs. "" $ then $ link 'modules',sys$input/opt sys$share:decw$xlibshr/share $ endif $ $ exit $ endsubroutine