svn commit: r351891 - stable/11/lib/libsysdecode
Bryan Drewery
bdrewery at FreeBSD.org
Thu Sep 5 20:27:45 UTC 2019
Author: bdrewery
Date: Thu Sep 5 20:27:44 2019
New Revision: 351891
URL: https://svnweb.freebsd.org/changeset/base/351891
Log:
MFC r339635,r350301,r350327,r351151:
r339635:
Fix regex for extracting SHM_* values for libsysdecode
r350301:
libsysdecode: add explicit dependencies on recently changed headers
r350327:
libsysdecode: use the proper include directory
r351151:
Rework r339635 to fix .depend.tables.h handling.
Modified:
stable/11/lib/libsysdecode/Makefile
stable/11/lib/libsysdecode/mktables
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/lib/libsysdecode/Makefile
==============================================================================
--- stable/11/lib/libsysdecode/Makefile Thu Sep 5 20:26:20 2019 (r351890)
+++ stable/11/lib/libsysdecode/Makefile Thu Sep 5 20:27:44 2019 (r351891)
@@ -107,7 +107,7 @@ MLINKS+=sysdecode_mask.3 sysdecode_accessmode.3 \
sysdecode_mask.3 sysdecode_wait4_options.3 \
sysdecode_mask.3 sysdecode_wait6_options.3
-CLEANFILES= ioctl.c tables.h
+CLEANFILES= ioctl.c ioctl.c.tmp tables.h
.if defined(COMPAT_32BIT)
CPP+= -m32
Modified: stable/11/lib/libsysdecode/mktables
==============================================================================
--- stable/11/lib/libsysdecode/mktables Thu Sep 5 20:26:20 2019 (r351890)
+++ stable/11/lib/libsysdecode/mktables Thu Sep 5 20:27:44 2019 (r351891)
@@ -43,7 +43,8 @@ fi
include_dir=$1
if [ -n "$2" ]; then
output_file="$2"
- exec > "$output_file"
+ output_tmp=$(mktemp -u)
+ exec > "$output_tmp"
fi
all_headers=
@@ -123,7 +124,7 @@ gen_table "rlimit" "RLIMIT_[A-Z]+[[:space:]]+
gen_table "rusage" "RUSAGE_[A-Z]+[[:space:]]+[-0-9]+" "sys/resource.h"
gen_table "schedpolicy" "SCHED_[A-Z]+[[:space:]]+[0-9]+" "sched.h"
gen_table "sendfileflags" "SF_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h"
-gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}+" "sys/shm.h"
+gen_table "shmatflags" "SHM_[A-Z]+[[:space:]]+[0-9]{6}" "sys/shm.h"
gen_table "shutdownhow" "SHUT_[A-Z]+[[:space:]]+[0-9]+" "sys/socket.h"
gen_table "sigbuscode" "BUS_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h"
gen_table "sigchldcode" "CLD_[A-Z]+[[:space:]]+[0-9]+" "sys/signal.h"
@@ -167,9 +168,17 @@ fi
# Generate a .depend file for our output file
if [ -n "$output_file" ]; then
- echo "$output_file: \\" > ".depend.$output_file"
- echo "$all_headers" | tr ' ' '\n' | sort -u |
- sed -e "s,^, $include_dir/," -e 's,$, \\,' >> \
- ".depend.$output_file"
- echo >> ".depend.$output_file"
+ depend_tmp=$(mktemp -u)
+ {
+ echo "$output_file: \\"
+ echo "$all_headers" | tr ' ' '\n' | sort -u |
+ sed -e "s,^, $include_dir/," -e 's,$, \\,'
+ echo
+ } > "$depend_tmp"
+ if cmp -s "$output_tmp" "$output_file"; then
+ rm -f "$output_tmp" "$depend_tmp"
+ else
+ mv -f "$depend_tmp" ".depend.${output_file}"
+ mv -f "$output_tmp" "$output_file"
+ fi
fi
More information about the svn-src-stable
mailing list