# Makefile.sub for `groff' # File position: /src/roff/groff/Makefile.sub # Copyright (C) 1993-2013 # Free Software Foundation, Inc. # Rewritten by Bernd Warken and # Werner LEMBERG # 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 # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # `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 this program. If not, see . ######################################################################## PROG=groff$(EXEEXT) MAN1=groff.n XLIBS=$(LIBGROFF) $(LIBGNU) MLIB=$(LIBM) OBJS=groff.$(OBJEXT) pipeline.$(OBJEXT) CCSRCS=$(srcdir)/groff.cpp CSRCS=$(srcdir)/pipeline.c HDRS=$(srcdir)/pipeline.h GROFF_OPTS_OUTPUT=groff_opts_no_arg.txt \ groff_opts_with_arg.txt MOSTLYCLEANADD=groff_opts.tmp $(GROFF_OPTS_OUTPUT) RM=rm -f .PHONY: all all: $(CCSRCS) groff_opts.tmp $(GROFF_OPTS_OUTPUT) groff_opts.tmp: $(CCSRCS) @$(EGREP) -e ':.*:.*:' $< \ | sed -e 's/[ \t",]//g' > $@ @echo -n 'groff options: ' @cat $@ groff_opts_no_arg.txt: groff_opts.tmp @$(RM) $@ @cat $< \ | sed -e 's/[a-zA-Z]://g' > $@ @echo -n 'no arg: ' @cat $@ groff_opts_with_arg.txt: groff_opts_no_arg.txt @$(RM) $@ @cat groff_opts.tmp \ | sed "s/[`cat $<`:]//g" > $@ @echo -n 'with arg: ' @cat $@ .PHONY: install_data install_data: $(GROFF_OPTS_OUTPUT) -test -d $(DESTDIR)$(libprogramdir) \ || $(mkinstalldirs) $(DESTDIR)$(libprogramdir) for f in $(GROFF_OPTS_OUTPUT); do \ $(RM) $(DESTDIR)$(libprogramdir)/$$f; \ $(INSTALL_SCRIPT) $$f $(DESTDIR)$(libprogramdir); \ done .PHONY: uninstall_data uninstall_sub: for f in $(GROFF_OPTS_OUTPUT); do \ $(RM) $(DESTDIR)$(libprogramdir)/$$f; \ done -test -d $(DESTDIR)$(libprogramdir) \ && -rmdir $(DESTDIR)$(libprogramdir) ######################################################################## # Emacs settings ######################################################################## # # Local Variables: # mode: makefile # End: