top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
incdir = $(top_srcdir)/include
+cross_compiling = @CROSS_COMPILING@
# Where to install things...
prefix = @prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
incdir = $(top_srcdir)/include
+cross_compiling = @CROSS_COMPILING@
# Where to install things...
prefix = @prefix@
uninstall:
check: $(TEST_PROGS)
- @if [ -f fnm_test ]; then \
- ./fnm_test $(srcdir)/regress/fnmatch/fnm_test.in; \
- fi
- @if [ -f globtest ]; then \
- mkdir -p `sed 's@/[^/]*$$@@' $(srcdir)/regress/glob/files | sort -u`; \
- touch `cat $(srcdir)/regress/glob/files`; \
- chmod 0755 `grep '/r[^/]*$$' $(srcdir)/regress/glob/files`; \
- chmod 0444 `grep '/s[^/]*$$' $(srcdir)/regress/glob/files`; \
- chmod 0711 `grep '/t[^/]*$$' $(srcdir)/regress/glob/files`; \
- ./globtest $(srcdir)/regress/glob/globtest.in; \
- rval=$$?; \
- rm -rf fake; \
- exit $$rval; \
+ @if test X"$(cross_compiling)" != X"yes"; then \
+ if test -f fnm_test; then \
+ ./fnm_test $(srcdir)/regress/fnmatch/fnm_test.in; \
+ fi; \
+ if test -f globtest; then \
+ mkdir -p `sed 's@/[^/]*$$@@' $(srcdir)/regress/glob/files | sort -u`; \
+ touch `cat $(srcdir)/regress/glob/files`; \
+ chmod 0755 `grep '/r[^/]*$$' $(srcdir)/regress/glob/files`; \
+ chmod 0444 `grep '/s[^/]*$$' $(srcdir)/regress/glob/files`; \
+ chmod 0711 `grep '/t[^/]*$$' $(srcdir)/regress/glob/files`; \
+ ./globtest $(srcdir)/regress/glob/globtest.in; \
+ rval=$$?; \
+ rm -rf fake; \
+ exit $$rval; \
+ fi; \
fi
clean:
timeout
timedir
iolog_dir
+CROSS_COMPILING
COMPAT_TEST_PROGS
SUDO_NLS
LIBINTL
+
#
fi
fi
+CROSS_COMPILING="$cross_compiling"
+
test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)'
if test X"$with_noexec" != X"no" -o X"$with_selinux" != X"no"; then
AC_SUBST([LIBINTL])
AC_SUBST([SUDO_NLS])
AC_SUBST([COMPAT_TEST_PROGS])
+AC_SUBST([CROSS_COMPILING])
dnl
dnl Variables that get substituted in docs (not overridden by environment)
dnl
fi
fi
+dnl
+dnl Skip regress tests and sudoers sanity check if cross compiling.
+dnl
+CROSS_COMPILING="$cross_compiling"
+
dnl
dnl Set exec_prefix
dnl
docdir = @docdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+cross_compiling = @CROSS_COMPILING@
# Tools to use
NROFF = @NROFFPROG@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
includedir = @includedir@
+cross_compiling = @CROSS_COMPILING@
# Our install program supports extra flags...
INSTALL = $(SHELL) $(top_srcdir)/install-sh -c
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
incdir = $(top_srcdir)/include
+cross_compiling = @CROSS_COMPILING@
# Compiler & tools to use
CC = @CC@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
incdir = $(top_srcdir)/include
+cross_compiling = @CROSS_COMPILING@
# Compiler & tools to use
CC = @CC@
incdir = $(top_srcdir)/include
docdir = @docdir@
timedir = @timedir@
+cross_compiling = @CROSS_COMPILING@
# Compiler & tools to use
CC = @CC@
(cd $(top_builddir) && $(SHELL) config.status --file=plugins/sudoers/$@)
pre-install:
- @if test -r $(DESTDIR)$(sudoersdir)/sudoers; then \
+ @if test X"$(cross_compiling)" != X"yes" -a -r $(DESTDIR)$(sudoersdir)/sudoers; then \
echo "Checking existing sudoers file for syntax errors."; \
./visudo -c -f $(DESTDIR)$(sudoersdir)/sudoers; \
fi
rm -f $(DESTDIR)$(sudoersdir)/sudoers
check: $(TEST_PROGS) visudo testsudoers
- @-rval=0; \
- PWD=`pwd`; \
- ./check_addr $(srcdir)/regress/parser/check_addr.in; \
- rval=`expr $$rval + $$?`; \
- ./check_fill; \
- rval=`expr $$rval + $$?`; \
- ./check_iolog_path $(srcdir)/regress/iolog_path/data; \
- rval=`expr $$rval + $$?`; \
- if [ X"$(soext)" != X"" ]; then \
- ./check_symbols .libs/sudoers$(soext) $(shlib_exp); \
+ @-if test X"$(cross_compiling)" != X"yes"; then \
+ rval=0; \
+ PWD=`pwd`; \
+ ./check_addr $(srcdir)/regress/parser/check_addr.in; \
+ rval=`expr $$rval + $$?`; \
+ ./check_fill; \
+ rval=`expr $$rval + $$?`; \
+ ./check_iolog_path $(srcdir)/regress/iolog_path/data; \
rval=`expr $$rval + $$?`; \
- fi; \
- ./check_wrap $(srcdir)/regress/logging/check_wrap.in > check_wrap.out; \
- diff check_wrap.out $(srcdir)/regress/logging/check_wrap.out.ok; \
- rval=`expr $$rval + $$?`; \
- passed=0; failed=0; total=0; \
+ if [ X"$(soext)" != X"" ]; then \
+ ./check_symbols .libs/sudoers$(soext) $(shlib_exp); \
+ rval=`expr $$rval + $$?`; \
+ fi; \
+ ./check_wrap $(srcdir)/regress/logging/check_wrap.in > check_wrap.out; \
+ diff check_wrap.out $(srcdir)/regress/logging/check_wrap.out.ok; \
+ rval=`expr $$rval + $$?`; \
+ passed=0; failed=0; total=0; \
for t in $(srcdir)/regress/sudoers/*.in; do \
dir=`dirname $$t`; \
dirbase=`basename $$dir`; \
total=`expr $$total + 1`; \
done; \
echo "$$dirbase: $$passed/$$total tests passed; $$failed/$$total tests failed"; \
- rval=`expr $$rval + $$failed`; \
- passed=0; failed=0; total=0; \
+ rval=`expr $$rval + $$failed`; \
+ passed=0; failed=0; total=0; \
for t in $(srcdir)/regress/*/*.sh; do \
dir=`dirname $$t`; \
dirbase=`basename $$dir`; \
fi; \
done; \
echo "$$dirbase: $$passed/$$total tests passed; $$failed/$$total tests failed"; \
- rval=`expr $$rval + $$failed`; exit $$rval
+ rval=`expr $$rval + $$failed`; \
+ exit $$rval; \
+ fi
clean:
-$(LIBTOOL) --mode=clean rm -f $(PROGS) $(TEST_PROGS) *.lo *.o *.la *.a stamp-* core *.core core.* *.out *.toke *.err *.inc
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
incdir = $(top_srcdir)/include
+cross_compiling = @CROSS_COMPILING@
# Compiler & tools to use
CC = @CC@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
incdir = $(top_srcdir)/include
+cross_compiling = @CROSS_COMPILING@
# Compiler & tools to use
CC = @CC@
srcdir = @srcdir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
+cross_compiling = @CROSS_COMPILING@
# Compiler & tools to use
CC = @CC@