bug-gv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gv] [bug #23896] case collision with src/GV and src/gv


From: Bernhard R. Link
Subject: Re: [bug-gv] [bug #23896] case collision with src/GV and src/gv
Date: Sun, 20 Jul 2008 13:25:27 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

* Markus Steinborn <address@hidden> [080720 09:57]:
> and run "autoreconf". Then $(srcdir)/GV is not build and installed. (It is
> not used anyway. It is just an template for the administrator of the system
> for building a system wide app-default file, so you can do a test without it.)

I think another fix is just putting it into some other directory:

Index: src/Makefile.am
===================================================================
RCS file: /sources/gv/gv/src/Makefile.am,v
retrieving revision 1.33
diff -u -r1.33 Makefile.am
--- src/Makefile.am     20 Jul 2008 06:17:51 -0000      1.33
+++ src/Makefile.am     20 Jul 2008 10:21:27 -0000
@@ -11,14 +11,14 @@
 
 appdefaultsdir = $(pkgdatadir)
 
-appdefaults_DATA = GV
+appdefaults_DATA = ../GV
 
 EXTRA_DIST=ad2c gv_font_res.dat gv_layout_res.dat gv_misc_res.dat 
Aaa_bison.yacc \
            gv_current.xbm gv_doc.xbm gv_empty.xbm gv_even.xbm gv_icon.xbm 
gv_odd.xbm \
            gv_selected.xbm gv_unmark.xbm
 
 # Clean files
-CLEANFILES = $(srcdir)/GV \
+CLEANFILES = ../GV \
              $(srcdir)/GV.ad \
              $(srcdir)/gv_system.ad \
              $(srcdir)/gv_user.ad \
@@ -155,9 +155,9 @@
 
 # Additional rules for generating styles
 
-GV : $(srcdir)/GV.ad
+../GV : $(srcdir)/GV.ad
        @echo "creating GV"
-       sed -e 's/^[^!]/!&/' $(srcdir)/GV.ad > $(srcdir)/GV
+       sed -e 's/^[^!]/!&/' $(srcdir)/GV.ad > ../GV
 
 $(srcdir)/GV.ad : $(srcdir)/gv_system.ad
        @echo "creating GV.ad"

This also fixes a potential problem with out-of-tree builds: Previously it
used sometimes srcdir[1] and sometimes not for this file,
possibly causing make to behave strangely when build out of tree.

Another bug of this kind is doc/Makefile.am using ../src/*.h instead
of $(srcdir)/../src/*.h or even better $(top_srcdir)/src/*.h.
(and as that is a file to be shipped in the source tarball, I'd put that
into the $(srcdir) [1]), i.e:

Index: doc/Makefile.am
===================================================================
RCS file: /sources/gv/gv/doc/Makefile.am,v
retrieving revision 1.6
diff -u -r1.6 Makefile.am
--- doc/Makefile.am     3 Jun 2008 17:07:48 -0000       1.6
+++ doc/Makefile.am     20 Jul 2008 10:34:29 -0000
@@ -13,5 +13,5 @@
 
 man_MANS = gv.1
 
-gv.1: ../src/versionp.h ../src/gv_message.h
-       help2man -n 'Postscript and PDF viewer' -o gv.1 ../src/gv
+$(srcdir)/gv.1: $(top_srcdir)/src/versionp.h $(top_srcdir)/src/gv_message.h
+       help2man -n 'Postscript and PDF viewer' -o $(srcdir)/gv.1 ../src/gv

Another problem for out-of-tree working is version.texi. I think just
not generating that yourself and using the version generated by the
autotools solves this: Removing doc/version.texi.in, changing
configure.ac to not generate it, changing doc/gv.texi to use VERSION
instead of GVVER (and perhaps not using EDITION, as automake puts the
version in that too).

Hochachtungsvoll,
        Bernhard R. Link

[1] which is already strange for generated, non-shipped files, and I do
not understand why it is done here (see also 2nd part of [2]).
It also breaks make distcheck.

[2] GNU Coding Standards says:
| GNU distributions usually contain some files which are not source
| files--for example, Info files, and the output from Autoconf, Automake,
| Bison or Flex. Since these files normally appear in the source
| directory, they should always appear in the source directory, not in the
| build directory. So Makefile rules to update them should put the updated
| files in the source directory.
| 
| However, if a file does not appear in the distribution, then the
| Makefile should notput it in the source directory, because building a
| program in ordinary circumstances should not modify the source directory
| in any way.

-- 
"Never contain programs so few bugs, as when no debugging tools are available!"
        Niklaus Wirth




reply via email to

[Prev in Thread] Current Thread [Next in Thread]