about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/Builtins/rlimits.mdd12
-rw-r--r--configure.in3
3 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 9eb3045a3..d837d2589 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-07  Bart Schaefer  <schaefer@brasslantern.com>
+
+	* 12193: configure.in, Src/Builtins/rlimits.mdd: Fix unnecessary
+	rebuilds of rlimits.o on platforms where getrlimit() is not found.
+
 2000-07-06  Oliver Kiddle  <opk@zsh.org>
 
 	* 12181: Completion/AIX/_lscfg, Completion/AIX/_object_classes,
diff --git a/Src/Builtins/rlimits.mdd b/Src/Builtins/rlimits.mdd
index f0e41b73e..61e7113f3 100644
--- a/Src/Builtins/rlimits.mdd
+++ b/Src/Builtins/rlimits.mdd
@@ -1,3 +1,5 @@
+name=zsh/rlimits
+
 autobins="limit ulimit unlimit"
 
 objects="rlimits.o"
@@ -5,12 +7,12 @@ objects="rlimits.o"
 :<<\Make
 rlimits.o rlimits..o: rlimits.h
 
-# this file will not be made if limits are unavailable:
-# silent so the warning doesn't appear unless necessary
+# this file will not be made if limits are unavailable
 rlimits.h: rlimits.awk @RLIMITS_INC_H@
-	@echo '$(AWK) -f $(sdir)/rlimits.awk @RLIMITS_INC_H@ > rlimits.h'; \
-	$(AWK) -f $(sdir)/rlimits.awk @RLIMITS_INC_H@ > rlimits.h || \
-	    echo WARNING: unknown limits:  mail rlimits.h to developers
+	$(AWK) -f $(sdir)/rlimits.awk @RLIMITS_INC_H@ /dev/null > rlimits.h
+	@if grep ZLIMTYPE_UNKNOWN rlimits.h >/dev/null; then \
+	    echo >&2 WARNING: unknown limits: mail rlimits.h to developers; \
+	else :; fi
 
 clean-here: clean.rlimits
 clean.rlimits:
diff --git a/configure.in b/configure.in
index 31903ea4d..339baeb03 100644
--- a/configure.in
+++ b/configure.in
@@ -963,6 +963,9 @@ if test $RESOURCE_H = "/dev/null" -a $ac_cv_func_getrlimit = yes; then
   AC_MSG_WARN(RLIMIT MACROS NOT FOUND:  please report to developers)
 fi])
 RLIMITS_INC_H=$zsh_cv_path_rlimit_h
+if test "$RLIMITS_INC_H" = "/dev/null"; then
+  RLIMITS_INC_H=''
+fi
 dnl rlimits.h only appears in dependencies if we are actually using it.
 dnl We are using it any time we have getrlimit, though if the macros were
 dnl not found we simply awk through /dev/null and fail to find them.