make_vms.com revision 1b33c96954667ba382fa595baf7b31290bfdd517
$!
$!
$!
$!------------------------------------------------------------------------------
$! Version history
$!
$!
$ true = 1
$ false = 0
$ its_decc = false
$ its_vaxc = false
$ its_gnuc = false
$!
$!
$ Make = ""
$ name = "Zlib"
$ version = "?.?.?"
$ v_string = "ZLIB_VERSION"
$ ccopt = ""
$ lopts = ""
$ dnsrl = ""
$ aconf_in_file = "zconf.h.in#zconf.h_in"
$ conf_check_string = ""
$ linkonly = false
$ libdefs = ""
$!
$!
$!
$!
$!
$!
$!
$!
$!
$!
$ if its_decc
$ then
$ then
$ if axp
$ then
$ else
$ endif
$ endif
$ endif
$ then
$ endif
$!
$!
$!
$!
$ i = 0
$ then
$ i = i + 1
$ goto find_aconf
$ endif
$ then
$ then
$ endif
$ else
$ endif
$ goto aconf_loop
$!
$ if make.eqs.""
$ then
$ then
"LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
$ endif
$ else
$ 'make'
$ endif
$!
$!
$ Then
$ if s_case
$ then
$ endif
$ endif
$ exit
$ goto err_exit
$ exit 2
$!
$!
$ V = 'F$Verify(0)
$! P1 = What we are trying to make
$! P2 = Command to make it
$! P3 - P8 What it depends on
$
$ If F$Search(P1) .Eqs. "" Then Goto Makeit
$ Time = F$CvTime(F$File(P1,"RDT"))
$arg=3
$Loop:
$ Argument = P'arg
$ El=0
$ AFile = ""
$
$ 'P2
$!------------------------------------------------------------------------------
$!
$!
$!------------------------------------------------------------------------------
$! Version history
$ CHECK_OPTS:
$ i = 1
$ OPT_LOOP:
$ if i .lt. 9
$ then
$!
$!
$ then
$ then
$ endif
$ then
then s_case = true
$ endif
$ then
$ endif
$ then
$ then
$ else
$ endif
$ endif
$ then
$ then
$ else
$ endif
$ endif
$ endif
$ i = i + 1
$ goto opt_loop
$ endif
$ return
$!------------------------------------------------------------------------------
$!
$!
$! Version history
$ then
$ endif
$!
$!
$ then goto CC_ERR
$ else
$ if its_decc
$ then
$ then
$ endif
$ else
$ if its_gnuc
$ then
$ cc = "gcc"
$ endif
$ endif
$ endif
$ return
$!------------------------------------------------------------------------------
$!
$!
$ deck
# descrip.mms: MMS description file for building zlib on VMS
# written by Martin P.J. Zinser
# <zinser@zinser.no-ip.info or zinser@sysdev.deutsche-boerse.com>
$ eod
$ deck
clean :
# Other dependencies.
$ eod
$ return
$!------------------------------------------------------------------------------
$!
$!
$ src_check = "OBJC ="
$ return
$!------------------------------------------------------------------------------
$!
$!
$ i = 0
$ srcfil = f$element(i," ", myrec)
$ if (srcfil .nes. " ")
$ then
$ i = i + 1
$ goto feloop
$ endif
$ return
$!------------------------------------------------------------------------------
$!
$! Find current Zlib version number
$!
$ if (f$extract(0,1,rec) .nes. "#") then goto hloop
$ then
$ version = 'f$element(2," ",rec)'
$ goto hdone
$ endif
$ goto hloop
$ return
$!------------------------------------------------------------------------------
$!
$!
$ then
$ else
$ then
$ else
$ then
$ else
$ gosub check_cc_def
$ endif
$ endif
$ endif
$ return
$!------------------------------------------------------------------------------
$!
$! Check if this is a define relating to the properties of the C/C++
$! compiler
$!
$ CHECK_CC_DEF:
$ if (cdef .eqs. "_LARGEFILE64_SOURCE")
$ then
$ deck
#include "tconfig"
#define _LARGEFILE
#include <stdio.h>
int main(){
FILE *fp;
fp = fopen("temp.txt","r");
fseeko(fp,1,SEEK_SET);
fclose(fp);
}
$ eod
$ test_inv = false
$ comm_h = false
$ gosub cc_prop_check
$ return
$ endif
$ write aconf "/* ", line, " */"
$ return
$!------------------------------------------------------------------------------
$!
$! Check for properties of C/C++ compiler
$!
$! Version history
$! 0.01 20031020 First version to receive a number
$! 0.02 20031022 Added logic for defines with value
$! 0.03 20040309 Make sure local config file gets not deleted
$! 0.04 20041230 Also write include for configure run
$! 0.05 20050103 Add processing of "comment defines"
$CC_PROP_CHECK:
$ cc_prop = true
$ is_need = false
$ is_need = (f$extract(0,4,cdef) .eqs. "NEED") .or. (test_inv .eq. true)
$ on error then continue
$ if .not. ($status) then cc_prop = false
$ on error then continue
$! The headers might lie about the capabilities of the RTL
$ if .not. ($status) then cc_prop = false
$ on error then goto err_exit
$ if (cc_prop .and. .not. is_need) .or. -
(.not. cc_prop .and. is_need)
$ then
$ if f$type('cdef_val'_yes) .nes. ""
$ then
then call write_config f$fao("#define !AS !UL",cdef,'cdef_val'_yes)
$ else
$ endif
$ else
$ if (comm_h)
$ then
$ else
$ then
$ else
$ endif
$ endif
$ endif
$ return
$!------------------------------------------------------------------------------
$!
$!
$! Version history
$ cc_prop = true
$ i = 1
$ idel = 1
$ MT_LOOP:
$ then
$ if (cc_prop)
$ then
$ goto msym_clean
$ else
$ i = i + 1
$ goto mt_loop
$ endif
$ endif
$ MSYM_CLEAN:
$ then
$ goto msym_clean
$ endif
$ return
$!------------------------------------------------------------------------------
$!
$!
$! Version history
$!
$ V = 'F$Verify(0)
$ SAY := "WRITE_ SYS$OUTPUT"
$
$ IF F$SEARCH("''P1'") .EQS. ""
$ THEN
$ goto exit_aa
$ ENDIF
$ IF "''P2'" .EQS. ""
$ THEN
$ goto exit_aa
$ ENDIF
$
$ create a.tmp
$ loop:
$ then
$ goto loop
$ endif
$ if f$locate("IDENTIFICATION=",f$edit(line,"upcase")) .lt. f$length(line)
$ then
$ write sys$output "ANAL_OBJ_AXP-i-ident: Identification ", -
f$element(1,"=",line)
$ goto loop
$ endif
$ f= f$search(line)
$ if f .eqs. ""
$ then
$ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
$ goto loop
$ endif
$ XLOOP:
$ write atmp xline
$ goto xloop
$ END_XLOOP:
$ close xtmp
$ goto loop
$ end_loop:
$ close in
$ close atmp
then $ exit
$ ! all global definitions
$ ! all procedures
sub/"/=PROCEDURE)/whole
exit
$ ! all data
sub/"/=DATA)/whole
exit
$ RAWLOOP:
$ write case_vector raw_element
$ then
$ endif
$ then
$ endif
$ goto rawloop
$ END_RAWLOOP:
$ close raw_vector
$ close case_vector
then $ delete x.tmp;*
$!
$ EXIT_AA:
$ if V then set verify
$ endsubroutine
$!------------------------------------------------------------------------------
$!
$! Write configuration to both permanent and temporary config file
$!
$! Version history
$! 0.01 20031029 First version to receive a number
$!
$WRITE_CONFIG: SUBROUTINE
$ write aconf 'p1'
$ write confh 'p1'
$ close confh
$!------------------------------------------------------------------------------