diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2023-08-01 10:16:17 -0700 |
---|---|---|
committer | Konstantin Pavlov <thresh@nginx.com> | 2023-08-01 10:16:17 -0700 |
commit | ebcc92069d6b4f59a3ab39d66649f5c3c0e6a768 (patch) | |
tree | 9ad5b903ac3f0acea1723c557b619677e76a8ebd /auto/make | |
parent | 47ff51009fa05d83bb67cd5db16829ab4c0081d7 (diff) | |
download | unit-ebcc92069d6b4f59a3ab39d66649f5c3c0e6a768.tar.gz unit-ebcc92069d6b4f59a3ab39d66649f5c3c0e6a768.tar.bz2 |
Added unit pkg-config file.
Diffstat (limited to 'auto/make')
-rw-r--r-- | auto/make | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -94,7 +94,9 @@ $NXT_BUILD_DIR/lib/$NXT_LIB_SHARED: \$(NXT_LIB_OBJS) $NXT_BUILD_DIR/lib/$NXT_LIB_STATIC: \$(NXT_LIB_OBJS) $NXT_STATIC_LINK \$@ \$(NXT_LIB_OBJS) -$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS) +$NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC: \$(NXT_LIB_UNIT_OBJS) \\ + $NXT_BUILD_DIR/share/pkgconfig/unit.pc \\ + $NXT_BUILD_DIR/share/pkgconfig/unit-uninstalled.pc $NXT_STATIC_LINK \$@ \$(NXT_LIB_UNIT_OBJS) END @@ -397,6 +399,10 @@ libunit-install: $NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC || install -d \$(DESTDIR)$NXT_LIBDIR install -p -m u=rw,go=r $NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC \ \$(DESTDIR)$NXT_LIBDIR/ + test -d \$(DESTDIR)$NXT_PKGCONFIGDIR \ + || install -d \$(DESTDIR)$NXT_PKGCONFIGDIR + install -p -m u=rw,go=r $NXT_BUILD_DIR/share/pkgconfig/unit.pc \ + \$(DESTDIR)$NXT_PKGCONFIGDIR/ test -d \$(DESTDIR)$NXT_INCLUDEDIR \ || install -d \$(DESTDIR)$NXT_INCLUDEDIR install -p -m u=rw,go=r src/nxt_unit.h \ @@ -414,6 +420,8 @@ libunit-install: $NXT_BUILD_DIR/lib/$NXT_LIB_UNIT_STATIC libunit-uninstall: rm -f \$(DESTDIR)$NXT_LIBDIR/$NXT_LIB_UNIT_STATIC @rmdir -p \$(DESTDIR)$NXT_LIBDIR 2>/dev/null || true + rm -f \$(DESTDIR)$NXT_PKGCONFIGDIR/unit.pc + @rmdir -p \$(DESTDIR)$NXT_PKGCONFIGDIR 2>/dev/null || true rm -f \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit.h \ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_field.h \ \$(DESTDIR)$NXT_INCLUDEDIR/nxt_unit_request.h \ @@ -428,6 +436,31 @@ libunit-uninstall: END +# pkg-config files + +cat << END >> $NXT_MAKEFILE + +$NXT_BUILD_DIR/share/pkgconfig/unit.pc: src/unit.pc.in + sed -e "s|@PREFIX@|$NXT_PREFIX|" \\ + -e "s|@LIBDIR@|$NXT_LIBDIR|" \\ + -e "s|@CFLAGS@|-I$NXT_INCLUDEDIR|" \\ + -e "s|@VERSION@|\$(NXT_VERSION)|" \\ + -e "s|@EXTRA_LIBS@|$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS|" \\ + -e "s|@CONFARGS@|$(echo $NXT_CONFIGURE_OPTIONS | sed -e 's| -pie||' -e 's| --njs||')|" \\ + -e "s|@MODULESDIR@|$NXT_MODULESDIR|" \\ + < src/unit.pc.in > \$@ + +$NXT_BUILD_DIR/share/pkgconfig/unit-uninstalled.pc: src/unit.pc.in + sed -e "s|@PREFIX@|$(pwd)/$NXT_BUILD_DIR|" \\ + -e "s|@LIBDIR@|$(pwd)/$NXT_BUILD_DIR/lib|" \\ + -e "s|@CFLAGS@|-I$(pwd)/src -I$(pwd)$NXT_BUILD_DIR/include|" \\ + -e "s|@VERSION@|\$(NXT_VERSION)|" \\ + -e "s|@EXTRA_LIBS@|$NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS|" \\ + -e "s|@CONFARGS@|$(echo $NXT_CONFIGURE_OPTIONS | sed -e 's| -pie||' -e 's| --njs||')|" \\ + < src/unit.pc.in > \$@ + +END + # Makefile. # *.dSYM is MacOSX Clang debug information. |