[systemd-commits] 4 commits - Makefile.am src/libsystemd-bus
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Nov 29 16:50:27 PST 2013
Makefile.am | 66 ++++++++---------
src/libsystemd-bus/bus-internal.h | 5 -
src/libsystemd-bus/bus-kernel.c | 131 +++++++++++++++--------------------
src/libsystemd-bus/bus-socket.c | 14 +--
src/libsystemd-bus/sd-bus.c | 108 +++++++++++++++-------------
src/libsystemd-bus/test-bus-kernel.c | 5 +
6 files changed, 157 insertions(+), 172 deletions(-)
New commits:
commit 32f464809e8e487739fde53a2feb0afba70c8db7
Author: Lennart Poettering <lennart at poettering.net>
Date: Sat Nov 30 01:49:40 2013 +0100
bus: whenever we notice the connection is terminated enter CLOSING state
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 05c5d8d..8ffc9a9 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1411,9 +1411,12 @@ _public_ int sd_bus_send(sd_bus *bus, sd_bus_message *m, uint64_t *serial) {
size_t idx = 0;
r = bus_write_message(bus, m, &idx);
- if (r < 0)
+ if (r < 0) {
+ if (r == -EPIPE || r == -ENOTCONN || r == -ESHUTDOWN)
+ bus_enter_closing(bus);
+
return r;
- else if (!bus->is_kernel && idx < BUS_MESSAGE_SIZE(m)) {
+ } else if (!bus->is_kernel && idx < BUS_MESSAGE_SIZE(m)) {
/* Wasn't fully written. So let's remember how
* much was written. Note that the first entry
* of the wqueue array is always allocated so
@@ -1687,8 +1690,12 @@ _public_ int sd_bus_call(
}
r = bus_read_message(bus);
- if (r < 0)
+ if (r < 0) {
+ if (r == -EPIPE || r == -ENOTCONN || r == -ESHUTDOWN)
+ bus_enter_closing(bus);
+
return r;
+ }
if (r > 0)
continue;
@@ -1708,8 +1715,12 @@ _public_ int sd_bus_call(
return r;
r = dispatch_wqueue(bus);
- if (r < 0)
+ if (r < 0) {
+ if (r == -EPIPE || r == -ENOTCONN || r == -ESHUTDOWN)
+ bus_enter_closing(bus);
+
return r;
+ }
}
}
@@ -2188,7 +2199,7 @@ _public_ int sd_bus_process(sd_bus *bus, sd_bus_message **ret) {
case BUS_OPENING:
r = bus_socket_process_opening(bus);
- if (r == -ECONNRESET || r == -EPIPE) {
+ if (r == -ECONNRESET || r == -EPIPE || r == -ESHUTDOWN) {
bus_enter_closing(bus);
r = 1;
} else if (r < 0)
@@ -2199,7 +2210,7 @@ _public_ int sd_bus_process(sd_bus *bus, sd_bus_message **ret) {
case BUS_AUTHENTICATING:
r = bus_socket_process_authenticating(bus);
- if (r == -ECONNRESET || r == -EPIPE) {
+ if (r == -ECONNRESET || r == -EPIPE || r == -ESHUTDOWN) {
bus_enter_closing(bus);
r = 1;
} else if (r < 0)
@@ -2213,7 +2224,7 @@ _public_ int sd_bus_process(sd_bus *bus, sd_bus_message **ret) {
case BUS_RUNNING:
case BUS_HELLO:
r = process_running(bus, ret);
- if (r == -ECONNRESET || r == -EPIPE) {
+ if (r == -ECONNRESET || r == -EPIPE || r == -ESHUTDOWN) {
bus_enter_closing(bus);
r = 1;
@@ -2324,8 +2335,12 @@ _public_ int sd_bus_flush(sd_bus *bus) {
for (;;) {
r = dispatch_wqueue(bus);
- if (r < 0)
+ if (r < 0) {
+ if (r == -EPIPE || r == -ENOTCONN || r == -ESHUTDOWN)
+ bus_enter_closing(bus);
+
return r;
+ }
if (bus->wqueue_size <= 0)
return 0;
commit a43b9ca3049d0f27cdb3bc8dad703e688cba31b3
Author: Lennart Poettering <lennart at poettering.net>
Date: Sat Nov 30 01:02:51 2013 +0100
bus: synthesize local error reply when we cannot deliver a message to kdbus because the destination is unavailable
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index a8579c9..6914343 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -393,13 +393,60 @@ int bus_kernel_write_message(sd_bus *bus, sd_bus_message *m) {
assert(m);
assert(bus->state == BUS_RUNNING);
+ /* If we can't deliver, we want room for the error message */
+ r = bus_rqueue_make_room(bus);
+ if (r < 0)
+ return r;
+
r = bus_message_setup_kmsg(bus, m);
if (r < 0)
return r;
r = ioctl(bus->output_fd, KDBUS_CMD_MSG_SEND, m->kdbus);
- if (r < 0)
- return errno == EAGAIN ? 0 : -errno;
+ if (r < 0) {
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
+ sd_bus_message *reply;
+
+ if (errno == EAGAIN || errno == EINTR)
+ return 0;
+ else if (errno == ENXIO || errno == ESRCH) {
+
+ /* ENXIO: unique name not known
+ * ESRCH: well-known name not known */
+
+ if (m->header->type == SD_BUS_MESSAGE_METHOD_CALL)
+ sd_bus_error_setf(&error, SD_BUS_ERROR_SERVICE_UNKNOWN, "Destination %s not known", m->destination);
+ else
+ return 0;
+
+ } else if (errno == EADDRNOTAVAIL) {
+
+ /* EADDRNOTAVAIL: activation is possible, but turned off in request flags */
+
+ if (m->header->type == SD_BUS_MESSAGE_METHOD_CALL)
+ sd_bus_error_setf(&error, SD_BUS_ERROR_SERVICE_UNKNOWN, "Activation of %s not requested", m->destination);
+ else
+ return 0;
+ } else
+ return -errno;
+
+ r = bus_message_new_synthetic_error(
+ bus,
+ BUS_MESSAGE_SERIAL(m),
+ &error,
+ &reply);
+
+ if (r < 0)
+ return r;
+
+ r = bus_seal_synthetic_message(bus, reply);
+ if (r < 0)
+ return r;
+
+ bus->rqueue[bus->rqueue_size++] = reply;
+
+ return 0;
+ }
return 1;
}
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 0eb61c4..05c5d8d 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1274,9 +1274,9 @@ static int bus_write_message(sd_bus *bus, sd_bus_message *message, size_t *idx)
assert(message);
if (bus->is_kernel)
- r = bus_kernel_write_message(bus, message);
+ return bus_kernel_write_message(bus, message);
else
- r = bus_socket_write_message(bus, message, idx);
+ return bus_socket_write_message(bus, message, idx);
return r;
}
@@ -1627,20 +1627,17 @@ _public_ int sd_bus_call(
if (r < 0)
return r;
+ i = bus->rqueue_size;
+
r = sd_bus_send(bus, m, &serial);
if (r < 0)
return r;
timeout = calc_elapse(usec);
- i = bus->rqueue_size;
for (;;) {
usec_t left;
- r = bus_read_message(bus);
- if (r < 0)
- return r;
-
while (i < bus->rqueue_size) {
sd_bus_message *incoming = NULL;
@@ -1660,24 +1657,13 @@ _public_ int sd_bus_call(
sd_bus_message_unref(incoming);
return 1;
- }
-
- if (incoming->header->type == SD_BUS_MESSAGE_METHOD_ERROR) {
- int k;
-
+ } else if (incoming->header->type == SD_BUS_MESSAGE_METHOD_ERROR)
r = sd_bus_error_copy(error, &incoming->error);
- if (r < 0) {
- sd_bus_message_unref(incoming);
- return r;
- }
-
- k = sd_bus_error_get_errno(&incoming->error);
- sd_bus_message_unref(incoming);
- return -k;
- }
+ else
+ r = -EIO;
sd_bus_message_unref(incoming);
- return -EIO;
+ return r;
} else if (incoming->header->serial == serial &&
bus->unique_name &&
@@ -1700,6 +1686,9 @@ _public_ int sd_bus_call(
i++;
}
+ r = bus_read_message(bus);
+ if (r < 0)
+ return r;
if (r > 0)
continue;
diff --git a/src/libsystemd-bus/test-bus-kernel.c b/src/libsystemd-bus/test-bus-kernel.c
index f970ca5..04dbc99 100644
--- a/src/libsystemd-bus/test-bus-kernel.c
+++ b/src/libsystemd-bus/test-bus-kernel.c
@@ -35,6 +35,7 @@ int main(int argc, char *argv[]) {
_cleanup_close_ int bus_ref = -1;
_cleanup_free_ char *bus_name = NULL, *address = NULL;
_cleanup_bus_message_unref_ sd_bus_message *m = NULL;
+ _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
const char *ua = NULL, *ub = NULL, *the_string = NULL;
sd_bus *a, *b;
int r, pipe_fds[2];
@@ -84,6 +85,10 @@ int main(int argc, char *argv[]) {
printf("unique b: %s\n", ub);
+ r = sd_bus_call_method(a, "this.doesnt.exist", "/foo", "meh.mah", "muh", &error, NULL, "s", "yayayay");
+ assert_se(sd_bus_error_has_name(&error, SD_BUS_ERROR_SERVICE_UNKNOWN));
+ assert_se(r == -EHOSTUNREACH);
+
r = sd_bus_add_match(b, "interface='waldo.com',member='Piep'", NULL, NULL);
assert_se(r >= 0);
commit 7adc46fcce257fcf4c83faa18b8c78f2a577e4f1
Author: Lennart Poettering <lennart at poettering.net>
Date: Sat Nov 30 00:19:01 2013 +0100
bus: don't generate NameAcquired/NameLost messages in the library
The signals appear entirely redundant due to NameOwnerChange, hence
don't do them in the new library, instead leave them for the
compatibility bridge only.
Also, set the serial number for synthesized messages to (uint32_t) -1.
diff --git a/src/libsystemd-bus/bus-internal.h b/src/libsystemd-bus/bus-internal.h
index 9c46a78..4881e04 100644
--- a/src/libsystemd-bus/bus-internal.h
+++ b/src/libsystemd-bus/bus-internal.h
@@ -295,10 +295,9 @@ int bus_ensure_running(sd_bus *bus);
int bus_start_running(sd_bus *bus);
int bus_next_address(sd_bus *bus);
-int bus_seal_message(sd_bus *b, sd_bus_message *m);
+int bus_seal_synthetic_message(sd_bus *b, sd_bus_message *m);
-int bus_rqueue_make_room(sd_bus *bus, unsigned n);
-int bus_rqueue_push(sd_bus *bus, sd_bus_message *m);
+int bus_rqueue_make_room(sd_bus *bus);
bool bus_pid_changed(sd_bus *bus);
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c
index 8a0f085..a8579c9 100644
--- a/src/libsystemd-bus/bus-kernel.c
+++ b/src/libsystemd-bus/bus-kernel.c
@@ -365,11 +365,7 @@ int bus_kernel_take_fd(sd_bus *b) {
/* the kernel told us the UUID of the underlying bus */
memcpy(b->server_id.bytes, hello.id128, sizeof(b->server_id.bytes));
- r = bus_start_running(b);
- if (r < 0)
- return r;
-
- return 1;
+ return bus_start_running(b);
}
int bus_kernel_connect(sd_bus *b) {
@@ -448,55 +444,18 @@ static int push_name_owner_changed(sd_bus *bus, const char *name, const char *ol
m->sender = "org.freedesktop.DBus";
- r = bus_seal_message(bus, m);
- if (r < 0)
- return r;
-
- r = bus_rqueue_push(bus, m);
+ r = bus_seal_synthetic_message(bus, m);
if (r < 0)
return r;
+ bus->rqueue[bus->rqueue_size++] = m;
m = NULL;
- return 1;
-}
-
-static int push_name_name_acquired(sd_bus *bus, const char *signal, const char *name) {
- _cleanup_bus_message_unref_ sd_bus_message *m = NULL;
- int r;
-
- assert(bus);
-
- r = sd_bus_message_new_signal(
- bus,
- "/org/freedesktop/DBus",
- "org.freedesktop.DBus",
- signal,
- &m);
-
- if (r < 0)
- return r;
-
- r = sd_bus_message_append(m, "ss", name);
- if (r < 0)
- return r;
- m->sender = "org.freedesktop.DBus";
-
- r = bus_seal_message(bus, m);
- if (r < 0)
- return r;
-
- r = bus_rqueue_push(bus, m);
- if (r < 0)
- return r;
-
- m = NULL;
return 1;
}
static int translate_name_change(sd_bus *bus, struct kdbus_msg *k, struct kdbus_item *d) {
char new_owner[UNIQUE_NAME_MAX], old_owner[UNIQUE_NAME_MAX];
- int r;
assert(bus);
assert(k);
@@ -505,19 +464,6 @@ static int translate_name_change(sd_bus *bus, struct kdbus_msg *k, struct kdbus_
if (d->name_change.flags != 0)
return 0;
- /* First generate NameAcquired/NameList messages */
- if (d->type == KDBUS_ITEM_NAME_ADD && d->name_change.new_id == bus->unique_id) {
- r = push_name_name_acquired(bus, "NameAcquired", d->name_change.name);
- if (r < 0)
- return r;
-
- } else if (d->type == KDBUS_ITEM_NAME_REMOVE && d->name_change.old_id == bus->unique_id) {
- r = push_name_name_acquired(bus, "NameLost", d->name_change.name);
- if (r < 0)
- return r;
- }
-
- /* Then, generate NameOwnerChanged messages */
if (d->type == KDBUS_ITEM_NAME_ADD)
old_owner[0] = 0;
else
@@ -566,15 +512,13 @@ static int translate_reply(sd_bus *bus, struct kdbus_msg *k, struct kdbus_item *
m->sender = "org.freedesktop.DBus";
- r = bus_seal_message(bus, m);
- if (r < 0)
- return r;
-
- r = bus_rqueue_push(bus, m);
+ r = bus_seal_synthetic_message(bus, m);
if (r < 0)
return r;
+ bus->rqueue[bus->rqueue_size++] = m;
m = NULL;
+
return 1;
}
@@ -877,12 +821,9 @@ static int bus_kernel_make_message(sd_bus *bus, struct kdbus_msg *k) {
m->kdbus = k;
m->release_kdbus = true;
m->free_fds = true;
-
fds = NULL;
- r = bus_rqueue_push(bus, m);
- if (r < 0)
- goto fail;
+ bus->rqueue[bus->rqueue_size++] = m;
return 1;
@@ -909,12 +850,7 @@ int bus_kernel_read_message(sd_bus *bus) {
assert(bus);
- /* Kernel messages might result in 2 new queued messages in
- * the worst case (NameOwnerChange and LostName for the same
- * well-known name, for example). Let's make room in
- * advance. */
-
- r = bus_rqueue_make_room(bus, 2);
+ r = bus_rqueue_make_room(bus);
if (r < 0)
return r;
diff --git a/src/libsystemd-bus/bus-socket.c b/src/libsystemd-bus/bus-socket.c
index 355f31c..d7d3b4d 100644
--- a/src/libsystemd-bus/bus-socket.c
+++ b/src/libsystemd-bus/bus-socket.c
@@ -900,6 +900,10 @@ static int bus_socket_make_message(sd_bus *bus, size_t size) {
assert(bus->rbuffer_size >= size);
assert(bus->state == BUS_RUNNING || bus->state == BUS_HELLO);
+ r = bus_rqueue_make_room(bus);
+ if (r < 0)
+ return r;
+
if (bus->rbuffer_size > size) {
b = memdup((const uint8_t*) bus->rbuffer + size,
bus->rbuffer_size - size);
@@ -925,11 +929,7 @@ static int bus_socket_make_message(sd_bus *bus, size_t size) {
bus->fds = NULL;
bus->n_fds = 0;
- r = bus_rqueue_push(bus, t);
- if (r < 0) {
- sd_bus_message_unref(t);
- return r;
- }
+ bus->rqueue[bus->rqueue_size++] = t;
return 1;
}
@@ -953,10 +953,6 @@ int bus_socket_read_message(sd_bus *bus) {
assert(bus);
assert(bus->state == BUS_RUNNING || bus->state == BUS_HELLO);
- r = bus_rqueue_make_room(bus, 1);
- if (r < 0)
- return r;
-
r = bus_socket_read_message_need(bus, &need);
if (r < 0)
return r;
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 8626595..0eb61c4 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1231,7 +1231,8 @@ _public_ int sd_bus_get_server_id(sd_bus *bus, sd_id128_t *server_id) {
return 0;
}
-int bus_seal_message(sd_bus *b, sd_bus_message *m) {
+static int bus_seal_message(sd_bus *b, sd_bus_message *m) {
+ assert(b);
assert(m);
if (m->header->version > b->message_version)
@@ -1248,6 +1249,24 @@ int bus_seal_message(sd_bus *b, sd_bus_message *m) {
return bus_message_seal(m, ++b->serial);
}
+int bus_seal_synthetic_message(sd_bus *b, sd_bus_message *m) {
+ assert(b);
+ assert(m);
+
+ if (m->header->version > b->message_version)
+ return -EPERM;
+
+ /* The bus specification says the serial number cannot be 0,
+ * hence let's fill something in for synthetic messages. Since
+ * synthetic messages might have a fake sender and we don't
+ * want to interfere with the real sender's serial numbers we
+ * pick a fixed, artifical one. We use (uint32_t) -1 rather
+ * than (uint64_t) -1 since dbus1 only had 32bit identifiers,
+ * even though kdbus can do 64bit. */
+
+ return bus_message_seal(m, 0xFFFFFFFFULL);
+}
+
static int bus_write_message(sd_bus *bus, sd_bus_message *message, size_t *idx) {
int r;
@@ -1308,11 +1327,11 @@ static int bus_read_message(sd_bus *bus) {
return bus_socket_read_message(bus);
}
-int bus_rqueue_make_room(sd_bus *bus, unsigned n) {
+int bus_rqueue_make_room(sd_bus *bus) {
sd_bus_message **q;
unsigned x;
- x = bus->rqueue_size + n;
+ x = bus->rqueue_size + 1;
if (bus->rqueue_allocated >= x)
return 0;
@@ -1330,21 +1349,6 @@ int bus_rqueue_make_room(sd_bus *bus, unsigned n) {
return 0;
}
-int bus_rqueue_push(sd_bus *bus, sd_bus_message *m) {
- int r;
-
- assert(bus);
- assert(m);
-
- r = bus_rqueue_make_room(bus, 1);
- if (r < 0)
- return r;
-
- bus->rqueue[bus->rqueue_size++] = m;
-
- return 0;
-}
-
static int dispatch_rqueue(sd_bus *bus, sd_bus_message **m) {
int r, ret = 0;
@@ -1820,7 +1824,7 @@ static int process_timeout(sd_bus *bus) {
m->sender = "org.freedesktop.DBus";
- r = bus_seal_message(bus, m);
+ r = bus_seal_synthetic_message(bus, m);
if (r < 0)
return r;
@@ -2112,7 +2116,7 @@ static int process_closing(sd_bus *bus, sd_bus_message **ret) {
if (r < 0)
return r;
- r = bus_seal_message(bus, m);
+ r = bus_seal_synthetic_message(bus, m);
if (r < 0)
return r;
@@ -2143,7 +2147,7 @@ static int process_closing(sd_bus *bus, sd_bus_message **ret) {
m->sender = "org.freedesktop.DBus.Local";
- r = bus_seal_message(bus, m);
+ r = bus_seal_synthetic_message(bus, m);
if (r < 0)
return r;
commit dff55e5db393af91e912e509aac349cff4786de3
Author: Lennart Poettering <lennart at poettering.net>
Date: Sat Nov 30 00:16:49 2013 +0100
build-sys: no longer rebuild various bits and pieces such as man pages each time the Makefile changes
We don't do this for .c files either, even they are also influence quite
a bit by makefile settings. Given that XSLT is a lot slower then the
rest of the build let's make our build a bit faster if people end up
touching the Makefile.
diff --git a/Makefile.am b/Makefile.am
index adf92c0..7a45029 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1041,35 +1041,35 @@ BUILT_SOURCES += \
src/shared/errno-from-name.h \
src/shared/errno-to-name.h
-src/shared/syscall-list.txt: Makefile
+src/shared/syscall-list.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include sys/syscall.h - < /dev/null | $(AWK) '/^#define[ \t]+__NR_[^ ]+[ \t]+[0-9(]/ { sub(/__NR_/, "", $$2); if ($$2 !~ /SYSCALL_BASE/) print $$2; }' > $@
-src/shared/syscall-from-name.gperf: src/shared/syscall-list.txt Makefile
+src/shared/syscall-from-name.gperf: src/shared/syscall-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct syscall_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, __NR_%s\n", $$1, $$1 }' < $< > $@
-src/shared/syscall-from-name.h: src/shared/syscall-from-name.gperf Makefile
+src/shared/syscall-from-name.h: src/shared/syscall-from-name.gperf
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_syscall -H hash_syscall_name -p -C < $< > $@
-src/shared/syscall-to-name.h: src/shared/syscall-list.txt Makefile
+src/shared/syscall-to-name.h: src/shared/syscall-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const syscall_names[] = { "} { printf "[SYSCALL_TO_INDEX(__NR_%s)] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
-src/shared/errno-list.txt: Makefile
+src/shared/errno-list.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include errno.h - < /dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+[0-9]/ { print $$2; }' > $@
-src/shared/errno-from-name.gperf: src/shared/errno-list.txt Makefile
+src/shared/errno-from-name.gperf: src/shared/errno-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct errno_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, %s\n", $$1, $$1 }' < $< > $@
-src/shared/errno-from-name.h: src/shared/errno-from-name.gperf Makefile
+src/shared/errno-from-name.h: src/shared/errno-from-name.gperf
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_errno -H hash_errno_name -p -C < $< > $@
-src/shared/errno-to-name.h: src/shared/errno-list.txt Makefile
+src/shared/errno-to-name.h: src/shared/errno-list.txt
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const errno_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, $$1 } END{print "};"}' < $< > $@
@@ -2395,17 +2395,17 @@ rootlibexec_PROGRAMS += \
noinst_LTLIBRARIES += \
libudev-core.la
-src/udev/keyboard-keys.txt: Makefile
+src/udev/keyboard-keys.txt:
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(CPP) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) -dM -include linux/input.h - < /dev/null | $(AWK) '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@
-src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt Makefile
+src/udev/keyboard-keys-from-name.gperf: src/udev/keyboard-keys.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print tolower(substr($$1 ,5)) ", " $$1 }' < $< > $@
-src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf Makefile
+src/udev/keyboard-keys-from-name.h: src/udev/keyboard-keys-from-name.gperf
$(AM_V_GPERF)$(GPERF) -L ANSI-C -t -N keyboard_lookup_key -H hash_key_name -p -C < $< > $@
-src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt Makefile
+src/udev/keyboard-keys-to-name.h: src/udev/keyboard-keys.txt
$(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@
libudev_core_la_SOURCES = \
@@ -4309,7 +4309,7 @@ dist_pkgpyexec_PYTHON = \
src/python-systemd/daemon.py \
src/python-systemd/__init__.py
-src/python-systemd/id128-constants.h: src/systemd/sd-messages.h Makefile
+src/python-systemd/id128-constants.h: src/systemd/sd-messages.h
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)$(SED) -n -r 's/,//g; s/#define (SD_MESSAGE_[A-Z0-9_]+)\s.*/add_id(m, "\1", \1) JOINER/p' <$< >$@
@@ -4397,28 +4397,28 @@ SED_PROCESS = \
$(SED) $(subst '|,-e 's|@,$(subst =,\@|,$(subst |',|g',$(substitutions)))) \
< $< > $@
-units/%: units/%.in Makefile
+units/%: units/%.in
$(SED_PROCESS)
-man/%: man/%.in Makefile
+man/%: man/%.in
$(SED_PROCESS)
-sysctl.d/%: sysctl.d/%.in Makefile
+sysctl.d/%: sysctl.d/%.in
$(SED_PROCESS)
-%.pc: %.pc.in Makefile
+%.pc: %.pc.in
$(SED_PROCESS)
-src/core/macros.%: src/core/macros.%.in Makefile
+src/core/macros.%: src/core/macros.%.in
$(SED_PROCESS)
-src/%.policy.in: src/%.policy.in.in Makefile
+src/%.policy.in: src/%.policy.in.in
$(SED_PROCESS)
-%.rules: %.rules.in Makefile
+%.rules: %.rules.in
$(SED_PROCESS)
-%.sh: %.sh.in Makefile
+%.sh: %.sh.in
$(SED_PROCESS)
$(AM_V_GEN)chmod +x $@
@@ -4430,11 +4430,11 @@ src/%: src/%.m4
$(AM_V_at)$(MKDIR_P) $(dir $@)
$(AM_V_M4)$(M4) -P $(M4_DEFINES) < $< > $@
-units/%: units/%.m4 Makefile
+units/%: units/%.m4
$(AM_V_M4)$(MKDIR_P) $(dir $@)
$(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_SYSTEM=1 < $< > $@
-units/user/%: units/%.m4 Makefile
+units/user/%: units/%.m4
$(AM_V_M4)$(MKDIR_P) $(dir $@)
$(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@
@@ -4457,7 +4457,7 @@ CLEANFILES += \
# ------------------------------------------------------------------------------
if ENABLE_MANPAGES
-man/custom-entities.ent: Makefile
+man/custom-entities.ent:
$(AM_V_GEN)$(MKDIR_P) $(dir $@)
$(AM_V_GEN)(echo '<?xml version="1.0" encoding="utf-8" ?>' && \
echo '$(subst '|,<!ENTITY ,$(subst =, ",$(subst |',">,$(substitutions))))') \
@@ -4755,38 +4755,32 @@ endef
test-libsystemd-bus-sym.c: \
src/libsystemd-bus/libsystemd-bus.sym \
src/systemd/sd-bus.h \
- src/systemd/sd-utf8.h \
- Makefile
+ src/systemd/sd-utf8.h
$(generate-sym-test)
test-libsystemd-daemon-sym.c: \
src/libsystemd-daemon/libsystemd-daemon.sym \
- src/systemd/sd-daemon.h \
- Makefile
+ src/systemd/sd-daemon.h
$(generate-sym-test)
test-libsystemd-id128-sym.c: \
src/libsystemd-id128/libsystemd-id128.sym \
- src/systemd/sd-id128.h \
- Makefile
+ src/systemd/sd-id128.h
$(generate-sym-test)
test-libsystemd-journal-sym.c: \
src/journal/libsystemd-journal.sym \
- src/systemd/sd-journal.h \
- Makefile
+ src/systemd/sd-journal.h
$(generate-sym-test)
test-libsystemd-login-sym.c: \
src/login/libsystemd-login.sym \
- src/systemd/sd-login.h \
- Makefile
+ src/systemd/sd-login.h
$(generate-sym-test)
test-libudev-sym.c: \
src/libudev/libudev.sym \
- src/udev/udev.h \
- Makefile
+ src/udev/udev.h
$(generate-sym-test)
test_libsystemd_bus_sym_SOURCES = \
More information about the systemd-commits
mailing list