X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=config%2Fautomake%2Fscripts.am;h=cb6d705b1df8cb11c1e72bcf137aaec478ad0c29;hb=ab88985dfde989b20f63569306ae17dee41d8fcf;hp=129df49e63ae81313c23f4f3e2ea9756f8aeff27;hpb=6ba576375c19b829b2a13dbe6562eedd2716b9ea;p=debian%2Famanda diff --git a/config/automake/scripts.am b/config/automake/scripts.am index 129df49..cb6d705 100644 --- a/config/automake/scripts.am +++ b/config/automake/scripts.am @@ -1,5 +1,5 @@ # vim:ft=automake -# Copyright (c) 2005 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 2005-2008 Zmanda Inc. All Rights Reserved. # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License version 2.1 as @@ -14,8 +14,8 @@ # along with this library; if not, write to the Free Software Foundation, # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. # -# Contact information: Zmanda Inc., 505 N Mathlida Ave, Suite 120 -# Sunnyvale, CA 94085, USA, or: http://www.zmanda.com +# Contact information: Zmanda Inc., 465 S Mathlida Ave, Suite 300 +# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com # SYNOPSIS: # @@ -26,7 +26,11 @@ # Files which support it are syntax-checked when the user invokes 'make check'. # # All *target* filenames must be listed in SCRIPTS_SHELL, SCRIPTS_PERL, and -# SCRIPTS_AWK to support 'make check', 'make dist', and 'make distclean'. +# SCRIPTS_AWK to support 'make check', 'make dist', and 'make distclean'. No +# files which are not substituted by config.status should be included in +# SCRIPTS_PERL, SCRIPTS_SHELL, or SCRIPTS_AWK. If non-generated files are listed +# for installation, then Automake will figure out that they should be distributed; +# otherwise, include them in EXTRA_DIST. # # USAGE: # @@ -36,12 +40,15 @@ # SCRIPTS_PERL = fooscript barscript perl-lib.pl perlmod.pm # SCRIPTS_SHELL = shell1 shell2 sh-lib.sh # SCRIPTS_AWK = talk balk chalk awk-lib.awk +# sbin_SCRIPTS = not-subbed +# EXTRA_DIST = util-script.pl # # with the corresponding files in the repository: # # fooscript.pl barscript.pl perl-lib.pl.in perlmod.pm.in # shell1.sh shell2.sh sh-lib.sh.in # talk.awk balk.awk chalk.awk awk-lib.awk.in +# not-subbed util-script.pl # # by default, all shell and perl scripts are syntax checked. If this is # a problem (for example, perl scripts depending on Amanda extension @@ -62,6 +69,11 @@ %: %.pl $(top_builddir)/config.status $(top_builddir)/config.status --file=$@:$< chmod a+x $@ + @if test -f $(top_builddir)/perl/.libs/libCmdline.so -o -f $(top_builddir)/perl/libCmdline.so; then \ + grep -v '^use lib' $@ > $@.nouselib; \ + $(PERL) $(CHECK_PERL_FLAGS) -I$(top_builddir)/perl -I$(top_builddir)/perl/.libs -I$(top_srcdir)/perl -c -w -T $@.nouselib || exit 1; \ + rm $@.nouselib; \ + fi %.pl: %.pl.in $(top_builddir)/config.status $(top_builddir)/config.status --file=$@:$< @@ -89,17 +101,31 @@ CLEANFILES += config.log # and we'll need to clean up our generated files for distclean -DISTCLEANFILES += $(SCRIPTS_SHELL) $(SCRIPTS_PERL) $(SCRIPTS_AWK) +DISTCLEANFILES += $(SCRIPTS_SHELL) $(SCRIPTS_PERL) $(SCRIPTS_AWK) $(SCRIPTS_INCLUDE) # syntax-check perl scripts on 'make check' check-perl: $(CHECK_PERL) + @CHECK_PERL="$(CHECK_PERL)"; \ + if test -f $(top_builddir)/perl/.libs/libCmdline.so -o -f $(top_builddir)/perl/libCmdline.so; then \ + if test -n "$(PERL)"; then \ + for perlobj in $$CHECK_PERL; do \ + grep -v '^use lib' $$perlobj > $$perlobj.nouselib; \ + $(PERL) $(CHECK_PERL_FLAGS) -I$(top_builddir)/perl -I$(top_builddir)/perl/.libs -I$(top_srcdir)/perl -c -w -T $$perlobj.nouselib || exit 1; \ + rm $$perlobj.nouselib; \ + done; \ + fi \ + fi +check-local: check-perl + +# syntax-check perl scripts on 'make installcheck' +installcheck-perl: $(CHECK_PERL) @CHECK_PERL="$(CHECK_PERL)"; \ if test -n "$(PERL)"; then \ for perlobj in $$CHECK_PERL; do \ $(PERL) $(CHECK_PERL_FLAGS) -c -w -T $$perlobj || exit 1; \ done; \ fi -check-local: check-perl +installcheck-local: installcheck-perl # syntax-check shell scripts on 'make check' CHECK_SHELL = $(SCRIPTS_SHELL)