X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=config%2Fautomake%2Fscripts.am;h=7d38cf3ea5b5f6eefc73af78e30101ed9bb8edf6;hb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;hp=64edbc67fab90328d1375be5fd7a22f2806754d4;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/config/automake/scripts.am b/config/automake/scripts.am index 64edbc6..7d38cf3 100644 --- a/config/automake/scripts.am +++ b/config/automake/scripts.am @@ -73,11 +73,13 @@ %: %.pl $(top_builddir)/config.status $(top_builddir)/config.status --file=$@:$< chmod a+x $@ -if CHECK_SCRIPTS_AT_BUILD +if SYNTAX_CHECKS @if test -f $(top_builddir)/perl/.libs/libCmdline.so -o -f $(top_builddir)/perl/libCmdline.so; then \ sed "s,^use lib ['\"]$(amperldir)['\"],# use lib '$(amperldir)' # nouselib," < $@ > $@.nouselib; \ $(PERL) $(CHECK_PERL_FLAGS) -I$(top_builddir)/perl -I$(top_builddir)/perl/.libs -I$(top_srcdir)/perl -c -w $@.nouselib || exit 1; \ rm $@.nouselib; \ + else \ + echo "skipping syntax check of $@ because perl packages are not compiled yet"; \ fi endif @@ -109,33 +111,24 @@ CLEANFILES += config.log # and we'll need to clean up our generated files for distclean DISTCLEANFILES += $(SCRIPTS_SHELL) $(SCRIPTS_PERL) $(SCRIPTS_AWK) $(SCRIPTS_INCLUDE) -# syntax-check perl scripts on 'make check' +# syntax-check perl scripts on an explicit 'make check', but only if +# SYNTAX_CHECKS are enabled, as this is sensitive to the presence of perl +# modules in the install tree, and can trip up unsuspecting users. check-perl: $(SCRIPTS_PERL) @SCRIPTS_PERL="$(SCRIPTS_PERL)"; \ if test x"$(SKIP_CHECKS)" = x"" && \ test -f $(top_builddir)/perl/.libs/libCmdline.so -o -f $(top_builddir)/perl/libCmdline.so; then \ - if test -n "$(PERL)"; then \ - for perlobj in $$SCRIPTS_PERL; do \ - sed "s,^use lib ['\"]$(amperldir)['\"],# use lib '$(amperldir)' # nouselib," < $$perlobj > $$perlobj.nouselib; \ - $(PERL) $(CHECK_PERL_FLAGS) -I$(top_builddir)/perl -I$(top_builddir)/perl/.libs -I$(top_srcdir)/perl -c -w $$perlobj.nouselib || exit 1; \ - rm $$perlobj.nouselib; \ - done; \ - fi \ + for perlobj in $$SCRIPTS_PERL; do \ + sed "s,^use lib ['\"]$(amperldir)['\"],# use lib '$(amperldir)' # nouselib," < $$perlobj > $$perlobj.nouselib; \ + $(PERL) $(CHECK_PERL_FLAGS) -I$(top_builddir)/perl -I$(top_builddir)/perl/.libs -I$(top_srcdir)/perl -c -w $$perlobj.nouselib || exit 1; \ + rm $$perlobj.nouselib; \ + done; \ fi +if SYNTAX_CHECKS check-local: check-perl +endif -# syntax-check perl scripts on 'make installcheck' -installcheck-perl: $(SCRIPTS_PERL) - @SCRIPTS_PERL="$(SCRIPTS_PERL)"; \ - if test x"$(SKIP_CHECKS)" = x"" && \ - test -n "$(PERL)"; then \ - for perlobj in $$SCRIPTS_PERL; do \ - $(PERL) $(CHECK_PERL_FLAGS) -c -w $$perlobj || exit 1; \ - done; \ - fi -installcheck-local: installcheck-perl - -# syntax-check shell scripts on 'make check' +# syntax-check shell scripts on an explicit 'make check' check-shell: $(SCRIPTS_SHELL) @SCRIPTS_SHELL="$(SCRIPTS_SHELL)"; \ if test x"$(SKIP_CHECKS)" = x"" && \ @@ -153,7 +146,9 @@ check-shell: $(SCRIPTS_SHELL) echo "No 'bash' available -- cannot syntax-check shell scripts"; \ fi; \ fi +if SYNTAX_CHECKS check-local: check-shell +endif # make sure that the sources for all shell and perl scripts get included # in the distribution