+$ open/append outfile config.h
+$ write outfile ""
+$ write outfile "/* Target alias. */"
+$ write outfile "#define TARGET_ALIAS ""''target_alias'"""
+$ write outfile ""
+$ write outfile "/* Canonical target. */"
+$ write outfile "#define TARGET_CANONICAL ""''target_canonical'"""
+$ write outfile ""
+$ write outfile "/* Target CPU. */"
+$ write outfile "#define TARGET_CPU ""'arch'"""
+$ close outfile
+$!
+$ write sys$output "Generate gas/build.com"
+$!
+$ create build.com
+$DECK
+$ DEFS=""
+$ OPT="/noopt/debug"
+$ CFLAGS=OPT + "/include=([],""../include"",[-.bfd],""../"",[.config])" +-
+ "/name=(as_is,shortened)" +-
+ "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
+$ FILES="obj-format,atof-targ,app,as,atof-generic,cond,depend,"+-
+ "expr,flonum-konst,flonum-copy,flonum-mult,frags,hash,input-file,"+-
+ "input-scrub,literal,messages,output-file,read,subsegs,symbols,write,"+-
+ "listing,ecoff,stabs,sb,macro,ehopt,dw2gencfi,dwarf2dbg,remap"
+$ LIBBFD = ",[-.bfd]libbfd.olb/lib"
+$ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
+$ LIBOPCODES = ",[-.opcodes]libopcodes.olb/lib"
+$!
+$ write sys$output "CFLAGS=",CFLAGS
+$ if p1.nes."LINK"
+$ then
+$ write sys$output "Compiling targ-cpu.c (/noopt)"
+$ cc 'CFLAGS /noopt targ-cpu
+$ NUM = 0
+$ LOOP:
+$ F = F$ELEMENT(NUM,",",FILES)
+$ IF F.EQS."," THEN GOTO END
+$ write sys$output "Compiling ", F, ".c"
+$ cc 'CFLAGS 'F.c
+$ NUM = NUM + 1
+$ GOTO LOOP
+$ END:
+$ endif
+$ purge
+$!
+$ write sys$output "Building as.exe"
+$ AS_OBJS="targ-cpu," + FILES + LIBOPCODES + LIBBFD + LIBIBERTY
+$ link/exe=as 'AS_OBJS