summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorbwarken <bwarken>2013-04-30 00:40:33 +0000
committerbwarken <bwarken>2013-04-30 00:40:33 +0000
commit998cad027ffaa0ef79c3d22015c80f3c768a6be1 (patch)
tree0551605dcfa301b4f0c9e9fe431d73f6edf73c7e /contrib
parent0c1afde695837e60afff35b5a2be65259a29d7ec (diff)
downloadgroff-998cad027ffaa0ef79c3d22015c80f3c768a6be1.tar.gz
Makefile.in, m4/groff.m4: Add `@libprogramdir@' and
`$libprogramdir' (usually `/usr/local/lib/groff'). Change `$libdir/groff' into $libprogramdir for several `groff' programs. Run `autoreconf -I m4'. src/roff/groff/MAkefile.sub: Add $(DESTDIR) and $(srcdir) in order to support installation outside of source code.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/glilypond/Makefile.sub30
-rwxr-xr-xcontrib/glilypond/glilypond.pl7
2 files changed, 16 insertions, 21 deletions
diff --git a/contrib/glilypond/Makefile.sub b/contrib/glilypond/Makefile.sub
index b124b792..85393590 100644
--- a/contrib/glilypond/Makefile.sub
+++ b/contrib/glilypond/Makefile.sub
@@ -35,45 +35,47 @@ RM=rm -f
all: glilypond
-GLILYPOND=$(srcdir)/glilypond.pl \
- $(srcdir)/subs.pl \
+
+# files going to lib directory `$(glilypond_dir)'
+
+GLILYPOND_LIB=$(srcdir)/subs.pl \
$(srcdir)/oop_fh.pl \
$(srcdir)/args.pl
-GLILYPOND_=`echo $(GLILYPOND) | sed 's|$(srcdir)/||g'`
+GLILYPOND_LIB_=`echo $(GLILYPOND_LIB) | sed 's|$(srcdir)/||g'`
+
+
+# create perl executable `glilypond', being stored into `bindir'
-# TODO: Add perl check to configure script.
-glilypond: $(GLILYPOND)
+glilypond: $(srcdir)/glilypond.pl
sed -f "$(SH_DEPS_SED_SCRIPT)" \
-e "s|@g@|$(g)|g" \
-e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
- -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
-e "s|@glilypond_dir@|$(DESTDIR)$(glilypond_dir)|g" \
-e "s|@VERSION@|$(version)$(revision)|g" \
$(srcdir)/glilypond.pl >$@
chmod +x $@
-install_data: glilypond
- -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
+
+install_data: glilypond $(GLILYPOND_LIB)
+ -test -d $(DESTDIR)$(bindir) \
+ || $(mkinstalldirs) $(DESTDIR)$(bindir)
$(RM) $(DESTDIR)$(bindir)/$<
$(INSTALL_SCRIPT) glilypond $(DESTDIR)$(bindir)/$<
-test -d $(DESTDIR)$(glilypond_dir) \
|| $(mkinstalldirs) $(DESTDIR)$(glilypond_dir)
for f in $(GLILYPOND_); do \
$(RM) $(DESTDIR)$(glilypond_dir)/$$f; \
+ $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(glilypond_dir)/$$f; \
done
- for f in $(GLILYPOND_); do \
- $(INSTALL_SCRIPT) $(srcdir)/$$f \
- $(DESTDIR)$(glilypond_dir)/$$f; \
- done
+
uninstall_sub:
$(RM) $(DESTDIR)$(bindir)/glilypond;
for f in $(GLILYPOND_); do \
$(RM) $(DESTDIR)$(glilypond_dir)/$$f; \
done
- -test -d $(DESTDIR)$(libdir)/groff/glilypond \
- && -rmdir $(DESTDIR)$(libdir)/groff/glilypond
+ -rmdir $(DESTDIR)$(glilypond_dir)
########################################################################
# Emacs settings
diff --git a/contrib/glilypond/glilypond.pl b/contrib/glilypond/glilypond.pl
index 165aa277..ba46a9a0 100755
--- a/contrib/glilypond/glilypond.pl
+++ b/contrib/glilypond/glilypond.pl
@@ -111,23 +111,16 @@ BEGIN {
$Globals->{'before_make'} = TRUE if '@VERSION@' eq "${at}VERSION${at}";
}
- my %at_at;
my $file_test_pl;
my $glilypond_libdir;
if ( $Globals->{'before_make'} ) { # in source, not yet installed
my $glilypond_dir = $FindBin::Bin;
$glilypond_dir = Cwd::realpath($glilypond_dir);
- $at_at{'BINDIR'} = $glilypond_dir;
- $at_at{'G'} = '';
- $at_at{'LIBDIR'} = '';
$glilypond_libdir = $glilypond_dir;
} else { # already installed
$Globals->{'groff_version'} = '@VERSION@';
- $at_at{'BINDIR'} = '@BINDIR@';
- $at_at{'G'} = '@g@';
- $at_at{'LIBDIR'} = '@libdir@';
$glilypond_libdir = '@glilypond_dir@';
}