From 081d47f72bcb7c66d197d25d7090435350ffb5f4 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Mon, 18 Nov 2002 18:41:10 +0000 Subject: [PATCH] * lib/Automake/tests/Makefile.am, lib/Automake/tests/Conditional.pl, lib/Automake/tests/ConditionalSet.pl: New files. * lib/Automake/Makefile.am (SUBDIRS): New variable. * configure.in: Output lib/Automake/tests/Makefile. * lib/Automake/ConditionalSet.pm (by_conditions): Delete. (conds): Don't use by_conditions, sort alphabetically, and return sorted conds. (string): Call ->string on each Conditional. * tests/Makefile.am (TESTS): Remove cond12.test. * tests/cond12.test: Remove, moved to lib/Automake/tests/ConditionalSet.pl. * tests/cond3.test: Adjust conditional ordering. --- ChangeLog | 15 ++ Makefile.in | 1 + configure | 65 ++++++--- configure.in | 1 + lib/Automake/ConditionalSet.pm | 32 ++--- lib/Automake/Makefile.am | 2 + lib/Automake/Makefile.in | 203 +++++++++++++++++++++++---- lib/Automake/tests/Conditional.pl | 184 ++++++++++++++++++++++++ lib/Automake/tests/ConditionalSet.pl | 164 ++++++++++++++++++++++ lib/Automake/tests/Makefile.am | 25 ++++ lib/Makefile.in | 1 + lib/am/Makefile.in | 1 + m4/Makefile.in | 1 + stamp-vti | 2 +- tests/Makefile.am | 1 - tests/Makefile.in | 2 +- tests/cond12.test | 102 -------------- tests/cond3.test | 6 +- version.texi | 2 +- 19 files changed, 630 insertions(+), 180 deletions(-) create mode 100644 lib/Automake/tests/Conditional.pl create mode 100644 lib/Automake/tests/ConditionalSet.pl create mode 100644 lib/Automake/tests/Makefile.am delete mode 100755 tests/cond12.test diff --git a/ChangeLog b/ChangeLog index 27521ac0..e3455803 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2002-11-18 Alexandre Duret-Lutz + + * lib/Automake/tests/Makefile.am, lib/Automake/tests/Conditional.pl, + lib/Automake/tests/ConditionalSet.pl: New files. + * lib/Automake/Makefile.am (SUBDIRS): New variable. + * configure.in: Output lib/Automake/tests/Makefile. + * lib/Automake/ConditionalSet.pm (by_conditions): Delete. + (conds): Don't use by_conditions, sort alphabetically, and + return sorted conds. + (string): Call ->string on each Conditional. + * tests/Makefile.am (TESTS): Remove cond12.test. + * tests/cond12.test: Remove, moved to + lib/Automake/tests/ConditionalSet.pl. + * tests/cond3.test: Adjust conditional ordering. + 2002-11-15 Alexandre Duret-Lutz * lib/Automake/ConditionalSet.pm (_permutations_worker): Ignore TRUE diff --git a/Makefile.in b/Makefile.in index a6f3ace7..0037f9fc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -53,6 +53,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/configure b/configure index 08d6f152..16f52ccf 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.54c for GNU Automake 1.7a. +# Generated by GNU Autoconf 2.56 for GNU Automake 1.7a. # # Report bugs to . # @@ -38,7 +38,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var @@ -849,7 +852,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF GNU Automake configure 1.7a -generated by GNU Autoconf 2.54c +generated by GNU Autoconf 2.56 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. @@ -864,7 +867,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU Automake $as_me 1.7a, which was -generated by GNU Autoconf 2.54c. Invocation command line was +generated by GNU Autoconf 2.56. Invocation command line was $ $0 $@ @@ -916,6 +919,7 @@ _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= @@ -929,6 +933,9 @@ do do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac @@ -1413,15 +1420,15 @@ fi test -n "$AWK" && break done -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \${MAKE}" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6 +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: - @echo 'ac_maketemp="${MAKE}"' + @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` @@ -1767,7 +1774,7 @@ echo "${ECHO_T}$ac_cv_prog_fgrep" >&6 - ac_config_files="$ac_config_files Makefile lib/Automake/Makefile lib/Makefile lib/am/Makefile m4/Makefile m4/amversion.m4:m4/amversion.in tests/Makefile tests/defs" + ac_config_files="$ac_config_files Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile m4/amversion.m4:m4/amversion.in tests/Makefile tests/defs" cat >confcache <<\_ACEOF @@ -1906,6 +1913,8 @@ cat >$CONFIG_STATUS <<_ACEOF # configure, is in config.log if it exists. debug=false +ac_cs_recheck=false +ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF @@ -1940,7 +1949,10 @@ PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var @@ -2157,7 +2169,7 @@ _ASBOX cat >&5 <<_CSEOF This file was extended by GNU Automake $as_me 1.7a, which was -generated by GNU Autoconf 2.54c. Invocation command line was +generated by GNU Autoconf 2.56. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -2197,6 +2209,7 @@ Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit + -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] @@ -2211,7 +2224,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ GNU Automake config.status 1.7a -configured by $0, generated by GNU Autoconf 2.54c, +configured by $0, generated by GNU Autoconf 2.56, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 @@ -2248,12 +2261,9 @@ do case $ac_option in # Handling of the options. _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" - exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; -_ACEOF cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) @@ -2275,6 +2285,9 @@ Try \`$0 --help' for more information." >&2;} $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 @@ -2289,6 +2302,20 @@ Try \`$0 --help' for more information." >&2;} shift done +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + _ACEOF @@ -2302,6 +2329,7 @@ do # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "lib/Automake/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Automake/Makefile" ;; + "lib/Automake/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Automake/tests/Makefile" ;; "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "lib/am/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/am/Makefile" ;; "m4/Makefile" ) CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;; @@ -2642,8 +2670,11 @@ ac_clean_files=$ac_clean_files_save # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null - $SHELL $CONFIG_STATUS || ac_cs_success=false + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. diff --git a/configure.in b/configure.in index 81750c93..f6a7dd10 100644 --- a/configure.in +++ b/configure.in @@ -89,6 +89,7 @@ AC_PROG_FGREP AC_CONFIG_FILES([ Makefile lib/Automake/Makefile + lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile diff --git a/lib/Automake/ConditionalSet.pm b/lib/Automake/ConditionalSet.pm index 1a630c78..024bfdca 100644 --- a/lib/Automake/ConditionalSet.pm +++ b/lib/Automake/ConditionalSet.pm @@ -143,24 +143,7 @@ sub new ($;@) return $self; } -# Compare condition names. -# Issue them in alphabetical order, foo_TRUE before foo_FALSE. -sub by_condition -{ - # Be careful we might be comparing `' or `#'. - $a->string =~ /^(.*)_(TRUE|FALSE)$/; - my ($aname, $abool) = ($1 || '', $2 || ''); - $b->string =~ /^(.*)_(TRUE|FALSE)$/; - my ($bname, $bbool) = ($1 || '', $2 || ''); - return ($aname cmp $bname - # Don't bother with IFs, given that TRUE is after FALSE - # just cmp in the reverse order. - || $bbool cmp $abool - # Just in case... - || $a cmp $b); -} - -=item C<@conds = $set-$conds> +=item C<@conds = $set-Econds> Return the list of C objects involved in C<$set>. @@ -171,11 +154,12 @@ sub conds ($ ) my ($self) = @_; return @{$self->{'conds'}} if exists $self->{'conds'}; my @conds = map { $self->{'hash'}{$_} } (keys %{$self->{'hash'}}); - $self->{'conds'} = [sort by_condition @conds]; + @conds = sort { $a->string cmp $b->string } @conds; + $self->{'conds'} = [@conds]; return @conds; } -=item C<$cond = $set-$one_cond> +=item C<$cond = $set-Eone_cond> Return one C object involved in C<$set>. @@ -187,7 +171,7 @@ sub one_cond ($) return (%{$self->{'hash'}},)[1]; } -=item C<$et = $set-$false> +=item C<$et = $set-Efalse> Return 1 iff the C object is always false (i.e., if it is empty, or if it contains only false Cs). Return 0 @@ -201,7 +185,7 @@ sub false ($ ) return 0 == keys %{$self->{'hash'}}; } -=item C<$et = $set-$true> +=item C<$et = $set-Etrue> Return 1 iff the C object is always true (i.e. covers all conditions). Return 0 otherwise. @@ -233,7 +217,7 @@ sub string ($ ) } else { - $res = join (',', $self->conds); + $res = join (' | ', map { $_->string } $self->conds); } $self->{'string'} = $res; @@ -279,7 +263,7 @@ For instance consider this initial C. (new Automake::Conditional ("COND1_TRUE", "COND2_TRUE"), new Automake::Conditional ("COND3_FALSE", "COND2_TRUE")); -Calling $<$set-Epermutations> will return the following Conditional set. +Calling C<$set-Epermutations> will return the following Conditional set. new Automake::ConditionalSet (new Automake::Conditional ("COND1_TRUE", "COND2_TRUE", "COND3_TRUE"), diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am index c196a132..88f1a949 100644 --- a/lib/Automake/Makefile.am +++ b/lib/Automake/Makefile.am @@ -1,5 +1,7 @@ ## Process this file with automake to create Makefile.in +SUBDIRS = tests + perllibdir = $(pkgvdatadir)/Automake dist_perllib_DATA = \ Channels.pm \ diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in index 5e987469..1015e774 100644 --- a/lib/Automake/Makefile.in +++ b/lib/Automake/Makefile.in @@ -53,6 +53,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ @@ -92,6 +93,8 @@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ +SUBDIRS = tests + perllibdir = $(pkgvdatadir)/Automake dist_perllib_DATA = \ Channels.pm \ @@ -108,8 +111,15 @@ CONFIG_CLEAN_FILES = DIST_SOURCES = DATA = $(dist_perllib_DATA) + +RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ + ps-recursive install-info-recursive uninstall-info-recursive \ + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive \ + check-recursive installcheck-recursive DIST_COMMON = $(dist_perllib_DATA) Makefile.am Makefile.in -all: all-am +DIST_SUBDIRS = tests +all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) @@ -136,12 +146,124 @@ uninstall-dist_perllibDATA: echo " rm -f $(DESTDIR)$(perllibdir)/$$f"; \ rm -f $(DESTDIR)$(perllibdir)/$$f; \ done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + tags: TAGS -TAGS: -ctags: CTAGS -CTAGS: +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = ../.. @@ -174,22 +296,35 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" \ + distdir=../$(distdir)/$$subdir \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(DATA) - -installdirs: +installdirs: installdirs-recursive +installdirs-am: $(mkinstalldirs) $(DESTDIR)$(perllibdir) -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ @@ -205,19 +340,19 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -distclean-am: clean-am distclean-generic +distclean-am: clean-am distclean-generic distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -info: info-am +info: info-recursive info-am: @@ -225,39 +360,47 @@ install-data-am: install-dist_perllibDATA install-exec-am: -install-info: install-info-am +install-info: install-info-recursive install-man: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-dist_perllibDATA uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am \ +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ + clean-generic clean-recursive ctags ctags-recursive distclean \ + distclean-generic distclean-recursive distclean-tags distdir \ + dvi dvi-am dvi-recursive info info-am info-recursive install \ + install-am install-data install-data-am install-data-recursive \ install-dist_perllibDATA install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am uninstall uninstall-am \ - uninstall-dist_perllibDATA uninstall-info-am + install-exec-recursive install-info install-info-am \ + install-info-recursive install-man install-recursive \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am installdirs-recursive maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive mostlyclean \ + mostlyclean-generic mostlyclean-recursive pdf pdf-am \ + pdf-recursive ps ps-am ps-recursive tags tags-recursive \ + uninstall uninstall-am uninstall-dist_perllibDATA \ + uninstall-info-am uninstall-info-recursive uninstall-recursive # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/lib/Automake/tests/Conditional.pl b/lib/Automake/tests/Conditional.pl new file mode 100644 index 00000000..b969e647 --- /dev/null +++ b/lib/Automake/tests/Conditional.pl @@ -0,0 +1,184 @@ +# Copyright (C) 2001, 2002 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with autoconf; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +use Automake::Conditional qw/TRUE FALSE/; + +sub test_basics () +{ + my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string] + [[], 1, 0, 'TRUE', ''], + [['TRUE'], 1, 0, 'TRUE', ''], + [['FALSE'], 0, 1, 'FALSE', '#'], + [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@'], + [['A_TRUE', 'B_FALSE'], + 0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@'], + [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#'], + [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#']); + + for (@tests) + { + my $a = new Automake::Conditional @{$_->[0]}; + return 1 if $_->[1] != $a->true; + return 1 if $_->[1] != ($a == TRUE); + return 1 if $_->[2] != $a->false; + return 1 if $_->[2] != ($a == FALSE); + return 1 if $_->[3] ne $a->string; + return 1 if $_->[4] ne $a->subst_string; + } + return 0; +} + +sub test_true_when () +{ + my $failed = 0; + + my @tests = (# [When, + # [Implied-Conditionals], + # [Not-Implied-Conditionals]] + [['TRUE'], + [['TRUE']], + [['A_TRUE'], ['A_TRUE', 'B_FALSE'], ['FALSE']]], + [['A_TRUE'], + [['TRUE'], ['A_TRUE']], + [['A_TRUE', 'B_FALSE'], ['FALSE']]], + [['A_TRUE', 'B_FALSE'], + [['TRUE'], ['A_TRUE'], ['B_FALSE'], ['A_TRUE', 'B_FALSE']], + [['FALSE'], ['C_FALSE'], ['C_FALSE', 'A_TRUE']]]); + + for my $t (@tests) + { + my $a = new Automake::Conditional @{$t->[0]}; + for my $u (@{$t->[1]}) + { + my $b = new Automake::Conditional @$u; + if (! $b->true_when ($a)) + { + print "`" . $b->string . + "' not implied by `" . $a->string . "'?\n"; + $failed = 1; + } + } + for my $u (@{$t->[2]}) + { + my $b = new Automake::Conditional @$u; + if ($b->true_when ($a)) + { + print "`" . $b->string . + "' implied by `" . $a->string . "'?\n"; + $failed = 1; + } + + return 1 if $b->true_when ($a); + } + } + return $failed; +} + +sub test_reduce () +{ + my @tests = (# If no conditions are given, TRUE should be returned + [[""], ["TRUE"]], + # A single condition should be passed through unchanged + [["FOO"], ["FOO"]], + [["FALSE"], ["FALSE"]], + [["TRUE"], ["TRUE"]], + # TRUE and false should be discarded and overwhelm + # the result, respectively + [["FOO", "TRUE"], ["FOO"]], + [["FOO", "FALSE"], ["FALSE"]], + # Repetitions should be removed + [["FOO", "FOO"], ["FOO"]], + [["TRUE", "FOO", "FOO"], ["FOO"]], + [["FOO", "TRUE", "FOO"], ["FOO"]], + [["FOO", "FOO", "TRUE"], ["FOO"]], + # Two different conditions should be preserved, + # but TRUEs should be removed + [["FOO", "BAR"], ["BAR,FOO"]], + [["TRUE", "FOO", "BAR"], ["BAR,FOO"]], + [["FOO", "TRUE", "BAR"], ["BAR,FOO"]], + [["FOO", "BAR", "TRUE"], ["BAR,FOO"]], + # A condition implied by another condition should be removed. + [["FOO BAR", "BAR"], ["FOO BAR"]], + [["BAR", "FOO BAR"], ["FOO BAR"]], + [["TRUE", "FOO BAR", "BAR"], ["FOO BAR"]], + [["FOO BAR", "TRUE", "BAR"], ["FOO BAR"]], + [["FOO BAR", "BAR", "TRUE"], ["FOO BAR"]], + + [["BAR FOO", "BAR"], ["BAR FOO"]], + [["BAR", "BAR FOO"], ["BAR FOO"]], + [["TRUE", "BAR FOO", "BAR"], ["BAR FOO"]], + [["BAR FOO", "TRUE", "BAR"], ["BAR FOO"]], + [["BAR FOO", "BAR", "TRUE"], ["BAR FOO"]], + + # Check that reduction happens even when there are + # two conditionals to remove. + [["FOO", "FOO BAR", "BAR"], ["FOO BAR"]], + [["FOO", "FOO BAR", "BAZ", "FOO BAZ"], ["FOO BAR", "FOO BAZ"]], + [["FOO", "FOO BAR", "BAZ", "FOO BAZ", "FOO BAZ BAR"], + ["FOO BAZ BAR"]], + + # Duplicated condionals should be removed + [["FOO", "BAR", "BAR"], ["BAR,FOO"]], + + # Equivalent conditionals in different forms should be + # reduced: which one is left is unfortunately order + # dependent. + [["BAR FOO", "FOO BAR"], ["FOO BAR"]], + [["FOO BAR", "BAR FOO"], ["BAR FOO"]]); + + my $failed = 0; + foreach (@tests) + { + my ($inref, $outref) = @$_; + my @inconds = map { new Automake::Conditional $_ } @$inref; + my @outconds = map { (new Automake::Conditional $_)->string } @$outref; + my @res = + map { $_->string } (Automake::Conditional::reduce (@inconds)); + my $result = join (",", sort @res); + my $exresult = join (",", @outconds); + + if ($result ne $exresult) + { + print '"'.join(",", @$inref) . '" => "' . + $result . '" expected "' . + $exresult . '"' . "\n"; + $failed = 1; + } + } + return $failed; +} + +exit (test_basics || test_true_when || test_reduce); + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/lib/Automake/tests/ConditionalSet.pl b/lib/Automake/tests/ConditionalSet.pl new file mode 100644 index 00000000..cf9b94ee --- /dev/null +++ b/lib/Automake/tests/ConditionalSet.pl @@ -0,0 +1,164 @@ +# Copyright (C) 2001, 2002 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with autoconf; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +use Automake::Conditional qw/TRUE FALSE/; +use Automake::ConditionalSet; + +sub test_basics () +{ + my $cond = new Automake::Conditional "COND1_TRUE", "COND2_FALSE"; + my $other = new Automake::Conditional "COND3_FALSE"; + my $set1 = new Automake::ConditionalSet $cond, $other; + my $set2 = new Automake::ConditionalSet $other, $cond; + return 1 unless $set1 == $set2; + return 1 if $set1->false; + return 1 if $set1->true; + return 1 unless (new Automake::ConditionalSet)->false; + return 1 if (new Automake::ConditionalSet)->true; +} + +sub build_set (@) +{ + my @conds = @_; + my @set = (); + for my $cond (@conds) + { + push @set, new Automake::Conditional @$cond; + } + return new Automake::ConditionalSet @set; +} + +sub test_permutations () +{ + my @tests = ([[["FALSE"]], + [["TRUE"]]], + + [[["TRUE"]], + [["TRUE"]]], + + [[["COND1_TRUE", "COND2_TRUE"], + ["COND3_FALSE", "COND2_TRUE"]], + [["COND1_FALSE","COND2_FALSE","COND3_FALSE"], + ["COND1_TRUE", "COND2_FALSE","COND3_FALSE"], + ["COND1_FALSE","COND2_TRUE", "COND3_FALSE"], + ["COND1_TRUE", "COND2_TRUE", "COND3_FALSE"], + ["COND1_FALSE","COND2_FALSE","COND3_TRUE"], + ["COND1_TRUE", "COND2_FALSE","COND3_TRUE"], + ["COND1_FALSE","COND2_TRUE", "COND3_TRUE"], + ["COND1_TRUE", "COND2_TRUE", "COND3_TRUE"]]], + + [[["COND1_TRUE", "COND2_TRUE"], + ["TRUE"]], + [["COND1_TRUE", "COND2_TRUE"], + ["COND1_FALSE", "COND2_TRUE"], + ["COND1_FALSE", "COND2_FALSE"], + ["COND1_TRUE", "COND2_FALSE"]]], + + [[["COND1_TRUE", "COND2_TRUE"], + ["FALSE"]], + [["COND1_TRUE", "COND2_TRUE"], + ["COND1_FALSE", "COND2_TRUE"], + ["COND1_FALSE", "COND2_FALSE"], + ["COND1_TRUE", "COND2_FALSE"]]], + + [[["COND1_TRUE"], + ["COND2_FALSE"]], + [["COND1_TRUE", "COND2_TRUE"], + ["COND1_FALSE", "COND2_TRUE"], + ["COND1_FALSE", "COND2_FALSE"], + ["COND1_TRUE", "COND2_FALSE"]]] + ); + + for my $t (@tests) + { + my $set = build_set @{$t->[0]}; + my $res = build_set @{$t->[1]}; + my $per = $set->permutations; + if ($per != $res) + { + print $per->string . ' != ' . $res->string . "\n"; + return 1; + } + } + return 0; +} + +sub test_invert () +{ + my @tests = ([[["FALSE"]], + [["TRUE"]]], + + [[["TRUE"]], + [["FALSE"]]], + + [[["COND1_TRUE", "COND2_TRUE"], + ["COND3_FALSE", "COND2_TRUE"]], + [["COND1_FALSE","COND2_FALSE","COND3_FALSE"], + ["COND1_TRUE", "COND2_FALSE","COND3_FALSE"], + ["COND1_FALSE","COND2_FALSE","COND3_TRUE"], + ["COND1_TRUE", "COND2_FALSE","COND3_TRUE"], + ["COND1_FALSE","COND2_TRUE", "COND3_TRUE"]]], + + [[["COND1_TRUE", "COND2_TRUE"], + ["TRUE"]], + [["FALSE"]]], + + [[["COND1_TRUE", "COND2_TRUE"], + ["FALSE"]], + [["COND1_FALSE", "COND2_TRUE"], + ["COND1_FALSE", "COND2_FALSE"], + ["COND1_TRUE", "COND2_FALSE"]]], + + [[["COND1_TRUE"], + ["COND2_FALSE"]], + [["COND1_FALSE", "COND2_TRUE"]]] + ); + + for my $t (@tests) + { + my $set = build_set @{$t->[0]}; + my $res = build_set @{$t->[1]}; + my $inv = $set->invert; + if ($inv != $res) + { + print $inv->string . ' != ' . $res->string . "\n"; + return 1; + } + } + return 0; +} + +exit (test_basics || test_permutations || test_invert); + +### Setup "GNU" style for perl-mode and cperl-mode. +## Local Variables: +## perl-indent-level: 2 +## perl-continued-statement-offset: 2 +## perl-continued-brace-offset: 0 +## perl-brace-offset: 0 +## perl-brace-imaginary-offset: 0 +## perl-label-offset: -2 +## cperl-indent-level: 2 +## cperl-brace-offset: 0 +## cperl-continued-brace-offset: 0 +## cperl-label-offset: -2 +## cperl-extra-newline-before-brace: t +## cperl-merge-trailing-else: nil +## cperl-continued-statement-offset: 2 +## End: diff --git a/lib/Automake/tests/Makefile.am b/lib/Automake/tests/Makefile.am new file mode 100644 index 00000000..ad1a19d3 --- /dev/null +++ b/lib/Automake/tests/Makefile.am @@ -0,0 +1,25 @@ +## Process this file with automake to create Makefile.in + +## Copyright (C) 2002 Free Software Foundation, Inc. + +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2, or (at your option) +## any later version. + +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +## 02111-1307, USA. + +TESTS_ENVIRONMENT = $(PERL) -Mstrict -I $(top_srcdir)/lib -w +TESTS = \ +Conditional.pl \ +ConditionalSet.pl + +EXTRA_DIST = $(TESTS) diff --git a/lib/Makefile.in b/lib/Makefile.in index d48cf093..e1af0e6e 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -53,6 +53,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in index e896f31b..32c68cb0 100644 --- a/lib/am/Makefile.in +++ b/lib/am/Makefile.in @@ -53,6 +53,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/m4/Makefile.in b/m4/Makefile.in index 761eb427..77bb953a 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -53,6 +53,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ diff --git a/stamp-vti b/stamp-vti index a777d3cb..b70ced41 100644 --- a/stamp-vti +++ b/stamp-vti @@ -1,4 +1,4 @@ -@set UPDATED 13 November 2002 +@set UPDATED 17 November 2002 @set UPDATED-MONTH November 2002 @set EDITION 1.7a @set VERSION 1.7a diff --git a/tests/Makefile.am b/tests/Makefile.am index d0687985..df72b9bf 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -79,7 +79,6 @@ cond8.test \ cond9.test \ cond10.test \ cond11.test \ -cond12.test \ cond13.test \ cond14.test \ cond15.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index d30166f8..54c1eab0 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -53,6 +53,7 @@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LN = @LN@ LTLIBOBJS = @LTLIBOBJS@ @@ -171,7 +172,6 @@ cond8.test \ cond9.test \ cond10.test \ cond11.test \ -cond12.test \ cond13.test \ cond14.test \ cond15.test \ diff --git a/tests/cond12.test b/tests/cond12.test deleted file mode 100755 index a5170270..00000000 --- a/tests/cond12.test +++ /dev/null @@ -1,102 +0,0 @@ -#! /bin/sh -# Copyright (C) 2001, 2002 Free Software Foundation, Inc. -# -# This file is part of GNU Automake. -# -# GNU Automake is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# GNU Automake is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with autoconf; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -# This checks the result of Automake::Conditional::reduce() for -# a wide variety of cases. - -. ./defs || exit 1 - -set -e - -cat << 'END' > run -use Automake::Conditional; - -my $failed = 0; -sub check_reduce($$) { - my ($inref, $outref) = @_; - my @inconds = map { new Automake::Conditional $_ } @$inref; - my @outconds = map { (new Automake::Conditional $_)->string } @$outref; - my @res = - map { $_->string } (Automake::Conditional::reduce (@inconds)); - my $result = join (",", sort @res); - my $exresult = join (",", @outconds); - - if ($result ne $exresult) - { - print '"'.join(",", @$inref) . '" => "' . - $result . '" expected "' . - $exresult . '"' . "\n"; - $failed = 1; - } -} - -# If no conditions are given, TRUE should be returned -check_reduce([""], ["TRUE"]); -# A single condition should be passed through unchanged -check_reduce(["FOO"], ["FOO"]); -check_reduce(["FALSE"], ["FALSE"]); -check_reduce(["TRUE"], ["TRUE"]); - -# TRUE and false should be discarded and overwhelm the result, respectively -check_reduce(["FOO", "TRUE"], ["FOO"]); -check_reduce(["FOO", "FALSE"], ["FALSE"]); - -# Repetitions should be removed -check_reduce(["FOO", "FOO"], ["FOO"]); -check_reduce(["TRUE", "FOO", "FOO"], ["FOO"]); -check_reduce(["FOO", "TRUE", "FOO"], ["FOO"]); -check_reduce(["FOO", "FOO", "TRUE"], ["FOO"]); - -# Two different conditions should be preserved, but TRUEs should be removed -check_reduce(["FOO", "BAR"], ["BAR,FOO"]); -check_reduce(["TRUE", "FOO", "BAR"], ["BAR,FOO"]); -check_reduce(["FOO", "TRUE", "BAR"], ["BAR,FOO"]); -check_reduce(["FOO", "BAR", "TRUE"], ["BAR,FOO"]); - -# A condition implied by another condition should be removed. -check_reduce(["FOO BAR", "BAR"], ["FOO BAR"]); -check_reduce(["BAR", "FOO BAR"], ["FOO BAR"]); -check_reduce(["TRUE", "FOO BAR", "BAR"], ["FOO BAR"]); -check_reduce(["FOO BAR", "TRUE", "BAR"], ["FOO BAR"]); -check_reduce(["FOO BAR", "BAR", "TRUE"], ["FOO BAR"]); - -check_reduce(["BAR FOO", "BAR"], ["BAR FOO"]); -check_reduce(["BAR", "BAR FOO"], ["BAR FOO"]); -check_reduce(["TRUE", "BAR FOO", "BAR"], ["BAR FOO"]); -check_reduce(["BAR FOO", "TRUE", "BAR"], ["BAR FOO"]); -check_reduce(["BAR FOO", "BAR", "TRUE"], ["BAR FOO"]); - -# Check that reduction happens even when there are two conditionals to remove. -check_reduce(["FOO", "FOO BAR", "BAR"], ["FOO BAR"]); -check_reduce(["FOO", "FOO BAR", "BAZ", "FOO BAZ"], ["FOO BAR", "FOO BAZ"]); -check_reduce(["FOO", "FOO BAR", "BAZ", "FOO BAZ", "FOO BAZ BAR"], ["FOO BAZ BAR"]); - -# Duplicated condionals should be removed -check_reduce(["FOO", "BAR", "BAR"], ["BAR,FOO"]); - -# Equivalent conditionals in different forms should be reduced: which one is -# left is unfortunately order dependent. -check_reduce(["BAR FOO", "FOO BAR"], ["FOO BAR"]); -check_reduce(["FOO BAR", "BAR FOO"], ["BAR FOO"]); - -exit $failed; -END -chmod +x run -$PERL -w -I $perllibdir ./run diff --git a/tests/cond3.test b/tests/cond3.test index fed0d0dc..aabbc3e2 100755 --- a/tests/cond3.test +++ b/tests/cond3.test @@ -73,12 +73,12 @@ sed -n ' }' Makefile.in >produced cat >expected << 'EOF' -@ONE_TRUE@am__objects_1 = one.$(OBJEXT) @ONE_FALSE@am__objects_1 = -@TWO_TRUE@am__objects_2 = two.$(OBJEXT) +@ONE_TRUE@am__objects_1 = one.$(OBJEXT) @TWO_FALSE@am__objects_2 = -@THREE_TRUE@am__objects_3 = three.$(OBJEXT) +@TWO_TRUE@am__objects_2 = two.$(OBJEXT) @THREE_FALSE@am__objects_3 = +@THREE_TRUE@am__objects_3 = three.$(OBJEXT) am_targ_OBJECTS = $(am__objects_1) $(am__objects_2) $(am__objects_3) targ_OBJECTS = $(am_targ_OBJECTS) EOF diff --git a/version.texi b/version.texi index a777d3cb..b70ced41 100644 --- a/version.texi +++ b/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 13 November 2002 +@set UPDATED 17 November 2002 @set UPDATED-MONTH November 2002 @set EDITION 1.7a @set VERSION 1.7a -- 2.43.5