Skip to contentSkip to conversation

tools/libxl: Correct static pattern rule for pkgconfig files

PATCH In review Andrew Cooper 2 participants 2 messages Jan 27, 2015 – Jan 28, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/libxl: Correct static pattern rule for pkgconfig files

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 [email protected] where $< should have been used, but lacked any dependency between a $FOO.pc and its .in source file.

CC Ian Campbell <[email protected]>
CC Ian Jackson <[email protected]>
CC Wei Liu <[email protected]>
---
 tools/libxl/Makefile |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libxl/Makefile +2 -2
index 5df4970..7329521 100644
@@ -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' < [email protected] > [email protected]
+$(PKG_CONFIG): % : %.in Makefile
+	@sed -e 's/@@version@@/$(MAJOR).$(MINOR)/g' < $< > [email protected]
 	@mv -f [email protected] $@
 
 .PHONY: install
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 11 lines · Andrew Cooper

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.

Quoted 7 lines

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

CC Ian Campbell <[email protected]>
CC Ian Jackson <[email protected]>
CC Wei Liu <[email protected]>

Acked + applied, thanks.