groff-commit
[Top][All Lists]
Advanced

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

[groff] 14/45: Fix `clean' and `install' target in src/roff/*.


From: Bertrand Garrigues
Subject: [groff] 14/45: Fix `clean' and `install' target in src/roff/*.
Date: Tue, 11 Nov 2014 21:25:53 +0000

bgarrigues pushed a commit to branch automake3
in repository groff.

commit 40f2b33a0d0af48081bd0c363d09a30a59dd7294
Author: Bertrand Garrigues <address@hidden>
Date:   Wed Aug 27 00:06:04 2014 +0200

    Fix `clean' and `install' target in src/roff/*.
    
    * src/roff/*/*.am: fix `clean' rule.
    * src/roff/groff/groff.am: custom build and install rules for .txt
      files.
---
 TESTS                   |   13 +------------
 src/roff/groff/groff.am |   23 +++++++++++++++++++++++
 src/roff/grog/grog.am   |    2 ++
 src/roff/nroff/nroff.am |    2 ++
 src/roff/troff/troff.am |    1 +
 5 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/TESTS b/TESTS
index 9b5b03f..04cde57 100644
--- a/TESTS
+++ b/TESTS
@@ -158,11 +158,6 @@ were built from a clean environment:
 
 2.2 make clean
 
-TODO: following files are not cleaned:
-  - grog
-  - nroff
-  - src/roff/troff/majorminor.cpp
-
 The following files remain (this is expected):
   - Makefile
   - config.status
@@ -219,11 +214,6 @@ Differences with former build system:
 
 2.6 make install
 
-TODO: 
-
-  - groff.am should install groff_opts_no_arg.txt and
-    groff_opts_with_arg.txt
-
   mkdir -p ~/tmp/automake
   make install DESTDIR=~/tmp/automake
 
@@ -237,11 +227,10 @@ TODO:
   - In $(DESTDIR)/usr/local/lib/X11/app-defaults: GXditview and
     GXditview-color. If these files are already present, they are
     first moved to GXditview.old and GXditview-color.old.
+  - groff_opts_no_arg.txt and groff_opts_with_arg.txt are installed
 
 2.7 make uninstall
 
-TODO: src/devices specific rules
-  
   Removes:
 
   - $(DESTDIR)/usr/local/lib/charset.alias if exists
diff --git a/src/roff/groff/groff.am b/src/roff/groff/groff.am
index 3021709..8c7d963 100644
--- a/src/roff/groff/groff.am
+++ b/src/roff/groff/groff.am
@@ -34,3 +34,26 @@ groff_SOURCES = \
   src/roff/groff/pipeline.h
 src/roff/groff/groff.$(OBJEXT): defs.h
 man1_MANS += src/roff/groff/groff.n
+GROFF_OPTS_OUTPUT = \
+  groff_opts_no_arg.txt \
+  groff_opts_with_arg.txt
+groffoptsdir = $(libprogramdir)
+groffopts_DATA = $(GROFF_OPTS_OUTPUT)
+
+MOSTLYCLEANFILES += groff_opts.tmp $(GROFF_OPTS_OUTPUT)
+
+groff_opts.tmp: src/roff/groff/groff.cpp
+       @$(GREP) -e ':.*:.*:' $? | sed -e 's/[ \t",]//g' > $@
+       @echo -n 'groff options: '
+       @cat $@
+
+groff_opts_no_arg.txt: groff_opts.tmp
+       @sed -e 's/[a-zA-Z]://g' $? > $@
+       @echo -n 'no arg: '
+       @cat $@
+
+groff_opts_with_arg.txt: groff_opts_no_arg.txt
+       @rm -f $@
+       @sed "s/[`cat $?`:]//g" groff_opts.tmp > $@
+       @echo -n 'with arg: '
+       @cat $@
diff --git a/src/roff/grog/grog.am b/src/roff/grog/grog.am
index 9fdb0aa..ad969b4 100644
--- a/src/roff/grog/grog.am
+++ b/src/roff/grog/grog.am
@@ -29,6 +29,8 @@ grogdir = $(grog_dir)
 dist_grog_DATA = $(GROG)
 man1_MANS += src/roff/grog/grog.n
 
+MOSTLYCLEANFILES += grog
+
 # Perl version works for all parts of `groff'.
 
 grog: $(grog_srcdir)/grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
diff --git a/src/roff/nroff/nroff.am b/src/roff/nroff/nroff.am
index 82912a8..9a21fba 100644
--- a/src/roff/nroff/nroff.am
+++ b/src/roff/nroff/nroff.am
@@ -20,6 +20,8 @@ bin_SCRIPTS += nroff
 nroff_srcdir = $(top_srcdir)/src/roff/nroff
 man1_MANS += src/roff/nroff/nroff.n
 
+MOSTLYCLEANFILES += nroff
+
 nroff: $(nroff_srcdir)/nroff.sh $(SH_DEPS_SED_SCRIPT)
        rm -f $@
        sed -f $(SH_DEPS_SED_SCRIPT) \
diff --git a/src/roff/troff/troff.am b/src/roff/troff/troff.am
index c81289f..4593550 100644
--- a/src/roff/troff/troff.am
+++ b/src/roff/troff/troff.am
@@ -43,6 +43,7 @@ troff_SOURCES = \
   src/roff/troff/majorminor.cpp 
 
 src/roff/troff/input.$(OBJEXT): defs.h
+CLEANFILES += src/roff/troff/majorminor.cpp
 
 src/roff/troff/majorminor.cpp: $(top_srcdir)/VERSION $(top_srcdir)/REVISION
        @echo Making $@



reply via email to

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