Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Use RUMP_ACTION to avoid having to specify the same information
details: https://anonhg.NetBSD.org/src/rev/9d4db0a36cac
branches: trunk
changeset: 750181:9d4db0a36cac
user: pooka <pooka%NetBSD.org@localhost>
date: Sat Dec 19 15:03:34 2009 +0000
description:
Use RUMP_ACTION to avoid having to specify the same information
in the Makefiles of all the consumers.
diffstat:
sbin/cgdconfig/Makefile | 4 +-
sbin/cgdconfig/Makefile.cgdconfig | 10 +++++-
sbin/cgdconfig/cgd_rumpops.c | 49 +++++++++++++++++++++++++++++++
share/examples/rump/img2cgd/Makefile | 12 +++----
share/examples/rump/img2cgd/cgd_rumpops.c | 49 -------------------------------
5 files changed, 64 insertions(+), 60 deletions(-)
diffs (167 lines):
diff -r 02508631c5c8 -r 9d4db0a36cac sbin/cgdconfig/Makefile
--- a/sbin/cgdconfig/Makefile Sat Dec 19 14:05:53 2009 +0000
+++ b/sbin/cgdconfig/Makefile Sat Dec 19 15:03:34 2009 +0000
@@ -1,10 +1,8 @@
-# $NetBSD: Makefile,v 1.12 2009/09/08 21:36:35 pooka Exp $
+# $NetBSD: Makefile,v 1.13 2009/12/19 15:03:34 pooka Exp $
PROG= cgdconfig
MAN= cgdconfig.8
-SRCS+= cgd_kernelops.c
-
.include "${.CURDIR}/Makefile.cgdconfig"
.include <bsd.prog.mk>
diff -r 02508631c5c8 -r 9d4db0a36cac sbin/cgdconfig/Makefile.cgdconfig
--- a/sbin/cgdconfig/Makefile.cgdconfig Sat Dec 19 14:05:53 2009 +0000
+++ b/sbin/cgdconfig/Makefile.cgdconfig Sat Dec 19 15:03:34 2009 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.cgdconfig,v 1.1 2009/09/08 21:36:35 pooka Exp $
+# $NetBSD: Makefile.cgdconfig,v 1.2 2009/12/19 15:03:34 pooka Exp $
#
SRCS+= cgdconfig.c \
@@ -22,3 +22,11 @@
.PATH: ${CGDCONFIGDIR}
CPPFLAGS+= -I${CGDCONFIGDIR}
+
+.ifdef RUMP_ACTION
+LDADD+= -lrumpdev_cgd -lrumpdev_disk -lrumpdev -lrumpcrypto
+LDADD+= -lrumpvfs -lrump -lrumpuser -lpthread
+SRCS+= cgd_rumpops.c
+.else
+SRCS+= cgd_kernelops.c
+.endif
diff -r 02508631c5c8 -r 9d4db0a36cac sbin/cgdconfig/cgd_rumpops.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbin/cgdconfig/cgd_rumpops.c Sat Dec 19 15:03:34 2009 +0000
@@ -0,0 +1,49 @@
+/* $NetBSD: cgd_rumpops.c,v 1.1 2009/12/19 15:03:34 pooka Exp $ */
+
+/*
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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 <sys/cdefs.h>
+#ifndef lint
+__RCSID("$NetBSD: cgd_rumpops.c,v 1.1 2009/12/19 15:03:34 pooka Exp $");
+#endif /* !lint */
+
+#include <sys/types.h>
+#include <sys/ioctl.h>
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <rump/rump_syscalls.h>
+
+#include "cgd_kernelops.h"
+
+const struct cgd_kernelops cgd_kops = {
+ .ko_open = rump_sys_open,
+ .ko_ioctl = rump_sys_ioctl,
+ .ko_pread = rump_sys_pread,
+ .ko_close = rump_sys_close,
+};
diff -r 02508631c5c8 -r 9d4db0a36cac share/examples/rump/img2cgd/Makefile
--- a/share/examples/rump/img2cgd/Makefile Sat Dec 19 14:05:53 2009 +0000
+++ b/share/examples/rump/img2cgd/Makefile Sat Dec 19 15:03:34 2009 +0000
@@ -1,16 +1,14 @@
PROG= img2cgd
-SRCS= img2cgd.c cgd_rumpops.c
+SRCS= img2cgd.c
NOMAN=
.include <bsd.own.mk>
+RUMP_ACTION= #defined
+CPPFLAGS+= -DCGDCONFIG_AS_LIB
.include "${NETBSDSRCDIR}/sbin/cgdconfig/Makefile.cgdconfig"
-LDADD+= -lrumpdev_cgd -lrumpdev_disk -lrumpdev -lrumpcrypto
-LDADD+= -lrumpvfs -lrump -lrumpuser -lpthread
-
-CPPFLAGS+= -DCGDCONFIG_AS_LIB
-
-DBG=-g -O0
+DBG= -g -O0
+WARNS= 3
.include <bsd.prog.mk>
diff -r 02508631c5c8 -r 9d4db0a36cac share/examples/rump/img2cgd/cgd_rumpops.c
--- a/share/examples/rump/img2cgd/cgd_rumpops.c Sat Dec 19 14:05:53 2009 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/* $NetBSD: cgd_rumpops.c,v 1.1 2009/09/08 21:48:25 pooka Exp $ */
-
-/*
- * Copyright (c) 2009 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * 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 <sys/cdefs.h>
-#ifndef lint
-__RCSID("$NetBSD: cgd_rumpops.c,v 1.1 2009/09/08 21:48:25 pooka Exp $");
-#endif /* !lint */
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-
-#include <fcntl.h>
-#include <unistd.h>
-
-#include <rump/rump_syscalls.h>
-
-#include "cgd_kernelops.h"
-
-const struct cgd_kernelops cgd_kops = {
- .ko_open = rump_sys_open,
- .ko_ioctl = rump_sys_ioctl,
- .ko_pread = rump_sys_pread,
- .ko_close = rump_sys_close,
-};
Home |
Main Index |
Thread Index |
Old Index