1 # Makefile.sub for `src roff groff'
3 # File position: <groff-source>/src/roff/groff/Makefile.sub
5 # Copyright (C) 1993-2014 Free Software Foundation, Inc.
7 # Rewritten by Bernd Warken <groff-bernd.warken-72@web.de> and
8 # Werner LEMBERG <wl@gnu.org>
10 # `groff' is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # `groff' is distributed in the hope that it will be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ########################################################################
27 XLIBS=$(LIBGROFF) $(LIBGNU)
29 OBJS=groff.$(OBJEXT) pipeline.$(OBJEXT)
30 CCSRCS=$(srcdir)/groff.cpp
31 CSRCS=$(srcdir)/pipeline.c
32 HDRS=$(srcdir)/pipeline.h
35 groff_opts_no_arg.txt \
36 groff_opts_with_arg.txt
38 MOSTLYCLEANADD=groff_opts.tmp $(GROFF_OPTS_OUTPUT)
42 all: $(srcdir)/groff.cpp groff_opts.tmp $(GROFF_OPTS_OUTPUT)
44 groff_opts.tmp: $(srcdir)/groff.cpp
45 @$(GREP) -e ':.*:.*:' $? | sed -e 's/[ \t",]//g' > $@
46 @echo -n 'groff options: '
49 groff_opts_no_arg.txt: groff_opts.tmp
50 @sed -e 's/[a-zA-Z]://g' $? > $@
54 groff_opts_with_arg.txt: groff_opts_no_arg.txt
55 @sed "s/[`cat $?`:]//g" groff_opts.tmp > $@
59 install_data: $(GROFF_OPTS_OUTPUT)
60 -test -d $(DESTDIR)$(libprogramdir) \
61 || $(mkinstalldirs) $(DESTDIR)$(libprogramdir)
62 for f in $(GROFF_OPTS_OUTPUT); do \
63 $(RM) $(DESTDIR)$(libprogramdir)/$$f; \
64 $(INSTALL_SCRIPT) $$f $(DESTDIR)$(libprogramdir); \
68 -for f in $(GROFF_OPTS_OUTPUT); do \
69 $(RM) $(DESTDIR)$(libprogramdir)/$$f;\
71 # XXX This will be removed by `uninstall_dirs' in `$(top_srcdir)/Makefile.in'
72 # XXX (And only from there it is successful on an empty directory)
73 # -d=$(DESTDIR)$(libprogramdir);\
74 # if test -d $$d; then rmdir $$d; fi
76 ########################################################################
78 ########################################################################