diff --git a/.gitignore b/.gitignore index f241973..04f9a6f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ /.build-config /fsverity /fsverity.sig -/libfsverity.pc /run-tests.log /test_* cscope.* diff --git a/Makefile b/Makefile index 6c6c8c9..6b82bca 100644 --- a/Makefile +++ b/Makefile @@ -70,10 +70,6 @@ PKGCONF ?= pkg-config echo 'LDFLAGS=$(LDFLAGS)'; \ echo 'LDLIBS=$(LDLIBS)'; \ echo 'USE_SHARED_LIB=$(USE_SHARED_LIB)'; \ - echo 'PREFIX=$(PREFIX)'; \ - echo 'LIBDIR=$(LIBDIR)'; \ - echo 'INCDIR=$(INCDIR)'; \ - echo 'BINDIR=$(BINDIR)'; \ ); \ if [ "$$flags" != "`cat $@ 2>/dev/null`" ]; then \ [ -e $@ ] && echo "Rebuilding due to new settings"; \ @@ -131,15 +127,6 @@ libfsverity.so:libfsverity.so.$(SOVERSION) DEFAULT_TARGETS += libfsverity.so -# Create the pkg-config file -libfsverity.pc: lib/libfsverity.pc.in .build-config - $(QUIET_GEN) sed -e "s|@PREFIX@|$(PREFIX)|" \ - -e "s|@LIBDIR@|$(LIBDIR)|" \ - -e "s|@INCDIR@|$(INCDIR)|" \ - $< > $@ - -DEFAULT_TARGETS += libfsverity.pc - ############################################################################## #### Programs @@ -216,8 +203,12 @@ install:all install -m644 libfsverity.a $(DESTDIR)$(LIBDIR) install -m755 libfsverity.so.$(SOVERSION) $(DESTDIR)$(LIBDIR) ln -sf libfsverity.so.$(SOVERSION) $(DESTDIR)$(LIBDIR)/libfsverity.so - install -m644 libfsverity.pc $(DESTDIR)$(LIBDIR)/pkgconfig - install -m644 include/libfsverity.h $(DESTDIR)$(INCDIR) + sed -e "s|@PREFIX@|$(PREFIX)|" \ + -e "s|@LIBDIR@|$(LIBDIR)|" \ + -e "s|@INCDIR@|$(INCDIR)|" \ + lib/libfsverity.pc.in \ + > $(DESTDIR)$(LIBDIR)/pkgconfig/libfsverity.pc + chmod 644 $(DESTDIR)$(LIBDIR)/pkgconfig/libfsverity.pc uninstall: rm -f $(DESTDIR)$(BINDIR)/fsverity