klipper icon indicating copy to clipboard operation
klipper copied to clipboard

`make menuconfig` not works if the parent directory contains spaces

Open sl1pkn07 opened this issue 2 years ago • 20 comments

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

sl1pkn07 avatar Aug 11 '22 22:08 sl1pkn07

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.

github-actions[bot] avatar Sep 16 '22 00:09 github-actions[bot]

ping

sl1pkn07 avatar Sep 16 '22 13:09 sl1pkn07

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.

github-actions[bot] avatar Oct 22 '22 00:10 github-actions[bot]

ping

sl1pkn07 avatar Oct 22 '22 06:10 sl1pkn07

The best solution probably use “-” to replace space.

Neko-vecter avatar Nov 09 '22 16:11 Neko-vecter

or embrace " " the paths

sl1pkn07 avatar Nov 10 '22 14:11 sl1pkn07

Send a PR?

Sineos avatar Nov 10 '22 16:11 Sineos

seems involved python scripts, so no, i cant. sorry

greetings

sl1pkn07 avatar Nov 10 '22 17:11 sl1pkn07

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.

github-actions[bot] avatar Dec 16 '22 00:12 github-actions[bot]

ping

sl1pkn07 avatar Dec 16 '22 14:12 sl1pkn07

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

Neko-vecter avatar Dec 16 '22 16:12 Neko-vecter

Make and menuconfig both struggle with spaces. This is not a Klipper problem IMO.

djessup avatar Jan 20 '23 04:01 djessup

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.

github-actions[bot] avatar Feb 24 '23 12:02 github-actions[bot]

ping

sl1pkn07 avatar Feb 24 '23 12:02 sl1pkn07

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.

Neko-vecter avatar Feb 28 '23 03:02 Neko-vecter

https://github.com/ulfalizer/Kconfiglib/issues/125

Which means you need to go to Kconfiglib and open an issue.

done

sl1pkn07 avatar Feb 28 '23 09:02 sl1pkn07

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.

github-actions[bot] avatar Apr 04 '23 12:04 github-actions[bot]

ping again

sl1pkn07 avatar Apr 04 '23 12:04 sl1pkn07

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

sl1pkn07 avatar Apr 13 '23 01:04 sl1pkn07

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.

github-actions[bot] avatar May 19 '23 00:05 github-actions[bot]