FHACYEOV7BG6PMCH2JL37C63CGQBIDVRBMCHCBJKXESV6NUL4T3AC
PXI442CY2KQHHAIJ3UNCWKTAI4IFYNGYEBRQMDR6T53YZTY2VMMQC
IJPPBZNLPL4X6WDFWFBNMZ32WNJM7QZ6EFSUTNSN74AZJEZKEARAC
MPN7OJSZD5CS5N7WWS3ZSOYE7ZRCABIBHZDMHVS6IT25EO2INK7AC
UW27LKXM2BJ77FQLTY4WPKDSSWI2RFNFRJ7CB4U3TS7KYVIV72LQC
6XHALMLUA5B5BBYFSWIFHSJ2BXCL6RSAW5TCKRGJEI2LURH2TQ4AC
5XO7IKBGCVXGVWMDJDE5MELS4FWRITKAU6NNV36NQ4TOZRR7UQ7QC
7BYMVBE225GXMGCZIPBE7XAGZ3FMO2NF75PSTBYQT3ZQ3ZK6YKOAC
AWK = "/usr/bin/original-awk"
awk_switches = " -f"
trivial_program = " 'BEGIN { print \"hi\" }' "
no_output = " >/dev/null 2>/dev/null"
if (0 != system(awk_executable trivial_program no_output)) {
AWK = "/usr/bin/awk"
# now, what do we need to hand it to get no bells and
# whistles? with GNU awk, we need -c, but One True Awk does
# not recognize this switch, and will exit with an error when
# it is provided.
if(0 == system(AWK " -c " trivial_program no_output)) {
awk_switches = " -cf"
} else {
# leave awk_switches alone
}
if(!BUILD_AWK) {
print "tmpl.awk: you must set BUILD_AWK and TARGET_AWK variables" >"/dev/stderr"
exit 1
while((AWK " -f tmpl.awk " fn | getline) > 0)
# setting a variable to the command whose output is to be read,
# then using the variable, sets mawk at ease; not doing so seems
# to put it in an infinite loop. i have not diagnosed this.
command = BAWK " -f tmpl.awk " fn
while((command | getline) > 0)
AWK = original-awk
AWK = gawk -c
#AWK = original-awk
# used to build the single glotawk file.
BUILD_AWK ?= $(AWK)
# used to run the tests using the built glotawk.
TEST_AWK ?= $(AWK)
# not run. written in the shebang at the top of the built glotawk.
TARGET_AWK ?= $(AWK)
(echo "(dump-dot \"before-gc.dot\")"; echo "(gc-dot \"marks.dot\" \"sweeps.dot\")"; echo "(dump \"$@\")"; echo "(dump-dot \"after-gc.dot\")") | $(AWK) -f glotawk-build.awk
(echo "(dump-dot \"before-gc.dot\")"; echo "(gc-dot \"marks.dot\" \"sweeps.dot\")"; echo "(dump \"$@\")"; echo "(dump-dot \"after-gc.dot\")") | $(BUILD_AWK) -f glotawk-build.awk