OSDN Git Service

build-sys hack: ensure target directory is there
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 27 Aug 2019 17:57:39 +0000 (21:57 +0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 21 Aug 2020 10:18:35 +0000 (06:18 -0400)
By removing some unnest-vars calls, we miss some directory creation
that may be required by some/dir/object.d.

This will go away once everything is converted to Meson.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rules.mak

index 694865b..56ba540 100644 (file)
--- a/rules.mak
+++ b/rules.mak
@@ -66,6 +66,7 @@ expand-objs = $(strip $(sort $(filter %.o,$1)) \
                   $(filter-out %.o %.mo,$1))
 
 %.o: %.c
+       @mkdir -p $(dir $@)
        $(call quiet-command,$(CC) $(QEMU_LOCAL_INCLUDES) $(QEMU_INCLUDES) \
               $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) \
               -c -o $@ $<,"CC","$(TARGET_DIR)$@")