Skip to content

Commit 11f8cb8

Browse files
yu-chen-surfrafaeljw
authored andcommitted
ACPI: tools: Fix compilation when output directory is not present
Compiling the ACPI tools when output directory parameter is specified, but the output directory is not present, triggers the following error: make O=/data/test/tmp/ -C tools/power/acpi/ make: Entering directory '/data/src/kernel/linux/tools/power/acpi' DESCEND tools/acpidbg make[1]: Entering directory '/data/src/kernel/linux/tools/power/acpi/tools/acpidbg' MKDIR include CP include CC tools/acpidbg/acpidbg.o Assembler messages: Fatal error: can't create /data/test/tmp/tools/power/acpi/tools/acpidbg/acpidbg.o: No such file or directory make[1]: *** [../../Makefile.rules:24: /data/test/tmp/tools/power/acpi/tools/acpidbg/acpidbg.o] Error 1 make[1]: Leaving directory '/data/src/kernel/linux/tools/power/acpi/tools/acpidbg' make: *** [Makefile:18: acpidbg] Error 2 make: Leaving directory '/data/src/kernel/linux/tools/power/acpi' which occurs because the output directory has not been created yet. Fix this issue by creating the output directory before compiling. Reported-by: Andy Shevchenko <[email protected]> Signed-off-by: Chen Yu <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> [ rjw: New subject, changelog edits ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 0fcfb00 commit 11f8cb8

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

tools/power/acpi/Makefile.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ KERNEL_INCLUDE := $(OUTPUT)include
6969
ACPICA_INCLUDE := $(srctree)/../../../drivers/acpi/acpica
7070
CFLAGS += -D_LINUX -I$(KERNEL_INCLUDE) -I$(ACPICA_INCLUDE)
7171
CFLAGS += $(WARNINGS)
72+
MKDIR = mkdir
7273

7374
ifeq ($(strip $(V)),false)
7475
QUIET=@

tools/power/acpi/Makefile.rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ $(KERNEL_INCLUDE):
2121

2222
$(objdir)%.o: %.c $(KERNEL_INCLUDE)
2323
$(ECHO) " CC " $(subst $(OUTPUT),,$@)
24+
$(QUIET) $(MKDIR) -p $(objdir) 2>/dev/null
2425
$(QUIET) $(CC) -c $(CFLAGS) -o $@ $<
2526

2627
all: $(OUTPUT)$(TOOL)

0 commit comments

Comments
 (0)