klipper
klipper copied to clipboard
`make menuconfig` not works if the parent directory contains spaces
if the parent directory contains spaces, make menuconfig
fails
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[/media/COSAS/aplicaciones/Creality Ender 3/klipper]|
└───╼ make menuconfig
No change to configuration in '/media/COSAS/aplicaciones/Creality Ender 3/klipper/.config'
Loaded configuration '/media/COSAS/aplicaciones/Creality Ender 3/klipper/.config'
---snip----
but if move the main directory to one without spaces:
┌─┤[$]|[sl1pkn07]|[sL1pKn07]|[/media/COSAS/aplicaciones/klipper]|
└───╼ make menuconfig
(Top)
Klipper Firmware Configuration
[ ] Enable extra low-level configuration options
Micro-controller Architecture (Atmega AVR) --->
Processor model (atmega2560) --->
[Space/Enter] Toggle/enter [?] Help [/] Search
[Q] Quit (prompts for save) [ESC] Leave menu
start works
greetings
Hello,
It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.
Best regards,
~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
ping
Hello,
It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.
Best regards,
~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
ping
The best solution probably use “-” to replace space.
or embrace " " the paths
Send a PR?
seems involved python scripts, so no, i cant. sorry
greetings
Hello,
It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.
Best regards,
~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
ping
I think this error is caused by menuconfig instead of klipper.
More info in https://wiki.st.com/stm32mpu/wiki/Menuconfig_or_how_to_configure_kernel
Make and menuconfig both struggle with spaces. This is not a Klipper problem IMO.
Hello,
It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.
Best regards,
~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
ping
I checked the section on make menuconfig
code. This is part of Kconfiglib library.
Which means you need to go to Kconfiglib and open an issue.
https://github.com/ulfalizer/Kconfiglib/issues/125
Which means you need to go to Kconfiglib and open an issue.
done
Hello,
It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.
Best regards,
~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
ping again
patch (tnks bing chat gpt)
diff --git a/Makefile b/Makefile
index 10615726..4086b6f5 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,12 @@ OUT=out/
export KCONFIG_CONFIG := $(CURDIR)/.config
-include $(KCONFIG_CONFIG)
+# Handle path with spaces
+null :=
+SPACE := $(null) $(null)
+ESC_SPACE := $(null)\ $(null)
+ESC_KCONFIG_CONFIG = $(subst $(SPACE),$(ESC_SPACE),$(KCONFIG_CONFIG))
+
# Common command definitions
CC=$(CROSS_PREFIX)gcc
AS=$(CROSS_PREFIX)as
@@ -90,13 +96,13 @@ create-board-link:
$(Q)mkdir -p $(addprefix $(OUT), $(dirs-y))
$(Q)rm -f $(OUT)*.d $(patsubst %,$(OUT)%/*.d,$(dirs-y))
$(Q)rm -f $(OUT)board
- $(Q)ln -sf $(CURDIR)/src/$(CONFIG_BOARD_DIRECTORY) $(OUT)board
+ $(Q)ln -sf "$(CURDIR)/src/$(CONFIG_BOARD_DIRECTORY)" $(OUT)board
$(Q)mkdir -p $(OUT)board-generic
$(Q)rm -f $(OUT)board-generic/board
- $(Q)ln -sf $(CURDIR)/src/generic $(OUT)board-generic/board
+ $(Q)ln -sf "$(CURDIR)/src/generic" $(OUT)board-generic/board
# Hack to rebuild OUT directory and reload make dependencies on Kconfig change
-$(OUT)board-link: $(KCONFIG_CONFIG)
+$(OUT)board-link: $(ESC_KCONFIG_CONFIG)
$(Q)mkdir -p $(OUT)
$(Q)echo "# Makefile board-link rule" > $@
$(Q)$(MAKE) create-board-link
@@ -104,12 +110,12 @@ include $(OUT)board-link
################ Kconfig rules
-$(OUT)autoconf.h: $(KCONFIG_CONFIG)
+$(OUT)autoconf.h: $(ESC_KCONFIG_CONFIG)
@echo " Building $@"
$(Q)mkdir -p $(OUT)
$(Q) KCONFIG_AUTOHEADER=$@ $(PYTHON) lib/kconfiglib/genconfig.py src/Kconfig
-$(KCONFIG_CONFIG) olddefconfig: src/Kconfig
+$(ESC_KCONFIG_CONFIG) olddefconfig: src/Kconfig
$(Q)$(PYTHON) lib/kconfiglib/olddefconfig.py src/Kconfig
menuconfig:
is possible do it better, but is not my business. anyone can test? is push PR, actions/CI cant test it?
greetings
EDIT: beter patch, now only incolves the modification only the makefile
Hello,
It looks like there hasn't been any recent updates on this Klipper github issue. If you created this issue and no longer consider it open, then please login to github and close the issue. Otherwise, if there is no further activity on this thread then it will be automatically closed in a few days.
Best regards,
~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.