mirror of
https://github.com/openharmony/third_party_fsverity-utils.git
synced 2026-07-13 13:23:11 -04:00
Makefile: generate libfsverity.pc during 'make install'
The current approach doesn't really work as expected because 'make && make PREFIX=/usr install' causes a rebuild due to PREFIX changing. Avoid this for now by generating libfsverity.pc during 'make install'. Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
/.build-config
|
||||
/fsverity
|
||||
/fsverity.sig
|
||||
/libfsverity.pc
|
||||
/run-tests.log
|
||||
/test_*
|
||||
cscope.*
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user