3 : ${fvwm_libdir=../../libs}
5 infile
=${fvwm_libdir}/Module.h
6 outfile
=`dirname $0`/Constants.pm
9 echo "# Autogenerated from the fvwm sources."; \
11 echo "package FVWM::Constants;"; \
12 echo "use Exporter;"; \
14 echo "@ISA = qw(Exporter);"; \
20 grep "#define M_" $infile; \
21 grep "#define MX_" $infile |
sed 's/ | /|/'; \
22 grep "#define MAX_MSG_MASK " $infile; \
23 grep "#define MAX_XMSG_MASK " $infile; \
24 grep "#define FvwmPacketHeaderSize " $infile |
sed 's/FvwmPacketHeaderSize/HEADER_SIZE/'; \
25 grep "#define START_FLAG " $infile; \
26 grep "#define ModuleFinishedStartupResponse " $infile |
tr ' ' : |
sed 's/:ModuleFinishedStartupResponse:\+/ RESPONSE_READY /'; \
27 grep "#define ModuleUnlockResponse " $infile |
tr ' ' : |
sed 's/:ModuleUnlockResponse:\+/ RESPONSE_UNLOCK /'; \
29 |
awk '{ print "use constant " $2 " => " $3 ";" }' \
34 echo "use constant ON_EXIT => '1e20';"; \
35 echo "use constant INTSIZE => \$Config{longsize};" \
40 grep constant
$outfile | cut
-d" " -f3 |
awk '{ print " " $1 }'; \
45 echo '@EXPORT = qw('; \
59 FVWM::Constants - exports fvwm specific constants
63 This class is used to load fvwm constants into your perl script or class.
64 Note, if you use I<FVWM::Module> the constants are automatically exported.
65 So you usually do not need to include this class.
73 For more information, see L<FVWM::Module>.
75 =head1 EXPORTED CONSTANTS