176082Sbmah$!
276082Sbmah$! This file configures the libiberty library for use with openVMS.
376082Sbmah$!
476082Sbmah$! We do not use the configure script, since we do not have /bin/sh
576082Sbmah$! to execute it.
676082Sbmah$!
776082Sbmah$! Written by Tristan Gingold (gingold@adacore.com)
876082Sbmah$!
976082Sbmah$!
1082350Sbmah$!
1182350Sbmah$ copy config.h-vms config.h
1276082Sbmah$!
1376082Sbmah$ write sys$output "Generate libiberty build.com"
1476082Sbmah$!
1582666Sbmah$ create build.com
1682666Sbmah$DECK
1781327Sbmah$ FILES="getopt,obstack,xexit,xmalloc,hex,getopt1,cplus-dem,cp-demangle,"+-
1882666Sbmah    "cp-demint,asprintf,vasprintf,mkstemps,concat,getruntime,getpagesize,"+-
1981484Sbmah    "getpwd,xstrerror,xmemdup,xstrdup,xatexit,choose-temp,fnmatch,objalloc,"+-
2082666Sbmah    "safe-ctype,hashtab,lbasename,argv,lrealpath,make-temp-file,"+-
2181327Sbmah    "stpcpy,unlink-if-ordinary"
2282666Sbmah$ OPT="/noopt/debug/warnings=disable=(missingreturn)"
2382666Sbmah$ CFLAGS=OPT + "/include=([],[-.include])/name=(as_is,shortened)" +-
2482666Sbmah "/define=(HAVE_CONFIG_H=1)" +-
2582666Sbmah "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
2682666Sbmah$ write sys$output "CFLAGS=",CFLAGS
2782666Sbmah$ NUM = 0
2881327Sbmah$ LOOP:
2982666Sbmah$   F = F$ELEMENT(NUM,",",FILES)
3082666Sbmah$   IF F.EQS."," THEN GOTO END
3182666Sbmah$   write sys$output "Compiling ", F, ".c"
3282666Sbmah$   cc 'CFLAGS 'F.c
3382666Sbmah$   NUM = NUM + 1
3482666Sbmah$   GOTO LOOP
3581327Sbmah$ END:
3682666Sbmah$ purge
3782666Sbmah$ lib/create libiberty 'FILES
3881327Sbmah$EOD
3982666Sbmah