groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff ChangeLog src/roff/groff/Makefile.sub src...


From: Bernd Warken
Subject: [Groff-commit] groff ChangeLog src/roff/groff/Makefile.sub src...
Date: Fri, 26 Apr 2013 23:33:22 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Bernd Warken <bwarken>  13/04/26 23:33:22

Modified files:
        .              : ChangeLog 
        src/roff/groff : Makefile.sub 
Removed files:
        src/roff/groff : read_groff_options.pl 

Log message:
        src/roff/groff:
        
        `read_groff_options.pl' is no longer needed.
        
        `Makefile.sub': Get `groff' options from `getopt' in `groff.cpp'.  
Store it
        in a new file `groff_options.txt', which is installed in `groff libdir'.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1415&r2=1.1416
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/groff/Makefile.sub?cvsroot=groff&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/groff/read_groff_options.pl?cvsroot=groff&r1=1.1&r2=0

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1415
retrieving revision 1.1416
diff -u -b -r1.1415 -r1.1416
--- ChangeLog   26 Apr 2013 06:21:33 -0000      1.1415
+++ ChangeLog   26 Apr 2013 23:33:22 -0000      1.1416
@@ -1,3 +1,12 @@
+2013-04-26  Bernd Warken  <address@hidden>
+
+       * src/roff/groff/read_groff_options.pl: Remove this file.  It's
+       no longer needed.
+
+       * src/roff/groff/Makefile.sub: Get the `groff' options from the         
use of `getopt...' in `groff.cpp' using `$(EGREP)' and `sed'.
+       Store this information in a new file `groff_options.txt', which 
+       is copied to `groff libdir' during the installation.
+
 2013-04-26  Werner LEMBERG  <address@hidden>
 
        Various minor fixes.

Index: src/roff/groff/Makefile.sub
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/groff/Makefile.sub,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- src/roff/groff/Makefile.sub 26 Apr 2013 06:21:34 -0000      1.7
+++ src/roff/groff/Makefile.sub 26 Apr 2013 23:33:22 -0000      1.8
@@ -31,25 +31,28 @@
 CSRCS=$(srcdir)/pipeline.c
 HDRS=$(srcdir)/pipeline.h
 
-MOSTLYCLEANADD=groff_options.info
+MOSTLYCLEANADD=groff_options.txt
 
 RM=rm -f
 
-all: groff_options.info
+all: groff_options.txt
 
-groff_options.info: read_groff_options.pl
-                   ./$< > $@
-
-install_data: groff_options.info
-       -test -d $(DESTDIR)$(libdir)/groff \
-               || $(mkinstalldirs) $(DESTDIR)$(libdir)/groff
-       $(RM) $(DESTDIR)$(libdir)/groff/$<
-       $(INSTALL_SCRIPT) $< $(DESTDIR)$(libdir)/groff
+groff_options.txt: groff.cpp
+       $(EGREP) -A2 -e 'getopt' $< \
+       | sed -n -e '/"/p' \
+       | sed -e 's/^[^"\]*"//' \
+       | sed -e 's/"[^"]*$$//' > $@
+
+install_data: groff_options.txt
+       -test -d $(DESTDIR)$(libprogramdir) \
+               || $(mkinstalldirs) $(DESTDIR)$(libprogramdir)
+       $(RM) $(DESTDIR)$(libprogramdir)/$<
+       $(INSTALL_SCRIPT) $< $(DESTDIR)$(libprogramdir)
 
 uninstall_sub:
-       $(RM) $(DESTDIR)$(libdir)/groff/groff_options.info
-       -test -d $(DESTDIR)$(libdir)/groff \
-                && -rmdir $(DESTDIR)$(libdir)/groff
+       $(RM) $(DESTDIR)$(libprogramdir)/groff_options.txt
+       -test -d $(DESTDIR)$(libprogramdir) \
+                && -rmdir $(DESTDIR)$(libprogramdir)
 
 
 ########################################################################

Index: src/roff/groff/read_groff_options.pl
===================================================================
RCS file: src/roff/groff/read_groff_options.pl
diff -N src/roff/groff/read_groff_options.pl
--- src/roff/groff/read_groff_options.pl        25 Apr 2013 22:36:24 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,165 +0,0 @@
-#! /usr/bin/env perl
-
-use strict;
-use warnings;
-use diagnostics;
-
-
-########################################################################
-# Legalese
-########################################################################
-
-use constant LASTUPDATE => '25 Apr 2013'; # date of last update
-
-### The following constants `LICENSE[12]' are the license for this
-### file using `GPL' >= 3
-
-use constant LICENSE1 => q*
-read_groff_options.pl - generate lines with the `groff' options.
-
-Source file position: <groff-source>/src/roff/groff/read_groff_options.pl
-*;
-
-use constant LICENSE2 => q*
-Copyright (C) 2013
-  Free Software Foundation, Inc.
-  Written by Bernd Warken <address@hidden>.
-
-This file is part of `groff'.
-
-  `GNU groff' is free software: you can redistribute it and/or modify it
-under the terms of the `GNU General Public License' as published by the
-`Free Software Foundation', either version 3 of the License, or (at your
-option) any later version.
-
-  `GNU groff' is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the `GNU
-General Public License' for more details.
-
-  You should have received a copy of the 'GNU General Public License`
-along with `groff', see the files `COPYING' and `LICENSE' in the top
-directory of the `groff' source package.  If not, see
-<http://www.gnu.org/licenses/>.*;
-
-
-use constant DOCUMENTATION => q*
-  This file is not installed, but is used to generate output
-containing information of the `groff' options, which are read from the
-function `synopsis' of the file `groff.cpp' in
-`<groff-source>/src/roff/groff/'.  The output is something like:
-
-groff_noarg: CENRSUVXZabceghijklpstvz
-groff_witharg: DFIKLMPTWdfmnorw
-*;
-
-
-##### end legalese
-
-$\ = "\n";    # adds newline at each print
-$/ = "\n";    # newline separates input
-$| = 1;       # flush after each print or write command
-
-
-my $file = undef;
-{
-    use constant FALSE => 0;
-    use constant TRUE => 1;
-
-    use File::Spec qw[];
-
-    my $arg = shift;
-    my $cpp = 'groff.cpp';
-
-    if ( defined($arg) ) {
-       if ( -d $arg ) {
-           $file = File::Spec->catfile($arg, $cpp);
-           $file = undef unless ( -f $file );;
-       }
-       if ( -f $arg && $arg =~ /groff.cpp$/ ) {
-           $file = $arg;
-       }
-    } else { # no argument
-       if ( -f $cpp ) {
-           $file = $cpp;
-       }
-    }
-    die "read_groff_options.pl: needs a directory with $cpp as argument: $!."
-       unless ( defined($file) );
-
-}
-
-# $file is cpp-file
-
-my @lines = ();
-{
-    open(FH, '<', $file);
-    my $start_synopsis = FALSE;
-    foreach ( <FH> ) {
-       chomp;
-       if ( /^void\s+synopsis\(/ ) {
-           $start_synopsis = TRUE;
-           next;
-       }
-       if ( $start_synopsis ) {
-           if ( /\[-/ ) {
-               s/\\n//g;
-               push @lines, $_;
-               $start_synopsis = FALSE;
-           }
-           next;
-       }
-       if ( @lines ) {
-           if ( /\[-/ ) {
-               s/\\n//g;
-               push @lines, $_;
-               next;
-           } else {
-               last;
-           }
-       }
-       next;
-    }
-}
-
-{
-    my $noarg = '';
-    my $witharg = '';
-    my $first = shift @lines;
-    chomp $first;
-    $first =~ s/^[^-]*-(\w+)\]\s*//;
-    $noarg = $1;
-    unshift @lines, $first;
-
-    foreach ( @lines ) {
-       my $s = $_;
-       while ( $s =~ /-/ ) {
-           $s =~ s/^[^-]*-(\w)\w+]//;
-           $witharg .= $1;
-       }
-    }
-
-    sub sort_opts {
-       my @opts = split '', shift;
-       @opts = sort @opts;
-       return join '', @opts;
-    }
-
-    my $res = &sort_opts($noarg);
-    print 'groff_noarg: ' . $res;
-
-    $res = &sort_opts($witharg);
-    print 'groff_witharg: ' . $res;
-}
-
-print '';
-print '#' x 30 . ' License ' . '#' x 30;
-print q*
-groff_options.info - 2 lines with the `groff' options.
-
-This file is generated by the run of `make' in the `groff' source by
-the file <groff-source>/src/roff/groff/read_groff_options.pl.
-
-This file `groff_options.info' is installed in the `groff libdir'.*;
-
-print LICENSE2;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]