1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
#! /usr/bin/perl
###############################################################################
# makeconfig
###############################################################################
# Generate config.h.
#
# Our arguments tell what to put in it.
###############################################################################
use strict;
use warnings;
use English;
my $TRUE=1; my $FALSE = 0;
###############################################################################
# MAINLINE
###############################################################################
my $panels;
my $menus;
my $forms;
while (@ARGV) {
my $arg = shift;
$arg eq 'PANELS' and ++$panels and next;
$arg eq 'MENUS' and ++$menus and next;
$arg eq 'FORMS' and ++$forms and next;
Usage("Unknown argument: '$arg'");
}
print <<'EOHDR';
/*============================================================================
config.h
==============================================================================
This file defines C macros that tell how the user has configured the build.
==> This file was automatically generated by a make rule; changes will be
==> lost when 'make clean' runs.
If you need to edit this file because 'testsyms' didn't do a good job, be
sure to save a copy of your changes.
The "define"s below are simply educated guesses. If you are having problems
compiling, check the appropriate symbol to see if it was set correctly: For
each line, if the answer to the question is "no", that line should start
with "#undef"; if the answer is yes, it should start with "#define".
=============================================================================*/
EOHDR
print($panels ? "#define " : "#undef ",
"C_PANELFUNCTION ",
"/* Include panel library function? */",
"\n\n");
print($menus ? "#define " : "#undef ",
"C_MENUFUNCTION ",
"/* Include menu library function? */",
"\n\n");
print($forms ? "#define " : "#undef ",
"C_FORMFUNCTION ",
"/* Include form library function? */",
"\n\n");
|