1 # Makefile.sub for `glilypond'
3 # File position: <groff-source>/contrib/lilypond/Makefile.sub
5 # Copyright (C) 2013-2014 Free Software Foundation, Inc.
6 # Written by Werner Lemberg <wl@gnu.org> and
7 # Bernd Warken <groff-bernd.warken-72@web.de>.
9 # This file is part of `glilypond' which is part of `groff'.
11 # `groff' is free software; you can redistribute it and/or modify it
12 # under the terms of the GNU General Public License as published by
13 # the Free Software Foundation, either version 3 of the License, or
14 # (at your option) any later version.
16 # `groff' is distributed in the hope that it will be useful, but
17 # WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 # General Public License for more details.
21 # You should have received a copy of the GNU General Public License
22 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 ########################################################################
28 MOSTLYCLEANADD=glilypond $(MAN1)
32 # files going to lib directory `$(glilypond_dir)'
39 GLILYPOND_LIB_=`echo $(GLILYPOND_LIB) | sed 's|$(srcdir)/||g'`
43 # create perl executable `glilypond', being stored into `bindir'
45 glilypond: $(srcdir)/glilypond.pl
47 sed -f "$(SH_DEPS_SED_SCRIPT)" \
49 -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
50 -e "s|@glilypond_dir@|$(DESTDIR)$(glilypond_dir)|g" \
51 -e "s|@VERSION@|$(version)$(revision)|g" \
52 $(srcdir)/glilypond.pl >$@
55 install_data: glilypond $(GLILYPOND_LIB)
56 -test -d $(DESTDIR)$(bindir) \
57 || $(mkinstalldirs) $(DESTDIR)$(bindir)
58 $(RM) $(DESTDIR)$(bindir)/glilypond
59 $(INSTALL_SCRIPT) glilypond $(DESTDIR)$(bindir)/glilypond
60 -test -d $(DESTDIR)$(glilypond_dir) \
61 || $(mkinstalldirs) $(DESTDIR)$(glilypond_dir)
62 for f in $(GLILYPOND_LIB_); do \
63 $(RM) $(DESTDIR)$(glilypond_dir)/$$f; \
64 $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(glilypond_dir)/$$f; \
68 $(RM) $(DESTDIR)$(bindir)/glilypond
69 -for f in $(GLILYPOND_LIB_); do \
70 $(RM) $(DESTDIR)$(glilypond_dir)/$$f; \
72 -test -d $(DESTDIR)$(glilypond_dir) && \
73 rmdir $(DESTDIR)$(glilypond_dir)
75 ########################################################################
77 ########################################################################