Date: Tue, 23 Oct 2018 06:31:20 +0000 (UTC) From: Alex Richardson <arichardson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r339635 - head/lib/libsysdecode Message-ID: <201810230631.w9N6VKDE008499@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: arichardson Date: Tue Oct 23 06:31:19 2018 New Revision: 339635 URL: https://svnweb.freebsd.org/changeset/base/339635 Log: Fix regex for extracting SHM_* values for libsysdecode There was an additional + after the {6} which is apparently ignored by the FreeBSD regex implementation but was giving me an error when compiling on MacOS. While changing this also make sure that tables.h is not created if mktables fails. The current rule would create a partial tables.h which causes following incremental builds to use that broken file and fail with an unrelated compilation error or even succeed even though they shouldn't. Approved By: jhb (mentor) Differential Revision: https://reviews.freebsd.org/D17069 Modified: head/lib/libsysdecode/Makefile head/lib/libsysdecode/mktables Modified: head/lib/libsysdecode/Makefile ============================================================================== --- head/lib/libsysdecode/Makefile Tue Oct 23 04:37:29 2018 (r339634) +++ head/lib/libsysdecode/Makefile Tue Oct 23 06:31:19 2018 (r339635) @@ -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 tables.h.tmp .if defined(COMPAT_32BIT) CPP+= -m32 @@ -124,7 +124,8 @@ CFLAGS.gcc+= ${CFLAGS.gcc.${.IMPSRC}} DEPENDOBJS+= tables.h tables.h: mktables - sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET} + sh ${.CURDIR}/mktables ${SYSROOT:U${DESTDIR}}${INCLUDEDIR} ${.TARGET}.tmp && \ + mv -f ${.TARGET}.tmp ${.TARGET} # mkioctls runs find(1) for headers so needs to rebuild every time. This used # to be a hack only done in buildworld. Modified: head/lib/libsysdecode/mktables ============================================================================== --- head/lib/libsysdecode/mktables Tue Oct 23 04:37:29 2018 (r339634) +++ head/lib/libsysdecode/mktables Tue Oct 23 06:31:19 2018 (r339635) @@ -123,7 +123,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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810230631.w9N6VKDE008499>