summaryrefslogtreecommitdiff
path: root/src/roff/groff/Makefile.sub
diff options
context:
space:
mode:
authorbwarken <bwarken>2013-04-26 23:33:22 +0000
committerbwarken <bwarken>2013-04-26 23:33:22 +0000
commit577bd0202826b8f8b1bf04c09d0a48b74adeb799 (patch)
tree9ce59c72eb41efbf024d3df7e61df1d7b0764fb8 /src/roff/groff/Makefile.sub
parentd92cd1cfd422db89483261b9c0641d54226474ce (diff)
downloadgroff-577bd0202826b8f8b1bf04c09d0a48b74adeb799.tar.gz
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'.
Diffstat (limited to 'src/roff/groff/Makefile.sub')
-rw-r--r--src/roff/groff/Makefile.sub27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/roff/groff/Makefile.sub b/src/roff/groff/Makefile.sub
index 2be61fb5..8fd89cdb 100644
--- a/src/roff/groff/Makefile.sub
+++ b/src/roff/groff/Makefile.sub
@@ -31,25 +31,28 @@ CCSRCS=$(srcdir)/groff.cpp
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
- ./$< > $@
+groff_options.txt: groff.cpp
+ $(EGREP) -A2 -e 'getopt' $< \
+ | sed -n -e '/"/p' \
+ | sed -e 's/^[^"\]*"//' \
+ | sed -e 's/"[^"]*$$//' > $@
-install_data: groff_options.info
- -test -d $(DESTDIR)$(libdir)/groff \
- || $(mkinstalldirs) $(DESTDIR)$(libdir)/groff
- $(RM) $(DESTDIR)$(libdir)/groff/$<
- $(INSTALL_SCRIPT) $< $(DESTDIR)$(libdir)/groff
+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)
########################################################################