Hi,
On Fri, Feb 25, 2011 at 04:38:33PM +0100, Benoît Burnichon wrote:
> I have an issue when dropping and trying to reinstall a package.
>
> XXXX.deps:75: *** unterminated call to function `wildcard': missing `)'. Stop
>
> Looking at the files inside this XXXX package, there is one with a filename
> containing spaces and just an opening parenthesis.
>
> $(PTXDIST_WORKSPACE)/platform-XXXX/state/XXXX.targetinstall: $(wildcard
> $(PTXDIST_WORKSPACE)/local_src/XXXX/samples/images/backgrounds/background
> black (inner glow 24.png)
>
> The faulty file is "background black (inner glow 24.png"
>
> A solution would be to enclose the wildcard with double quotes. Ie:
> $(wildcard
> "$(PTXDIST_WORKSPACE)/local_src/XXXX/samples/images/backgrounds/background
> black (inner glow 24.png")
That doesn't work here. And the problem is alot worse. Having '(' or ')' in
a make is not possible, so we need to replace it. And whitespaces are a
problem too: in 'wildcard' and later in the dependency...
Try this patch.
I'm not sure what the best fix is. This is really ugly and won't work with
all filenames. We'd need to quote '*' etc. too.
Perhaps we can disable dependency generation with:
<PKG>_TARGETINSTALL_DEPS := NO
or something like that.
Michael
----------------------->8-------------------------------------------
diff --git a/rules/other/Definitions.make b/rules/other/Definitions.make
index da61322..2e75350 100644
--- a/rules/other/Definitions.make
+++ b/rules/other/Definitions.make
@@ -43,6 +43,8 @@ comma :=,
nullstring :=
space :=$(nullstring) $(nullstring)
quote :="#"
+lparen :=(
+rparen :=)
define remove_quotes
$(strip $(subst $(quote),,$(1)))
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh
b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 1947410..53893d9 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -83,7 +83,12 @@ ptxd_install_setup_src() {
# Since the dependency to the source files is dynamic we store
# the dependency information in a dependency file that can be
# included in the make files itself.
- deprule="${ptx_state_dir}/${pkg_stamp}: \$(wildcard ${src})"
+ wsrc="${src//\(/((}"
+ wsrc="${wsrc//\)/))}"
+ wsrc="${wsrc//\(\(/\$(lparen)}"
+ wsrc="${wsrc//\)\)/\$(rparen)}"
+ wsrc="${wsrc// /\\ }"
+ deprule="${ptx_state_dir}/${pkg_stamp}: \$(subst \$(space),\\
,\$(wildcard ${wsrc}))"
# Make the deps rule robust for varying installation paths, and
# make the deps rules file more readable.
----------------------->8-------------------------------------------
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
[email protected]