1 # Makefile.sub for `grog'
3 # File position: <groff-source>/src/roff/grog/Makefile.sub
5 # Copyright (C) 1993-2014 Free Software Foundation, Inc.
7 # This file is part of `grog' which is part of `groff'.
9 # `groff' is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or
12 # (at your option) any later version.
14 # `groff' is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this program. If not, see <http://www.gnu.org/licenses/>.
22 ########################################################################
25 MOSTLYCLEANADD=grog $(MAN1)
27 # not all make programs have $(RM) predefined.
33 GROG=$(srcdir)/subs.pl
34 GROG_=`echo $(GROG) | sed 's|$(srcdir)/||g'`
37 # Perl version works for all parts of `groff'.
39 grog: grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
41 sed -f "$(SH_DEPS_SED_SCRIPT)" \
42 -e "1s|^\(#! \).*perl|\\1$(PERL)|" \
44 -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
45 -e "s|@grog_dir@|$(DESTDIR)$(grog_dir)|g" \
46 -e "s|@EGREP@|$(EGREP)|g" \
47 -e "s|@VERSION@|$(version)$(revision)|" \
48 -e "$(SH_SCRIPT_SED_CMD)" \
54 -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
55 $(RM) $(DESTDIR)$(bindir)/grog
56 $(INSTALL_SCRIPT) grog $(DESTDIR)$(bindir)/grog
57 -test -d $(DESTDIR)$(grog_dir) || $(mkinstalldirs) $(DESTDIR)$(grog_dir)
58 for f in $(GROG_); do \
59 $(RM) $(DESTDIR)$(grog_dir)/$$f; \
60 $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(grog_dir)/$$f; \
63 .PHONY: uninstall_data
65 $(RM) $(DESTDIR)$(bindir)/grog
66 -for f in $(GROG_); do \
67 $(RM) $(DESTDIR)$(grog_dir)/$$f; \
69 -d=$(DESTDIR)$(grog_dir);\
70 if test -d $$d; then rmdir $$d; fi
73 ########################################################################
75 ########################################################################