cflags.SH - add commentary
authorDavid Mitchell <davem@iabyn.com>
Tue, 3 Dec 2013 16:17:56 +0000 (16:17 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 25 Dec 2013 20:30:46 +0000 (20:30 +0000)
Add comments to the top of cflags.SH to explain what it does.
Also make it output comments at the top of the generated cflags
script explaining that its auto-generated.

cflags.SH

index a80eb5d..84e3187 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -1,5 +1,17 @@
 #!/bin/sh
 
+# Generate the cflags script, which is used to determine what cflags
+# to pass to the compiler.
+# We create a temporary test c program and repeatedly compile it with
+# various candidate flags, and from the compiler output, determine what
+# flags are supported.
+# From this we initialise the following variables in the cflags script:
+#
+#   $warn
+#   $stdflags
+#   $extra
+#   $_exe
+
 case $PERL_CONFIG_SH in
 '')
        if test -f config.sh; then TOP=.;
@@ -210,6 +222,11 @@ rm -f cflags
 $spitshell >cflags <<!GROK!THIS!
 $startsh
 
+# !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
+
+# This file is generated by cflags.SH
+
+
 # Extra warnings, used e.g. for gcc.
 warn="$warn"
 # Extra standardness.