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


From: Bernd Warken
Subject: [Groff-commit] groff ChangeLog src/roff/groff/Makefile.sub
Date: Sun, 28 Apr 2013 01:28:08 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Bernd Warken <bwarken>  13/04/28 01:28:08

Modified files:
        .              : ChangeLog 
        src/roff/groff : Makefile.sub 

Log message:
        src/roff/groff/Makefile.sub: Use `make' variables to get
        `groff' options from `getopt' in `groff.cpp'.  Create 2 files
        `groff_opts_no_arg.txt' and `groff_opts_with_arg.txt'.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1416&r2=1.1417
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/groff/Makefile.sub?cvsroot=groff&r1=1.8&r2=1.9

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1416
retrieving revision 1.1417
diff -u -b -r1.1416 -r1.1417
--- ChangeLog   26 Apr 2013 23:33:22 -0000      1.1416
+++ ChangeLog   28 Apr 2013 01:28:07 -0000      1.1417
@@ -1,3 +1,10 @@
+2013-04-28  Bernd Warken  <address@hidden>
+2013-04-28  Werner LEMBERG  <address@hidden>
+
+       * src/roff/groff/Makefile.sub: Use `make' variables to get
+       `groff' options from `getopt' in `groff.cpp'.  Create 2 files
+       `groff_opts_no_arg.txt' and `groff_opts_with_arg.txt'.
+
 2013-04-26  Bernd Warken  <address@hidden>
 
        * src/roff/groff/read_groff_options.pl: Remove this file.  It's
@@ -11,7 +18,8 @@
 
        Various minor fixes.
 
-       * INSTALL.gen: Take the newest version from the `gnulib' repository.
+       * INSTALL.gen: Take the newest version from the `gnulib'
+       repository.
 
        * configure: Regenerated.
 
@@ -20,13 +28,13 @@
        * INSTALL.gen: Restore an older version from `2006' in
        `groff-1.21'.
 
-       * FOR-RELEASE: New file which describes how to prepare `groff' for
-       a new release.
+       * FOR-RELEASE: New file which describes how to prepare `groff'
+       for a new release.
 
 2013-04-26  Bernd Warken  <address@hidden>
 
-       * src/roff/groff/read_groff_options.pl: Reads `groff' options from
-       `groff.cpp' and writes them into the file `groff_options.info'.
+       * src/roff/groff/read_groff_options.pl: Reads `groff' options           
from `groff.cpp' and writes them into the file  
+       `groff_options.info'.
 
        * src/roff/groff/Makefile.sub: Have the generated file
        `groff_options.info' be installed into the `groff libdir'.

Index: src/roff/groff/Makefile.sub
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/groff/Makefile.sub,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- src/roff/groff/Makefile.sub 26 Apr 2013 23:33:22 -0000      1.8
+++ src/roff/groff/Makefile.sub 28 Apr 2013 01:28:07 -0000      1.9
@@ -5,7 +5,7 @@
 # Copyright (C) 1993-2013
 #   Free Software Foundation, Inc.
 
-# Last update: 26 Apr 2013
+# Last update: 28 Apr 2013
 
 # `groff' is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -31,26 +31,52 @@
 CSRCS=$(srcdir)/pipeline.c
 HDRS=$(srcdir)/pipeline.h
 
-MOSTLYCLEANADD=groff_options.txt
+GROFF_OPTS_OUTPUT := groff_opts_no_arg.txt \
+       groff_opts_with_arg.txt
+
+MOSTLYCLEANADD := $(GROFF_OPTS_OUTPUT)
 
 RM=rm -f
 
-all: groff_options.txt
+OPTS := $(shell $(EGREP) -e ':.*:.*:' groff.cpp \
+       | sed -e 's/[ \t",]//g')
+
+OPTS_NO_ARG := $(shell echo $(OPTS) \
+       | sed -e 's/[a-zA-Z]://g')
+
+OPTS_WITH_ARG := $(shell echo $(OPTS) \
+       | sed "s/[$(OPTS_NO_ARG):]//g")
+
+show:
+       @echo opts: $(OPTS)
+       @echo no: $(OPTS_NO_ARG)
+       @echo optarg: $(OPTS_WITH_ARG)
+
+.PHONY: all
+all: groff.cpp $(GROFF_OPTS_OUTPUT)
+
+groff_opts_no_arg.txt:
+       $(RM) $@
+       echo $(OPTS_NO_ARG) > $@
 
-groff_options.txt: groff.cpp
-       $(EGREP) -A2 -e 'getopt' $< \
-       | sed -n -e '/"/p' \
-       | sed -e 's/^[^"\]*"//' \
-       | sed -e 's/"[^"]*$$//' > $@
+groff_opts_with_arg.txt:
+       $(RM) $@
+       echo $(OPTS_WITH_ARG) > $@
 
-install_data: groff_options.txt
+.PHONY: install_data
+install_data: $(GROFF_OPTS_OUTPUT)
        -test -d $(DESTDIR)$(libprogramdir) \
                || $(mkinstalldirs) $(DESTDIR)$(libprogramdir)
-       $(RM) $(DESTDIR)$(libprogramdir)/$<
-       $(INSTALL_SCRIPT) $< $(DESTDIR)$(libprogramdir)
+       for f in  $(GROFF_OPTS_OUTPUT); do \
+               $(RM) $(DESTDIR)$(libprogramdir)/$$f; \
+               $(INSTALL_SCRIPT) $$f $(DESTDIR)$(libprogramdir); \
+       done
 
+.PHONY: uninstall_data
 uninstall_sub:
-       $(RM) $(DESTDIR)$(libprogramdir)/groff_options.txt
+       for f in $(GROFF_OPTS_OUTPUT); do \
+               $(RM) $(DESTDIR)$(libprogramdir)/$$f; \
+       done
        -test -d $(DESTDIR)$(libprogramdir) \
                 && -rmdir $(DESTDIR)$(libprogramdir)
 



reply via email to

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