All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/libxl: Correct static pattern rule for pkgconfig files
@ 2015-01-27 20:34 Andrew Cooper
  2015-01-28 10:23 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cooper @ 2015-01-27 20:34 UTC (permalink / raw)
  To: Xen-devel; +Cc: Andrew Cooper, Ian Jackson, Ian Campbell, Wei Liu

Attempting to build libxl causes Make to emit the following warnings

andrewcoop@andrewcoop:xen.git$ make -C tools/libxl all
...
Makefile:253: target `xenlight.pc' doesn't match the target pattern
Makefile:253: target `xlutil.pc' doesn't match the target pattern
...

because the static pattern rule is malformed.  'Makefile' as the only
prereq-pattern does not contain a pattern.

The rule ends up working because of the use of $@.in where $< should have been
used, but lacked any dependency between a $FOO.pc and its .in source file.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxl/Makefile |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 5df4970..7329521 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -250,8 +250,8 @@ libxl-save-helper: $(SAVE_HELPER_OBJS) libxenlight.so
 testidl: testidl.o libxlutil.so libxenlight.so
 	$(CC) $(LDFLAGS) -o $@ testidl.o libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
 
-$(PKG_CONFIG): %.in : Makefile
-	@sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < $@.in > $@.new
+$(PKG_CONFIG): % : %.in Makefile
+	@sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < $< > $@.new
 	@mv -f $@.new $@
 
 .PHONY: install
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tools/libxl: Correct static pattern rule for pkgconfig files
  2015-01-27 20:34 [PATCH] tools/libxl: Correct static pattern rule for pkgconfig files Andrew Cooper
@ 2015-01-28 10:23 ` Ian Campbell
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2015-01-28 10:23 UTC (permalink / raw)
  To: Andrew Cooper; +Cc: Wei Liu, Ian Jackson, Xen-devel

On Tue, 2015-01-27 at 20:34 +0000, Andrew Cooper wrote:
> Attempting to build libxl causes Make to emit the following warnings
> 
> andrewcoop@andrewcoop:xen.git$ make -C tools/libxl all
> ...
> Makefile:253: target `xenlight.pc' doesn't match the target pattern
> Makefile:253: target `xlutil.pc' doesn't match the target pattern
> ...
> 
> because the static pattern rule is malformed.  'Makefile' as the only
> prereq-pattern does not contain a pattern.
> 
> The rule ends up working because of the use of $@.in where $< should have been
> used, but lacked any dependency between a $FOO.pc and its .in source file.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> CC: Ian Campbell <Ian.Campbell@citrix.com>
> CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
> CC: Wei Liu <wei.liu2@citrix.com>

Acked + applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-28 10:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 20:34 [PATCH] tools/libxl: Correct static pattern rule for pkgconfig files Andrew Cooper
2015-01-28 10:23 ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.