diff options
author | bwarken <bwarken> | 2013-04-30 00:40:33 +0000 |
---|---|---|
committer | bwarken <bwarken> | 2013-04-30 00:40:33 +0000 |
commit | 998cad027ffaa0ef79c3d22015c80f3c768a6be1 (patch) | |
tree | 0551605dcfa301b4f0c9e9fe431d73f6edf73c7e | |
parent | 0c1afde695837e60afff35b5a2be65259a29d7ec (diff) | |
download | groff-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.
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | Makefile.in | 3 | ||||
-rwxr-xr-x | configure | 11 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | contrib/glilypond/Makefile.sub | 30 | ||||
-rwxr-xr-x | contrib/glilypond/glilypond.pl | 7 | ||||
-rw-r--r-- | m4/groff.m4 | 11 | ||||
-rw-r--r-- | src/roff/groff/Makefile.sub | 5 |
8 files changed, 49 insertions, 32 deletions
@@ -1,3 +1,16 @@ +2013-04-30 Bernd Warken <groff-bernd.warken-72@web.de> + + * 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. + + * contrib/glilypond/Makefile.sub, contrib/glilypond/glilypond.pl: + Correct the install directories. + 2013-04-29 Bernd Warken <groff-bernd.warken-72@web.de> * src/roff/groff/Makefile.sub: Replace some variables by shell diff --git a/Makefile.in b/Makefile.in index 9c68f801..a64eb46f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,7 +2,7 @@ # Free Software Foundation, Inc. # Written by James Clark (jjc@jclark.com) # -# Last update: 28 Mar 2013 +# Last update: 30 Apr 2013 # # This file is part of groff. # @@ -190,6 +190,7 @@ localtmacdir=$(dataprogramdir)/site-tmac # gxditview. appresdir=@appresdir@ +libprogramdir=@libprogramdir@ groffer_dir=@groffer_dir@ glilypond_dir=@glilypond_dir@ grog_dir=@grog_dir@ @@ -744,7 +744,8 @@ PACKAGE_NAME PATH_SEPARATOR SHELL grog_dir -glilypond_dir' +glilypond_dir +libprogramdir' ac_subst_files='' ac_user_opts=' enable_option_checking @@ -5519,6 +5520,8 @@ EOF fi fi +libprogramdir=$libdir/groff + # Check whether --with-grofferdir was given. if test "${with_grofferdir+set}" = set; then : @@ -5526,14 +5529,14 @@ if test "${with_grofferdir+set}" = set; then : fi if test "x$with_grofferdir" = "x"; then - groffer_dir=$libdir/groff/groffer + groffer_dir=$libprogramdir/groffer else groffer_dir=$with_grofferdir fi -glilypond_dir=$libdir/groff/glilypond +glilypond_dir=$libprogramdir/glilypond -grog_dir=$libdir/groff/grog +grog_dir=$libprogramdir/grog { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } diff --git a/configure.ac b/configure.ac index 5ee82cc9..72fe2fc9 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,7 @@ GROFF_OS390 GROFF_X11 GROFF_APPRESDIR_OPTION GROFF_APPRESDIR_DEFAULT +GROFF_LIBPROGRAMDIR_DEFAULT GROFF_GROFFERDIR_OPTION GROFF_GROFFERDIR_DEFAULT GROFF_GLILYPONDDIR_DEFAULT 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@'; } diff --git a/m4/groff.m4 b/m4/groff.m4 index d93fe51e..9b4ce266 100644 --- a/m4/groff.m4 +++ b/m4/groff.m4 @@ -1252,18 +1252,23 @@ AC_DEFUN([GROFF_GROFFERDIR_OPTION], AC_DEFUN([GROFF_GROFFERDIR_DEFAULT], [if test "x$with_grofferdir" = "x"; then - groffer_dir=$libdir/groff/groffer + groffer_dir=$libprogramdir/groffer else groffer_dir=$with_grofferdir fi AC_SUBST([groffer_dir])]) +AC_DEFUN([GROFF_LIBPROGRAMDIR_DEFAULT], + libprogramdir=$libdir/groff + AC_SUBST([libprogramdir])) + + AC_DEFUN([GROFF_GLILYPONDDIR_DEFAULT], - glilypond_dir=$libdir/groff/glilypond + glilypond_dir=$libprogramdir/glilypond AC_SUBST([glilypond_dir])) AC_DEFUN([GROFF_GROGDIR_DEFAULT], - grog_dir=$libdir/groff/grog + grog_dir=$libprogramdir/grog AC_SUBST([grog_dir])) diff --git a/src/roff/groff/Makefile.sub b/src/roff/groff/Makefile.sub index 94e2f09e..9c10c28e 100644 --- a/src/roff/groff/Makefile.sub +++ b/src/roff/groff/Makefile.sub @@ -40,12 +40,11 @@ GROFF_OPTS_OUTPUT=groff_opts_no_arg.txt \ MOSTLYCLEANADD=groff_opts.tmp $(GROFF_OPTS_OUTPUT) RM=rm -f -EGREP=egrep .PHONY: all -all: groff.cpp groff_opts.tmp $(GROFF_OPTS_OUTPUT) +all: $(CCSRCS) groff_opts.tmp $(GROFF_OPTS_OUTPUT) -groff_opts.tmp: groff.cpp +groff_opts.tmp: $(CCSRCS) @$(EGREP) -e ':.*:.*:' $< \ | sed -e 's/[ \t",]//g' > $@ @echo -n 'groff options: ' |