Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/bmake/files Import bmake-



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1b3bfe5b9400
branches:  trunk
changeset: 432673:1b3bfe5b9400
user:      nia <nia%pkgsrc.org@localhost>
date:      Sun May 24 05:35:51 2020 +0000

description:
Import bmake-

diffstat:

 devel/bmake/files/VERSION                       |     2 +-
 devel/bmake/files/filemon/filemon.h             |    53 +
 devel/bmake/files/filemon/filemon_dev.c         |   151 ++
 devel/bmake/files/filemon/filemon_ktrace.c      |   878 +++++++++++++
 devel/bmake/files/metachar.c                    |    88 +
 devel/bmake/files/metachar.h                    |    61 +
 devel/bmake/files/mk/ChangeLog                  |  1540 +++++++++++++++++++++++
 devel/bmake/files/mk/FILES                      |    72 +
 devel/bmake/files/mk/README                     |   401 +++++
 devel/bmake/files/mk/auto.dep.mk                |    74 +
 devel/bmake/files/mk/auto.obj.mk                |    76 +
 devel/bmake/files/mk/autoconf.mk                |    80 +
 devel/bmake/files/mk/autodep.mk                 |   219 +++
 devel/bmake/files/mk/compiler.mk                |    43 +
 devel/bmake/files/mk/cython.mk                  |   101 +
 devel/bmake/files/mk/dep.mk                     |   127 +
 devel/bmake/files/mk/dirdeps-options.mk         |    73 +
 devel/bmake/files/mk/dirdeps-targets.mk         |   133 +
 devel/bmake/files/mk/dirdeps.mk                 |   834 ++++++++++++
 devel/bmake/files/mk/doc.mk                     |    64 +
 devel/bmake/files/mk/dpadd.mk                   |   339 +++++
 devel/bmake/files/mk/files.mk                   |    83 +
 devel/bmake/files/mk/final.mk                   |    22 +
 devel/bmake/files/mk/gendirdeps.mk              |   383 +++++
 devel/bmake/files/mk/host-target.mk             |    44 +
 devel/bmake/files/mk/host.libnames.mk           |    29 +
 devel/bmake/files/mk/inc.mk                     |    89 +
 devel/bmake/files/mk/init.mk                    |    70 +
 devel/bmake/files/mk/install-mk                 |   185 ++
 devel/bmake/files/mk/install-new.mk             |    53 +
 devel/bmake/files/mk/java.mk                    |    97 +
 devel/bmake/files/mk/ldorder.mk                 |   156 ++
 devel/bmake/files/mk/lib.mk                     |   609 +++++++++
 devel/bmake/files/mk/libnames.mk                |    22 +
 devel/bmake/files/mk/libs.mk                    |    93 +
 devel/bmake/files/mk/links.mk                   |    80 +
 devel/bmake/files/mk/man.mk                     |   137 ++
 devel/bmake/files/mk/manifest.mk                |    66 +
 devel/bmake/files/mk/meta.autodep.mk            |   320 ++++
 devel/bmake/files/mk/meta.stage.mk              |   366 +++++
 devel/bmake/files/mk/meta.subdir.mk             |    79 +
 devel/bmake/files/mk/meta.sys.mk                |   173 ++
 devel/bmake/files/mk/meta2deps.py               |   755 +++++++++++
 devel/bmake/files/mk/meta2deps.sh               |   405 ++++++
 devel/bmake/files/mk/mk-files.txt               |   503 +++++++
 devel/bmake/files/mk/mkopt.sh                   |   103 +
 devel/bmake/files/mk/nls.mk                     |    47 +
 devel/bmake/files/mk/obj.mk                     |   113 +
 devel/bmake/files/mk/options.mk                 |    80 +
 devel/bmake/files/mk/own.mk                     |   271 ++++
 devel/bmake/files/mk/prlist.mk                  |    36 +
 devel/bmake/files/mk/prog.mk                    |   251 +++
 devel/bmake/files/mk/progs.mk                   |   102 +
 devel/bmake/files/mk/rst2htm.mk                 |    53 +
 devel/bmake/files/mk/scripts.mk                 |    91 +
 devel/bmake/files/mk/srctop.mk                  |    66 +
 devel/bmake/files/mk/stage-install.sh           |    98 +
 devel/bmake/files/mk/subdir.mk                  |   102 +
 devel/bmake/files/mk/sys.clean-env.mk           |   130 +
 devel/bmake/files/mk/sys.debug.mk               |    33 +
 devel/bmake/files/mk/sys.dependfile.mk          |    59 +
 devel/bmake/files/mk/sys.mk                     |   155 ++
 devel/bmake/files/mk/sys.vars.mk                |    85 +
 devel/bmake/files/mk/sys/AIX.mk                 |   184 ++
 devel/bmake/files/mk/sys/Darwin.mk              |   222 +++
 devel/bmake/files/mk/sys/Generic.mk             |   204 +++
 devel/bmake/files/mk/sys/HP-UX.mk               |   226 +++
 devel/bmake/files/mk/sys/IRIX.mk                |   195 ++
 devel/bmake/files/mk/sys/Linux.mk               |   187 ++
 devel/bmake/files/mk/sys/NetBSD.mk              |   230 +++
 devel/bmake/files/mk/sys/OSF1.mk                |   198 ++
 devel/bmake/files/mk/sys/OpenBSD.mk             |   205 +++
 devel/bmake/files/mk/sys/SunOS.mk               |   219 +++
 devel/bmake/files/mk/sys/UnixWare.mk            |   241 +++
 devel/bmake/files/mk/target-flags.mk            |    62 +
 devel/bmake/files/mk/warnings.mk                |   139 ++
 devel/bmake/files/mk/whats.mk                   |    69 +
 devel/bmake/files/mk/yacc.mk                    |    57 +
 devel/bmake/files/unit-tests/Makefile           |   155 ++
 devel/bmake/files/unit-tests/Makefile.config.in |     4 +
 devel/bmake/files/unit-tests/cond-late.exp      |     3 +
 devel/bmake/files/unit-tests/cond-late.mk       |    23 +
 devel/bmake/files/unit-tests/dollar.exp         |    51 +
 devel/bmake/files/unit-tests/dollar.mk          |    81 +
 devel/bmake/files/unit-tests/doterror.exp       |     2 +-
 devel/bmake/files/unit-tests/dotwait.exp        |     4 +-
 devel/bmake/files/unit-tests/export-env.exp     |     2 +
 devel/bmake/files/unit-tests/forloop.exp        |     3 +-
 devel/bmake/files/unit-tests/include-main.exp   |     6 +
 devel/bmake/files/unit-tests/include-main.mk    |    30 +
 devel/bmake/files/unit-tests/include-sub.mk     |    17 +
 devel/bmake/files/unit-tests/include-subsub.mk  |     7 +
 devel/bmake/files/unit-tests/modmatch.exp       |     3 +
 devel/bmake/files/unit-tests/modmatch.mk        |    11 +-
 devel/bmake/files/unit-tests/modts.exp          |    10 +-
 devel/bmake/files/unit-tests/modts.mk           |     7 +-
 devel/bmake/files/unit-tests/sysv.exp           |     8 +
 devel/bmake/files/unit-tests/varcmd.exp         |     2 +
 devel/bmake/files/unit-tests/varmisc.exp        |    23 +
 devel/bmake/files/unit-tests/varmod-edge.exp    |    17 +
 devel/bmake/files/unit-tests/varmod-edge.mk     |   162 ++
 devel/bmake/files/unit-tests/varquote.exp       |     3 +
 devel/bmake/files/unit-tests/varquote.mk        |    14 +
 103 files changed, 15378 insertions(+), 11 deletions(-)

diffs (truncated from 15884 to 300 lines):

diff -r 8f8951c6e7cd -r 1b3bfe5b9400 devel/bmake/files/VERSION
--- a/devel/bmake/files/VERSION Sun May 24 05:22:01 2020 +0000
+++ b/devel/bmake/files/VERSION Sun May 24 05:35:51 2020 +0000
@@ -1,2 +1,2 @@
 # keep this compatible with sh and make
-_MAKE_VERSION=20150505
+_MAKE_VERSION=20200517
diff -r 8f8951c6e7cd -r 1b3bfe5b9400 devel/bmake/files/filemon/filemon.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/bmake/files/filemon/filemon.h       Sun May 24 05:35:51 2020 +0000
@@ -0,0 +1,53 @@
+/*     $NetBSD: filemon.h,v 1.1.1.1 2020/05/24 05:35:53 nia Exp $      */
+
+/*-
+ * Copyright (c) 2019 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Taylor R. Campbell.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef FILEMON_H_
+#define        FILEMON_H_
+
+#include <sys/types.h>
+
+struct filemon;
+
+const char *
+       filemon_path(void);
+
+struct filemon *
+       filemon_open(void);
+int    filemon_close(struct filemon *);
+
+int    filemon_setfd(struct filemon *, int);
+void   filemon_setpid_parent(struct filemon *, pid_t);
+int    filemon_setpid_child(const struct filemon *, pid_t);
+
+int    filemon_readfd(const struct filemon *);
+int    filemon_process(struct filemon *);
+
+#endif /* FILEMON_H_ */
diff -r 8f8951c6e7cd -r 1b3bfe5b9400 devel/bmake/files/filemon/filemon_dev.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/bmake/files/filemon/filemon_dev.c   Sun May 24 05:35:51 2020 +0000
@@ -0,0 +1,151 @@
+/*     $NetBSD: filemon_dev.c,v 1.1.1.1 2020/05/24 05:35:53 nia Exp $  */
+
+/*-
+ * Copyright (c) 2020 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Taylor R. Campbell.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "filemon.h"
+
+#include <sys/ioctl.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#ifdef HAVE_FILEMON_H
+#  include <filemon.h>
+#endif
+
+#ifndef _PATH_FILEMON
+#define        _PATH_FILEMON   "/dev/filemon"
+#endif
+
+struct filemon {
+       int     fd;
+};
+
+const char *
+filemon_path(void)
+{
+
+       return _PATH_FILEMON;
+}
+
+struct filemon *
+filemon_open(void)
+{
+       struct filemon *F;
+       unsigned i;
+       int error;
+
+       /* Allocate and zero a struct filemon object.  */
+       F = calloc(1, sizeof(*F));
+       if (F == NULL)
+               return NULL;
+
+       /* Try opening /dev/filemon, up to six times (cargo cult!).  */
+       for (i = 0; (F->fd = open(_PATH_FILEMON, O_RDWR)) == -1; i++) {
+               if (i == 5) {
+                       error = errno;
+                       goto fail0;
+               }
+       }
+
+       /* Success!  */
+       return F;
+
+fail0: free(F);
+       errno = error;
+       return NULL;
+}
+
+int
+filemon_setfd(struct filemon *F, int fd)
+{
+
+       /* Point the kernel at this file descriptor.  */
+       if (ioctl(F->fd, FILEMON_SET_FD, &fd) == -1)
+               return -1;
+
+       /* No need for it in userland any more; close it.  */
+       (void)close(fd);
+
+       /* Success!  */
+       return 0;
+}
+
+void
+filemon_setpid_parent(struct filemon *F, pid_t pid)
+{
+       /* Nothing to do!  */
+}
+
+int
+filemon_setpid_child(const struct filemon *F, pid_t pid)
+{
+
+       /* Just pass it on to the kernel.  */
+       return ioctl(F->fd, FILEMON_SET_PID, &pid);
+}
+
+int
+filemon_close(struct filemon *F)
+{
+       int error = 0;
+
+       /* Close the filemon device fd.  */
+       if (close(F->fd) == -1 && error == 0)
+               error = errno;
+
+       /* Free the filemon descriptor.  */
+       free(F);
+
+       /* Set errno and return -1 if anything went wrong.  */
+       if (error) {
+               errno = error;
+               return -1;
+       }
+
+       /* Success!  */
+       return 0;
+}
+
+int
+filemon_readfd(const struct filemon *F)
+{
+
+       return -1;
+}
+
+int
+filemon_process(struct filemon *F)
+{
+
+       return 0;
+}
diff -r 8f8951c6e7cd -r 1b3bfe5b9400 devel/bmake/files/filemon/filemon_ktrace.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/bmake/files/filemon/filemon_ktrace.c        Sun May 24 05:35:51 2020 +0000
@@ -0,0 +1,878 @@
+/*     $NetBSD: filemon_ktrace.c,v 1.1.1.1 2020/05/24 05:35:53 nia Exp $       */
+
+/*-
+ * Copyright (c) 2019 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Taylor R. Campbell.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#define        _KERNTYPES              /* register_t */
+
+#include "filemon.h"
+
+#include <sys/param.h>
+#include <sys/types.h>
+#include <sys/rbtree.h>
+#include <sys/syscall.h>
+#include <sys/time.h>
+#include <sys/uio.h>
+#include <sys/wait.h>
+
+#include <sys/ktrace.h>
+
+#include <assert.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifndef AT_CWD
+#define AT_CWD -1
+#endif
+
+struct filemon;
+struct filemon_key;
+struct filemon_state;
+
+typedef struct filemon_state *filemon_syscall_t(struct filemon *,
+    const struct filemon_key *, const struct ktr_syscall *);
+
+static filemon_syscall_t filemon_sys_chdir;
+static filemon_syscall_t filemon_sys_execve;
+static filemon_syscall_t filemon_sys_exit;
+static filemon_syscall_t filemon_sys_fork;
+static filemon_syscall_t filemon_sys_link;
+static filemon_syscall_t filemon_sys_open;
+static filemon_syscall_t filemon_sys_openat;
+static filemon_syscall_t filemon_sys_symlink;
+static filemon_syscall_t filemon_sys_unlink;
+static filemon_syscall_t filemon_sys_rename;



Home | Main Index | Thread Index | Old Index