]> granicus.if.org Git - flex/commitdiff
Output of `flex --version` now matches GNU coding standards.
authorJohn Millaway <john43@users.sourceforge.net>
Thu, 28 Mar 2002 19:52:33 +0000 (19:52 +0000)
committerJohn Millaway <john43@users.sourceforge.net>
Thu, 28 Mar 2002 19:52:33 +0000 (19:52 +0000)
Makefile.am now uses `help2man` to generate flex.1

Makefile.am
main.c

index 8975079276c7f68fbb17c09d9deba5b155f3064a..febfdf7511d03791f0c4b6cc5518ea76cfd49a97 100644 (file)
@@ -79,6 +79,7 @@ include_HEADERS = \
        FlexLexer.h
 
 info_TEXINFOS =        flex.texi
+man1_MANS = flex.1
 
 EXTRA_DIST = \
        AUTHORS \
@@ -95,7 +96,8 @@ EXTRA_DIST = \
        mkskel.sh \
        ABOUT-NLS \
        config.rpath \
-       gettext.h
+       gettext.h \
+       flex.1
 
 BUILT_SOURCES = \
        skel.c \
@@ -120,6 +122,9 @@ yylex.o: yylex.c parse.h flexdef.h config.h
 skel.c: flex.skl mkskel.sh
        $(SHELL) $(srcdir)/mkskel.sh $(srcdir)/flex.skl >skel.c
 
+flex.1: flex
+       help2man --name='fast lexical analyzer generator' --section=1 ./flex >flex.1
+
 main.o: main.c flexdef.h config.h version.h
 ccl.o: ccl.c flexdef.h config.h
 dfa.o: dfa.c flexdef.h config.h
diff --git a/main.c b/main.c
index b679d4d25a7a9254cac53d9b9fc9209f5dd8dab3..28c91b7436eb9b633f6ef6d63a7cb0db45676c00 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1115,7 +1115,7 @@ char **argv;
                     break;
 
             case OPT_VERSION:
-                    printf( _( "%s version %s\n" ),
+                    printf( _( "%s %s\n" ),
                             program_name, flex_version );
                     exit( 0 );
 
@@ -1673,10 +1673,12 @@ void usage()
         outfilename = outfile_path;
         }
 
-    fprintf(f,_( "%s [OPTIONS...] [file...]\n"), program_name);
+    fprintf(f,_( "Usage: %s [OPTIONS] [FILE]...\n"), program_name);
     fprintf(f,
 _(
-"Table Compression: (default is -Cem)\n"
+"Generates programs that perform pattern-matching on text.\n"
+"\n"
+"Table Compression:\n"
 "  -Ca, --align      trade off larger tables for better memory alignment\n"
 "  -Ce, --ecs        construct equivalence classes\n"
 "  -Cf               do not compress tables; use -f representation\n"
@@ -1685,7 +1687,8 @@ _(
 "  -Cr, --read       use read() instead of stdio for scanner input\n"
 "  -f, --full        generate fast, large scanner. Same as -Cfr\n"
 "  -F, --fast        use alternate table representation. Same as -CFr\n"
-  
+"  -Cem              default compression (same as --ecs --meta-ecs)\n"
+
 "\n"
 "Debugging:\n"
 "  -d, --debug             enable debug mode in scanner\n"