View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000929 | Ecere SDK | buildsystem | public | 2013-06-03 03:26 | 2014-07-11 18:13 |
Reporter | redj | Assigned To | |||
Priority | immediate | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Summary | 0000929: crossplatform.mk's touch function for windows doesn't support special chars in the file name or in the path | ||||
Description | because for won't work with + in file name or even in parent directory name ah! I know how to fix & in project name, just need to quote it... I think this will occur with & as well and that's why & is currently forbidden in project name | ||||
Steps To Reproduce | mingw32-make reset | ||||
Additional Information | the problem at the command line (go into ecere/): cmd /c "for %I in ("res\mimeTypes\textC++Header.png" "res\mimeTypes\textC++Source.png" "res\mimeTypes\text.png") do @(echo . && echo -------- %I o%cd% o %~pI o %~nxI -------- && cd %~pI && echo !!! && type nul >> %~nxI && copy /by %~nxI+,, >nul 2>&1 && cd %cd%)" a proper variable expansion example: . -------- res\mimeTypes\textC++Header.png o C:\tmp\ecere-sdk\ecere o \tmp\ecere-sdk\ecere\res\mimeTypes\ o textC++Header.png -------- a bad one: . -------- res\mimeTypes\textC++Source.png o C:\tmp\ecere-sdk\ecere o \tmp\ecere-sdk\ecere\res\mimeTypes\res\mimeTypes\ o textC++Source.png -------- The system cannot find the path specified. this will remove the problem but the file names need to be restored by batch file variable expansion (not working in the following example) or something: cmd /c "for %I in ("res\mimeTypes\textC??Header.png" "res\mimeTypes\textC??Source.png" "res\mimeTypes\text.png") do @(echo . && echo -------- %I o%cd% o %~pI o %~nxI -------- && set varI=%~pI && echo %varI% && set varIf=%varI:?=+% && echo %varIf% && cd %~pI && echo !!! && type nul >> %~nxI && copy /by %~nxI+,, >nul 2>&1 && cd %cd%)" a debug version of the touch function to highlight the problem: touch = $(if $(1),@cmd /c "for %%I in ($(call sys_path,$(1))) do @(echo . && echo -------- %%I o %%cd%% o %%~pI o %%~nxI -------- && cd %%~pI && type nul >> %%~nxI && copy /by %%~nxI+,, >nul 2>&1 && cd %%cd%%)") current attempt to solve the problem by using character substitution in the touch implementation: escp_damn_chars = $(subst +,$(esc),$(subst &,^^&,$(1))) touch = $(if $(1),@cmd /c "for %%I in ($(call sys_path,$(1))) do @(echo . && echo -------- %%I o %%cd%% o %%~pI o %%~nxI -------- && set "varI=%%~pI" && echo "%%varI%%" && set "varIf=%%varI:$(esc)=+%%" && echo varIf == "%%varIf%%" && cd "%%varIf%%" && type nul >> %%~nxI && copy /by %%~nxI+,, >nul 2>&1 && cd %%cd%%)") something that might be useful if we need to pass quoted paths to commands that implement touch: quote_sys_path_list = "$(subst $(space),"$(space)",$(1))" a full make reset run on the sdk with the errors showing up: C:\tmp\ecere-sdk>mingw32-make reset Resetting all sources files date stamps for whole Ecere SDK... deps... Resetting all sources files date stamps for Dependencies... freetype... libpng... zlib... libjpeg... libungif... libffi... Done. ecere... The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. The system cannot find the path specified. mingw32-make[1]: *** [reset] Error 1 compiler... Resetting all sources files date stamps for whole Compiler... bootstrap... Resetting all sources files date stamps for Bootstrap... ecere... libec... ecp... ecc... ecs... Done. libec... ecp... ecc... ecs... Done. ear... Resetting all sources files date stamps for Ecere ARchiver (EAR)... extract... cmd... Done. epj2make... ide... documentor... eda... Resetting all sources files date stamps for Ecere Data Access (EDA)... libeda... sqlite... Done. | ||||
Tags | No tags attached. | ||||