m4-patches
[Top][All Lists]
Advanced

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

distributing and cleaning


From: Ralf Wildenhues
Subject: distributing and cleaning
Date: Fri, 16 Jun 2006 20:15:04 +0200
User-agent: Mutt/1.5.11+cvs20060403

Ignoring the test failures for a moment, I need something like this to
get distcheck to pass.

- stamp-vcl was leftover by distclean; I'm not sure if you want it
  distributed, but that is what CVS Libtool does; OTOH, it also always
  updates it in the source tree.

- a bogus entry 'm4' in DISTCLEANFILES.

- modules/perl.c is listed in POTFILES.  Either distribute it as well,
  or manually delist it.

- There is a buglet in CVS Automake: it does not realize that src may
  have a subdirectory for libtool objects.  I'll report this upstream,
  the patch below has a workaround.

- Since src/m4 explicitly links against m4/libm4.la, I'd add it to
  src_m4_DEPENDENCIES as well, even if the dependency is already
  implicit by the PREOPEN_DEPENDENCIES.  This is cleaner IMHO.

Cheers,
Ralf

        * Makefile.am (EXTRA_DIST): Add stamp-vcl and src/perl.c.
        (DISTCLEANFILES): Remove bogus entry `m4'.
        (clean-local): Split into and depend upon...
        (clean-local-tests, clean-local-src): ...these two.  The latter
        removes the libtool object directory below `src', to work around
        a buglet in Automake, failing to list it.

Index: Makefile.am
===================================================================
RCS file: /cvsroot/m4/m4/Makefile.am,v
retrieving revision 1.30
diff -u -r1.30 Makefile.am
--- Makefile.am 16 Jun 2006 03:51:28 -0000      1.30
+++ Makefile.am 16 Jun 2006 08:08:48 -0000
@@ -49,6 +49,7 @@
 # Make sure config.status is regenerated when the version timestamp changes
 MKSTAMP = $(SHELL) $(srcdir)/$(config_aux_dir)/mkstamp
 CONFIG_STATUS_DEPENDENCIES = stamp-vcl
+EXTRA_DIST += stamp-vcl
 stamp-vcl: vcl.tmp $(srcdir)/ChangeLog
 vcl.tmp:
        @dir=.; test -f $$dir/stamp-vcl || dir=$(srcdir); \
@@ -84,7 +85,12 @@
 src_m4_CPPFLAGS        = $(AM_CPPFLAGS) -Isrc -I$(srcdir)/src $(LTDLINCL)
 src_m4_LDFLAGS = $(AM_LDFLAGS) $(DLPREOPEN)
 src_m4_LDADD   = m4/libm4.la
-src_m4_DEPENDENCIES = $(PREOPEN_DEPENDENCIES)
+src_m4_DEPENDENCIES = $(PREOPEN_DEPENDENCIES) m4/libm4.la
+
+## Since we do not build a libtool library in src, Automake fails to infer
+## that there may be a libs directory there...
+clean-local-src:
+       -rm -rf src/.libs src/_libs
 
 ##                                                                      ##
 ##                 --- PASTED MANUALLY FROM GNULIB ---                  ##
@@ -161,6 +167,9 @@
 ## perlxsi.c:
 ##     $(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c
 
+## but we should still distribute it, because it is listed in POTFILES.in:
+EXTRA_DIST += modules/perl.c
+
 module_check   = -rpath /dev/null
 check_LTLIBRARIES = \
                  modules/import.la \
@@ -399,16 +409,19 @@
        $(TESTS_ENVIRONMENT) $(SHELL) $$abs_srcdir/$(TESTSUITE) 
$(TESTSUITE_FLAGS) AUTOTEST_PATH=$(exec_prefix)/bin
 
 # We need to remove any file droppings left behind by testsuite.
-clean-local:
+clean-local-tests:
        -$(CD_TESTDIR); \
        test -f $$abs_srcdir/$(TESTSUITE) && \
            $(SHELL) $$abs_srcdir/$(TESTSUITE) --clean
 
 OTHER_FILES    = tests/iso8859.m4 tests/stackovf.test
 
-DISTCLEANFILES += atconfig atlocal m4
+DISTCLEANFILES += atconfig atlocal
 MAINTAINERCLEANFILES += generated.at $(TESTSUITE)
 
+
+clean-local: clean-local-src clean-local-tests
+
 ##                                                                      ##
 ##                   --- RULES FOR THE MAINTAINER ---                   ##
 ##           You shouldn't need to touch anything below here.           ##




reply via email to

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