Skip to content

Commit 57cfd7d

Browse files
committed
Makefile: Make libkrun.pc target .PHONY and generate it on install
The install target should depend on generation of the libkrun.pc file, because it installs it. The libkrun.pc target should be .PHONY because libkrun.pc file might already exists and be generated, but it could be made using a different PREFIX, which would lead to the installed libkrun.pc pointing to the wrong prefix. Signed-off-by: Matej Hrica <mhrica@redhat.com>
1 parent f4963c8 commit 57cfd7d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ ifeq ($(PREFIX),)
7474
PREFIX := /usr/local
7575
endif
7676

77-
.PHONY: install clean $(LIBRARY_RELEASE_$(OS)) $(LIBRARY_DEBUG_$(OS))
77+
.PHONY: install clean $(LIBRARY_RELEASE_$(OS)) $(LIBRARY_DEBUG_$(OS)) libkrun.pc
7878

7979
all: $(LIBRARY_RELEASE_$(OS)) libkrun.pc
8080

@@ -124,7 +124,7 @@ libkrun.pc: libkrun.pc.in Makefile
124124
libkrun.pc.in > $@-t
125125
mv $@-t $@
126126

127-
install:
127+
install: libkrun.pc
128128
install -d $(DESTDIR)$(PREFIX)/$(LIBDIR_$(OS))/
129129
install -d $(DESTDIR)$(PREFIX)/$(LIBDIR_$(OS))/pkgconfig
130130
install -d $(DESTDIR)$(PREFIX)/include

0 commit comments

Comments
 (0)