bug-automake
[Top][All Lists]
Advanced

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

Re: "make distcheck" vs. EXTRA_DIST files made during "make dist"


From: Greg A. Woods
Subject: Re: "make distcheck" vs. EXTRA_DIST files made during "make dist"
Date: Sun, 12 May 2002 18:59:01 -0400 (EDT)

[ On , May 12, 2002 at 20:07:34 (+0200), Alexandre Duret-Lutz wrote: ]
> Subject: Re: "make distcheck" vs. EXTRA_DIST files made during "make dist"
>
> Not exactly.  `make distcheck' exercizes your fresh tarball and
> complains about files created in the build tree (including when
> during `make dist') but not erased by `make distclean'.

Yes, _exactly_.  :-)

Perhaps I didn't explain myself clearly enough though.  I should have
made it clear where the unwanted files were appearing, or rather
remaining.  As you know "make distcheck" eventually does a "make
dist-gzip", but it does this in a separate build directory, not in the
directory where the unpacked distribution resides.  This necessarily
causes files that are not checked in to the source repository, but which
are built by my "make dist" to be re-built, but now in the build
directory where "make distclean" can't clean them out, thus they're
sitting ducks when distcheck comes along and finds them there in the
"wrong" place.

The only alternative, in my case, to keeping distcheck happy might be to
run "make maintainer-clean" instead of "make distclean", but I don't
think that's a good generic solution. (or maybe it is?)

> So, why are your files rebuilt at all?  

Because they must be.  :-)

In general I can't believe this isn't a more frequent problem.  Surely
there are lots more developers who are at least as particular as I am
about never checking any product files into their source repositories.

(I'll also bet there'll be quite a few more developers besides myself
who get surprised by the apparent decision in 1.6 to not remove auto*
generated files with "make maintainer-clean".)

> Could you post a larger excerpt?

How about the whole thing:

#
#       Makefile.am - input for automake
#
# Copyright (C) by Planix, Inc.
# - All rights reserved.
# - See COPYING for details.
#
#ident  "@(#)newsyslog:$Name:  $:$Id: Makefile.am,v 1.28 2002/05/10 21:51:45 
woods Exp $"

AUTOMAKE_OPTIONS = gnu no-dependencies 1.6
MAINT_CHARSET = latin1

bin_PROGRAMS = newsyslog
newsyslog_SOURCES = newsyslog.c signame.c
newsyslog_LDADD = @LIBOBJS@

man_MANS = newsyslog.conf.5 newsyslog.8

soelim_MANS = newsyslog.conf.5so newsyslog.8so
catman_MANS = newsyslog.conf.cat5 newsyslog.cat8
catman_MANS_dist = newsyslog.conf.cat5-dist newsyslog.cat8-dist
psman_MANS = newsyslog.conf.5.ps newsyslog.8.ps
psman_MANS_dist = newsyslog.conf.5.ps-dist newsyslog.8.ps-dist
htmlman_MANS = newsyslog.conf.5.html newsyslog.8.html
htmlman_MANS_dist = newsyslog.conf.5.html-dist newsyslog.8.html-dist

DIST_MANS = $(catman_MANS_dist) $(psman_MANS_dist) $(htmlman_MANS_dist)

catmandir = @mandir@

COMPAT_HDRS = compat/sys/cdefs.h compat/machine/ansi.h

COMPAT_MANS = str2sig.3

# things that exist in the repository and need to be in the distribution
#
DIST_OTHER = README.developers ToDo VERSION newsyslog.conf \
                newsyslog2netbsd.sh .cvsignore \
                $(COMPAT_HDRS) $(COMPAT_MANS)

# things that must be made during 'make dist'
#
DIST_MAKE = $(DIST_MANS) Makefile.BSD-dist

EXTRA_DIST = $(DIST_OTHER) $(DIST_MAKE)

PATH_CONFIG = @path_config@

PATH_SYSLOGD_PIDFILE = @syslog_pidfile@

# Mention here files which are created using 'auto*' tools and which
# can be re-created by re-running them again.
#
# NOTE: these files were removed automatically by past automake's.
# 
GNU_AUTO_MADE_FILES = Makefile.in \
                        aclocal.m4 aclocal.m4~ \
                        configure \
                        config.h.in config.h.in~

# Mention here files which are created using '--add-missing', as well
# as files created during 'make dist' and which can be re-created.
# (We don't mention Makefile.BSD-dist because it should be a virgin
# copy, never locally edited)
#
MAINTAINERCLEANFILES = install-sh missing mkinstalldirs INSTALL \
                        $(GNU_AUTO_MADE_FILES) \
                        $(catman_MANS_dist) $(psman_MANS) $(htmlman_MANS)

# XXX automake isn't quite current with autoconf it seems....
# configure makes these so we need to clean them on 'distclean'
#
DISTCLEANFILES = configure.lineno
distclean-local:
        rm -rf autom4te.cache

CLEANFILES = $(catman_MANS) $(man_MANS) $(psman_MANS) $(htmlman_MANS)

##
##      local extensions to automake
##

NROFF = nroff
TROFF = groff
ROFFDEV = -Tps
PIC = pic
TBL = tbl
SOELIM = soelim

SUFFIXES = .5 .8 .5so .8so .cat5 .cat5-dist .cat8 .cat8-dist .5.html .8.html \
                .5.ps .8.ps .ps .ps-dist .html .html-dist .BSD .BSD-dist

.5so.5 .8so.8:
        @rm -f $@
        ($(SOELIM) -I $(srcdir) $< > $@) || (rm -f $@; exit 1)

.8.cat8 .5.cat5:
        @rm -f $@
        ($(TBL) $< | $(NROFF) -mandoc > $@) || (rm -f $@; exit 1)

.8.8.ps:
        @rm -f $@
        ($(TBL) $< | $(TROFF) -mdoc $(ROFFDEV) > $@) || (rm -f $@; exit 1)

.8.8.html:
        @rm -f $@
        ($(TBL) $< | $(NROFF) -mdoc2html > $@) || (rm -f $@; exit 1)

.5.5.ps:
        @rm -f $@
        ($(TBL) $< | $(TROFF) -mdoc $(ROFFDEV) > $@) || (rm -f $@; exit 1)

.5.5.html:
        @rm -f $@
        ($(TBL) $< | $(NROFF) -mdoc2html > $@) || (rm -f $@; exit 1)

.cat5.cat5-dist:
        @rm -f $@
        cp $? $@

.cat8.cat8-dist:
        @rm -f $@
        cp $? $@

.html.html-dist:
        @rm -f $@
        cp $? $@

.ps.ps-dist:
        @rm -f $@
        cp $? $@

.BSD.BSD-dist:
        @rm -f $@
        cp $? $@

#
# hard-coded dependencies and extensions
#

$(PROGRAMS): Makefile Makefile.BSD

$(man_MANS): config.status

man catman: $(catman_MANS)

all-local: catman psman htmlman

psman: $(psman_MANS)

htmlman: $(htmlman_MANS)

# install the cat-able manual pages too...
#
install-data-local: install-catman-local

# the unformatted manuals are installed by automake rules
#
install-catman-local:
        $(mkinstalldirs) $(catmandir)/cat5
        $(mkinstalldirs) $(catmandir)/cat8
        $(INSTALL_DATA) newsyslog.conf.cat5 $(catmandir)/cat5/newsyslog.conf.0
        $(INSTALL_DATA) newsyslog.cat8 $(catmandir)/cat8/newsyslog.0

# automake>=1.6 doesn't have separate uninstalls for "exec" and "data"
#
uninstall-local: uninstall-catman-local

uninstall-catman-local:
        rm -f $(catmandir)/cat5/newsyslog.conf.0
        rm -f $(catmandir)/cat8/newsyslog.0

# if you have no mandoc macros you might be able to use this rule, or
# something similar, to install the distributed versions of the
# cattable manual pages.  Make this before "make install"
#
copy-dist-mans:
        for distman in $(DIST_MANS) ; do                        \
                cp $$distman $$(basename $$distman -dist);      \
        done

# copy project page sub-files into place
#
# (expects to be run from within an un-packed distribution directory)
#
update-project-web-files: $(htmlman_MANS_dist)
        for htmlman in $(htmlman_MANS_dist) ; do                                
        \
                cp $$htmlman ~/public_html/projects/$$(basename $$htmlman 
-dist);       \
        done
        cp NEWS ~/public_html/projects/newsyslog.NEWS.txt

#
# miscellaneous dependencies follow....
#

newsyslog.conf.5: newsyslog.conf newsyslog.conf.5so

# (no .so's in here (at least not yet...))
newsyslog.8: newsyslog.8so

Makefile.BSD: Makefile.BSD.in config.status

newsyslog.o: config.h
version.o: config.h


-- 
                                                                Greg A. Woods

+1 416 218-0098;  <address@hidden>;  <address@hidden>;  <address@hidden>
Planix, Inc. <address@hidden>; VE3TCP; Secrets of the Weird <address@hidden>



reply via email to

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