* [ptxdist] how to escape $ in a rule ? @ 2014-06-20 13:05 marc doz 2014-06-20 13:08 ` Alexander Aring 2014-06-20 13:37 ` Michael Olbrich 0 siblings, 2 replies; 7+ messages in thread From: marc doz @ 2014-06-20 13:05 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 593 bytes --] Hello, I’m writing a recipe & I’m using install_copy & install_tree function in my recipe foo.make $(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$1.bar, /AAA/foo$1.bar) $(call install_tree, foo, 0, 0, 0755, $(FOO_DIR)/AAA/, /AAA/) I would like to avoid the substitution of $1 because the file name that I would like embed is really foo$1.bar & ptxdist try to copy foo.bar with install_copy & install_tree.. Do you know a way for escaping the $ ? $$ don’t seem work Thank you for your attention #ptxdist version 2012.03.0 Marc [-- Attachment #1.2: Type: text/html, Size: 1098 bytes --] [-- Attachment #2: Type: text/plain, Size: 48 bytes --] -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] how to escape $ in a rule ? 2014-06-20 13:05 [ptxdist] how to escape $ in a rule ? marc doz @ 2014-06-20 13:08 ` Alexander Aring 2014-06-20 13:15 ` marc doz 2014-06-20 13:37 ` Michael Olbrich 1 sibling, 1 reply; 7+ messages in thread From: Alexander Aring @ 2014-06-20 13:08 UTC (permalink / raw) To: ptxdist On Fri, Jun 20, 2014 at 03:05:43PM +0200, marc doz wrote: > Hello, > > > I’m writing a recipe & I’m using install_copy & install_tree function in my > recipe foo.make > > $(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$1.bar, > /AAA/foo$1.bar) > > $(call install_tree, foo, 0, 0, 0755, $(FOO_DIR)/AAA/, /AAA/) > > > I would like to avoid the substitution of $1 because the file name that I > would like embed is really foo$1.bar & ptxdist try to copy foo.bar with > install_copy & install_tree.. > > > Do you know a way for escaping the $ ? > > > $$ don’t seem work > does work \$ ? - Alex -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] how to escape $ in a rule ? 2014-06-20 13:08 ` Alexander Aring @ 2014-06-20 13:15 ` marc doz 0 siblings, 0 replies; 7+ messages in thread From: marc doz @ 2014-06-20 13:15 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 917 bytes --] Hello, no AAA/foo$1.bar give AAA/foo.bar no AAA/foo\$1.bar give AAA/foo\.bar Marc 2014-06-20 15:08 GMT+02:00 Alexander Aring <alex.aring@gmail.com>: > On Fri, Jun 20, 2014 at 03:05:43PM +0200, marc doz wrote: > > Hello, > > > > > > I’m writing a recipe & I’m using install_copy & install_tree function in > my > > recipe foo.make > > > > $(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$1.bar, > > /AAA/foo$1.bar) > > > > $(call install_tree, foo, 0, 0, 0755, $(FOO_DIR)/AAA/, /AAA/) > > > > > > I would like to avoid the substitution of $1 because the file name that I > > would like embed is really foo$1.bar & ptxdist try to copy foo.bar with > > install_copy & install_tree.. > > > > > > Do you know a way for escaping the $ ? > > > > > > $$ don’t seem work > > > > does work \$ ? > > - Alex > > -- > ptxdist mailing list > ptxdist@pengutronix.de > [-- Attachment #1.2: Type: text/html, Size: 2243 bytes --] [-- Attachment #2: Type: text/plain, Size: 48 bytes --] -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] how to escape $ in a rule ? 2014-06-20 13:05 [ptxdist] how to escape $ in a rule ? marc doz 2014-06-20 13:08 ` Alexander Aring @ 2014-06-20 13:37 ` Michael Olbrich 2014-06-20 13:52 ` marc doz 1 sibling, 1 reply; 7+ messages in thread From: Michael Olbrich @ 2014-06-20 13:37 UTC (permalink / raw) To: ptxdist Hi, On Fri, Jun 20, 2014 at 03:05:43PM +0200, marc doz wrote: > I’m writing a recipe & I’m using install_copy & install_tree function in my > recipe foo.make > > $(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$1.bar, > /AAA/foo$1.bar) > > $(call install_tree, foo, 0, 0, 0755, $(FOO_DIR)/AAA/, /AAA/) > > > I would like to avoid the substitution of $1 because the file name that I > would like embed is really foo$1.bar & ptxdist try to copy foo.bar with > install_copy & install_tree.. > > > Do you know a way for escaping the $ ? > > > $$ don’t seem work $(call install_copy, foo, 0, 0, 0755, -, /AAA/foo$$1.bar) should work, at least with the current ptxdist. I'm not sure about ptxdist-2012.03.0, that's rather old. What error do you get? Maybe you need to escape it again (for make or shell). Michael -- 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 ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] how to escape $ in a rule ? 2014-06-20 13:37 ` Michael Olbrich @ 2014-06-20 13:52 ` marc doz 2014-06-23 11:46 ` marc doz 0 siblings, 1 reply; 7+ messages in thread From: marc doz @ 2014-06-20 13:52 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 1556 bytes --] hello, Thanks but it don't work , I will prepare a test rule & a test package for monday in order to test the different solutions & I will publish the log regards marc 2014-06-20 15:37 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>: > Hi, > > On Fri, Jun 20, 2014 at 03:05:43PM +0200, marc doz wrote: > > I’m writing a recipe & I’m using install_copy & install_tree function in > my > > recipe foo.make > > > > $(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$1.bar, > > /AAA/foo$1.bar) > > > > $(call install_tree, foo, 0, 0, 0755, $(FOO_DIR)/AAA/, /AAA/) > > > > > > I would like to avoid the substitution of $1 because the file name that I > > would like embed is really foo$1.bar & ptxdist try to copy foo.bar with > > install_copy & install_tree.. > > > > > > Do you know a way for escaping the $ ? > > > > > > $$ don’t seem work > > $(call install_copy, foo, 0, 0, 0755, -, /AAA/foo$$1.bar) > > should work, at least with the current ptxdist. I'm not sure about > ptxdist-2012.03.0, that's rather old. What error do you get? Maybe you need > to escape it again (for make or shell). > > Michael > > -- > 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 > ptxdist@pengutronix.de > [-- Attachment #1.2: Type: text/html, Size: 2534 bytes --] [-- Attachment #2: Type: text/plain, Size: 48 bytes --] -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] how to escape $ in a rule ? 2014-06-20 13:52 ` marc doz @ 2014-06-23 11:46 ` marc doz 2014-06-23 13:20 ` Michael Olbrich 0 siblings, 1 reply; 7+ messages in thread From: marc doz @ 2014-06-23 11:46 UTC (permalink / raw) To: ptxdist [-- Attachment #1.1: Type: text/plain, Size: 7184 bytes --] 2014-06-20 15:52 GMT+02:00 marc doz <doz.marc@gmail.com>: > hello, > Thanks but it don't work , > > I will prepare a test rule & a test package for monday in order to test > the different solutions & I will publish the log > > regards > marc > > > > > 2014-06-20 15:37 GMT+02:00 Michael Olbrich <m.olbrich@pengutronix.de>: > > Hi, >> >> On Fri, Jun 20, 2014 at 03:05:43PM +0200, marc doz wrote: >> > I’m writing a recipe & I’m using install_copy & install_tree function >> in my >> > recipe foo.make >> > >> > $(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$1.bar, >> > /AAA/foo$1.bar) >> > >> > $(call install_tree, foo, 0, 0, 0755, $(FOO_DIR)/AAA/, /AAA/) >> > >> > >> > I would like to avoid the substitution of $1 because the file name that >> I >> > would like embed is really foo$1.bar & ptxdist try to copy foo.bar with >> > install_copy & install_tree.. >> > >> > >> > Do you know a way for escaping the $ ? >> > >> > >> > $$ don’t seem work >> >> $(call install_copy, foo, 0, 0, 0755, -, /AAA/foo$$1.bar) >> >> should work, at least with the current ptxdist. I'm not sure about >> ptxdist-2012.03.0, that's rather old. What error do you get? Maybe you >> need >> to escape it again (for make or shell). >> >> Michael >> >> -- >> 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 >> ptxdist@pengutronix.de >> > > hello, please find the test results : regularFile -> regularFile foo$1.bar -> foo.bar foo\$1.bar -> foo\.bar foo$$1.bar -> foo.bar foo\$\$1.bar -> foo\.bar foo$\$1 ->foo.bar 'foo$1.bar' -> foo.bar 'foo\$1.bar' -> foo.bar 'foo$$1.bar' -> foo.bar 'foo\$\$1.bar' -> foo.bar 'foo$\$1.bar' -> foo.bar Test package ( foo-0.1.tar): diff -Naur foo/AAA/foo$1.bar foo-0.1/AAA/foo$1.bar --- foo/AAA/foo$1.bar 1970-01-01 01:00:00.000000000 +0100 +++ foo-0.1/AAA/foo$1.bar 2014-06-23 11:16:53.757159549 +0200 @@ -0,0 +1 @@ +foo$1.bar diff -Naur foo/AAA/regularFile foo-0.1/AAA/regularFile --- foo/AAA/regularFile 1970-01-01 01:00:00.000000000 +0100 +++ foo-0.1/AAA/regularFile 2014-06-23 11:18:10.725160705 +0200 @@ -0,0 +1 @@ +regularFile ptdist rules foo.make : PACKAGES-$(PTXCONF_FOO) += foo FOO_VERSION := 0.1 FOO_MD5 := 6c45d1d62dc7beafecdd0362e40b95de FOO := foo-$(FOO_VERSION) FOO_SUFFIX := tar FOO_URL := FOO_SOURCE := $(SRCDIR)/$(FOO).$(FOO_SUFFIX) FOO_DIR := $(BUILDDIR)/$(FOO) FOO_LICENSE := unknown $(STATEDIR)/foo.compile: @$(call targetinfo) # do nothing @$(call touch) $(STATEDIR)/foo.install: @$(call targetinfo) # do nothing @$(call touch) $(STATEDIR)/foo.targetinstall: @$(call targetinfo) @$(call install_init, foo) @$(call install_fixup, foo,PRIORITY,optional) @$(call install_fixup, foo,SECTION,base) @$(call install_fixup, foo,AUTHOR,"marc") @$(call install_fixup, foo,DESCRIPTION,missing) # @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/regularFile , /AAA/regularFile) # @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$1.bar , /AAA/foo$1.bar) @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo\$1.bar , /AAA/foo\$1.bar) # @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$$1.bar , /AAA/foo$$1.bar) # @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo\$\$1.bar , /AAA/foo\$\$1.bar) # @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$\$1.bar , /AAA/foo$\$1.bar) # @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/foobar, /dev/null) @$(call install_finish, foo) @$(call touch) # vim: syntax=make foo.in : ## SECTION=project_specific config FOO tristate prompt "foo" help FIXME these error messages are printed during tests : A) @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/regularFile , /AAA/regularFile) install file: src=BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/regularFile dst=/AAA/regularFile owner=0 group=0 permissions=0755 B) @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$1.bar , /AAA/foo$1.bar) No suitable file '/AAA/foo.bar' could be found in any of these locations: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar.phyFLEX-i.MX6 /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar install file: src=BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar dst=/AAA/foo.bar owner=0 group=0 permissions=0755 Error: file not found: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar C) @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo\$1.bar , /AAA/foo\$1.bar) No suitable file '/AAA/foo\.bar' could be found in any of these locations: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo\.bar.phyFLEX-i.MX6 /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo\.bar install file: src=BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo\.bar dst=/AAA/foo\.bar owner=0 group=0 permissions=0755 Error: file not found: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo\.bar D) @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$$1.bar , /AAA/foo$$1.bar) No suitable file '/AAA/foo.bar' could be found in any of these locations: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar.phyFLEX-i.MX6 /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar install file: src=BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar dst=/AAA/foo.bar owner=0 group=0 permissions=0755 Error: file not found: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar E) @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo\$\$1.bar , /AAA/foo\$\$1.bar) No suitable file '/AAA/foo\.bar' could be found in any of these locations: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo\.bar.phyFLEX-i.MX6 /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo\.bar install file: src=BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo\.bar dst=/AAA/foo\.bar owner=0 group=0 permissions=0755 Error: file not found: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo\.bar Error: install_file failed! F) @$(call install_copy, foo, 0, 0, 0755, $(FOO_DIR)/AAA/foo$\$1.bar , /AAA/foo$\$1.bar) No suitable file '/AAA/foo.bar' could be found in any of these locations: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar.phyFLEX-i.MX6 /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar install file: src=BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar dst=/AAA/foo.bar owner=0 group=0 permissions=0755 Error: file not found: /home/mdoz/BSP/platform-phyFLEX-i.MX6/build-target/foo-0.1/AAA/foo.bar regards, Marc [-- Attachment #1.2: Type: text/html, Size: 12460 bytes --] [-- Attachment #2: foo-0.1.tar --] [-- Type: application/x-tar, Size: 10240 bytes --] [-- Attachment #3: Type: text/plain, Size: 48 bytes --] -- ptxdist mailing list ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ptxdist] how to escape $ in a rule ? 2014-06-23 11:46 ` marc doz @ 2014-06-23 13:20 ` Michael Olbrich 0 siblings, 0 replies; 7+ messages in thread From: Michael Olbrich @ 2014-06-23 13:20 UTC (permalink / raw) To: ptxdist On Mon, Jun 23, 2014 at 01:46:56PM +0200, marc doz wrote: > regularFile -> regularFile > foo$1.bar -> foo.bar > foo\$1.bar -> foo\.bar > foo$$1.bar -> foo.bar > foo\$\$1.bar -> foo\.bar > foo$\$1 ->foo.bar > 'foo$1.bar' -> foo.bar > 'foo\$1.bar' -> foo.bar > 'foo$$1.bar' -> foo.bar > 'foo\$\$1.bar' -> foo.bar > 'foo$\$1.bar' -> foo.bar You need $$ for make and quotes (') for the shell: @$(call install_copy, foo, 0, 0, 0755, '$(FOO_DIR)/AAA/foo$$1.bar' , '/AAA/foo$$1.bar') For newer ptxdist versions you probably need to remove the quotes. Michael -- 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 ptxdist@pengutronix.de ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-23 13:20 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-06-20 13:05 [ptxdist] how to escape $ in a rule ? marc doz 2014-06-20 13:08 ` Alexander Aring 2014-06-20 13:15 ` marc doz 2014-06-20 13:37 ` Michael Olbrich 2014-06-20 13:52 ` marc doz 2014-06-23 11:46 ` marc doz 2014-06-23 13:20 ` Michael Olbrich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox