[Top][All Lists]

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

automake training tutorial: distcheck, separate build directory and gene

From: Michel Briand
Subject: automake training tutorial: distcheck, separate build directory and generated files
Date: Tue, 14 Oct 2008 12:44:09 +0200

Hi all,

(I've put the tutorial on a small website. So that I can release
easily. : you'll find
two files, one for a minimal release, another for a normal release).

I've looked at 'make dist' to release the package. So after some
readings I tried 'make distcheck'.

-- 1/

I discovered that, if we build the source in a separate directory, we
need to fix some minor things:

in I used to write:

training_LDADD = ../lib/

Now, thanks to the tries with 'make distcheck', I must be more strict:



bin_PROGRAMS = training
training_SOURCES = training.c internal_version.c

Is there a better way to do that, a libtool trick that I missed for
example ?

-- 2/

I want to create a minimal tar, so I can restart from scratch to test
all autotools stuff... With

I'm using Subversion. And my top source directory is named
'autotraining'. So I need to do some trick to release a minimal tar:

dist-minimal: clean distclean
        if test -f autotraining-$(PACKAGE_VERSION).tar.gz; then \
                rm -f autotraining-$(PACKAGE_VERSION).tar.gz; fi
        find . -type f -name "*~" -exec rm {} \;
        -rm -rf aclocal.m4 autom4te.cache config configure $$(find 
. -type f -name
        -rm -f src/bin/internal_version.c src/lib/internal_version.c
        cd .. && \
                if test -h autotraining-$(PACKAGE_VERSION); then \
                        rm -f autotraining-$(PACKAGE_VERSION); fi && \
                ln -s autotraining autotraining-$(PACKAGE_VERSION) && \
                tar cfz autotraining-minimal-$(PACKAGE_VERSION).tar.gz \
                        autotraining-$(PACKAGE_VERSION)/* --exclude '.svn'

Is it correct ?

-- 3/

I generate some files during build: src/lib/internal_version.c and

I want to remove them. So I added those files to the CLEANFILES

Is this correct ?


reply via email to

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