Changeset 2438


Ignore:
Timestamp:
Mar 13, 2011, 12:45:59 AM (11 years ago)
Author:
Peter
Message:

Move yathello test from maintainer-check to installcheck, which means
it is run also during distcheck. The check is split into two parts: 1)
Generate a tarball and as this step requires autotools it is typically
only done by the maintainer (or developers) and included in the
distribution. 2) At intallcheck time the tarball is extracted and the
yat-hello package is built using the installed yat. The name of this
toy package has changed from yathello to yat-hello to avoid file name
conflicts.

Location:
trunk
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r2431 r2438  
    268268
    269269
    270 AC_CONFIG_FILES([test/create_yathello.sh], [chmod +x test/create_yathello.sh])
    271270AC_CONFIG_FILES([build_support/gen_yat_pc.sh],
    272271                [chmod +x build_support/gen_yat_pc.sh])
  • trunk/test/Makefile.am

    r2421 r2438  
    4040
    4141FORCE:
    42 
    43 yathello: create_yathello.sh $(top_srcdir)/m4/yat.m4
    44   ./create_yathello.sh
    45 
    46 # testing autoconf macro YAT_CHECK_YAT on an installed yat (the bindir
    47 # argument requires some care).
    48 yat_check_yat_test: yathello FORCE
    49   cd yathello && autoreconf -sivf && \
    50   ./configure --with-yat=$(bindir) && $(MAKE) check
    5142
    5243EXTRA_PROGRAMS = alignment.test averager.test \
     
    127118## care of whether doxygen will run or not.
    128119documentation_test.log: FORCE
     120
     121
     122# yat-hello is an example of a tiny package that uses yat
     123noinst_DATA = $(srcdir)/yat-hello-1.0.tar.gz
     124
     125# Directory yat-hello contains what a developer would check out
     126# from a VCS, i.e., no files generated by autotools.
     127yat_hello_sources  =
     128yat_hello_sources += yat-hello/configure.ac
     129yat_hello_sources += yat-hello/Makefile.am
     130yat_hello_sources += yat-hello/hello.cc
     131
     132EXTRA_DIST += $(yat_hello_sources)
     133
     134yat_hello_tmp_files =
     135yat_hello_tmp_files += Makefile.in
     136yat_hello_tmp_files += autom4te.cache
     137yat_hello_tmp_files += aclocal.m4
     138yat_hello_tmp_files += config.guess
     139yat_hello_tmp_files += config.sub
     140yat_hello_tmp_files += configure
     141yat_hello_tmp_files += depcomp
     142yat_hello_tmp_files += install-sh
     143yat_hello_tmp_files += ltmain.sh
     144yat_hello_tmp_files += m4
     145yat_hello_tmp_files += missing
     146
     147
     148
     149yat_hello_deps = $(yat_hello_sources)
     150yat_hello_deps += $(top_srcdir)/m4/yat.m4
     151## We depend on version.m4 so tarball is updated at every release (at least)
     152yat_hello_deps += $(top_srcdir)/m4/version.m4
     153
     154$(srcdir)/yat-hello-1.0.tar.gz: $(yat_hello_deps)
     155  cd $(srcdir)/yat-hello \
     156  && $(MKDIR_P) m4 \
     157  && $(ACLOCAL) -I m4 --install -I $(abs_top_srcdir)/m4 \
     158  && autoreconf -ivf \
     159  && ./configure --without-yat \
     160  && $(MAKE) $(AM_MAKEFLAGS) dist \
     161  && $(MAKE) $(AM_MAKEFLAGS) distclean \
     162  && mv yat-hello-1.0.tar.gz .. \
     163  && rm -rf $(yat_hello_tmp_files)
     164
     165installcheck-local: yat-hello-check
     166
     167yat-hello-check: $(srcdir)/yat-hello-1.0.tar.gz
     168  GZIP=$(GZIP_ENV) gzip -dc $< | $(am__untar) \
     169  && cd yat-hello-1.0 \
     170  && ./configure --with-yat=$(bindir) \
     171  && $(MAKE) $(AM_MAKEFLAGS) all \
     172  && ./hello \
     173  && cd .. \
     174  && rm -rf yat-hello-1.0
Note: See TracChangeset for help on using the changeset viewer.