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