* src/roff/troff/node.cpp (left_italic_corrected_node::add_self):
[s-roff.git] / contrib / chem / Makefile.sub
blob426cb2a1b6f552bf401d6034be20402856e4b110
1 # Makefile.sub for `chem' (integration into the `groff' source tree)
3 # File position: <groff-source>/contrib/chem/Makefile.sub
5 # Copyright (C) 2006 Free Software Foundation, Inc.
6 # Written by Bernd Warken.
8 # Last update: 10 Nov 2006
10 # This file is part of `chem' which is part of `groff'.
12 # `groff' is free software; you can redistribute it and/or modify it
13 # under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; either version 2, or (at your option)
15 # any later version.
17 # `groff' is distributed in the hope that it will be useful, but
18 # WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 # General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with `groff'; see the files COPYING and LICENSE in the top
24 # directory of the `groff' source.  If not, write to the Free Software
25 # Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
27 ########################################################################
29 MAN1=chem.n
30 CLEANADD=chem chem.n README examples/README
32 # not all make programs have $(RM) predefined.
33 RM=rm -f
35 all: README examples/README chem $(MAN1)
37 README: $(srcdir)/README.txt
38         sed -e "s|@g@|$(g)|g" $< >$@
40 examples/README: $(srcdir)/examples/README.txt
41         -test -d examples || $(mkinstalldirs) examples
42         sed -e "s|@g@|$(g)|g" $< >$@
44 chem: $(srcdir)/chem.pl $(SH_DEPS_SED_SCRIPT)
45         sed -f "$(SH_DEPS_SED_SCRIPT)" \
46           -e "s|@g@|$(g)|g" \
47           -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
48           -e "s|@MACRODIR@|$(DESTDIR)$(tmacdir)|g" \
49           -e "s|@PICDIR@|$(DESTDIR)$(datasubdir)/pic|g" \
50           -e "s|@VERSION@|$(version)$(revision)|g" \
51           -e "$(SH_SCRIPT_SED_CMD)" \
52           $(srcdir)/chem.pl >$@
53         chmod +x $@
55 install_data: chem \
56               README examples/README \
57               $(srcdir)/chem.pic \
58               $(srcdir)/examples/*.chem $(srcdir)/examples/122/*
59         -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
60         $(RM) $(DESTDIR)$(bindir)/$(g)chem
61         $(INSTALL_SCRIPT) chem $(DESTDIR)$(bindir)/$(g)chem
62         -test -d $(DESTDIR)$(datasubdir)/pic \
63           || $(mkinstalldirs) $(DESTDIR)$(datasubdir)/pic
64         $(RM) $(DESTDIR)$(datasubdir)/pic/chem.pic
65         $(INSTALL_DATA) $(srcdir)/chem.pic \
66           $(DESTDIR)$(datasubdir)/pic/chem.pic
67         -test -d $(DESTDIR)$(exampledir)/chem \
68           || $(mkinstalldirs) $(DESTDIR)$(exampledir)/chem/122
69         -test -d $(DESTDIR)$(exampledir)/chem/122 \
70           || $(mkinstalldirs) $(DESTDIR)$(exampledir)/chem/122
71         -$(RM) $(DESTDIR)$(exampledir)/chem/*
72         $(INSTALL_DATA) examples/README \
73           $(DESTDIR)$(exampledir)/chem/README
74         for i in $(srcdir)/examples/*.chem; do \
75           n=`echo $$i | sed 's|$(srcdir)/examples/||g'`; \
76           $(INSTALL_DATA) $$i $(DESTDIR)$(exampledir)/chem/$$n; \
77         done
78         -$(RM) $(DESTDIR)$(exampledir)/chem/122/*
79         for i in $(srcdir)/examples/122/*; do \
80           n=`echo $$i | sed 's|$(srcdir)/examples/122/||g'`; \
81           $(INSTALL_DATA) $$i $(DESTDIR)$(exampledir)/chem/122/$$n; \
82         done
84 uninstall_sub:
85         $(RM) $(DESTDIR)$(bindir)/chem
86         $(RM) $(DESTDIR)$(datasubdir)/pic/chem.pic
87         -rmdir $(DESTDIR)$(datasubdir)/pic
88         $(RM) $(DESTDIR)$(exampledir)/chem/122/*
89         -rmdir $(DESTDIR)$(exampledir)/chem/122
90         $(RM) $(DESTDIR)$(exampledir)/chem/*
91         -rmdir $(DESTDIR)$(exampledir)/chem
92         -rmdir $(DESTDIR)$(exampledir)
94 ########################################################################
95 # Emacs settings
96 ########################################################################
98 # Local Variables:
99 # mode: makefile
100 # End: