Skip to content

Commit

Permalink
[glibutil] Housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed May 29, 2020
1 parent fd046fc commit b9ebf5b
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions Makefile
Expand Up @@ -217,6 +217,20 @@ $(RELEASE_STATIC_LIB): $(RELEASE_OBJS)
$(COVERAGE_STATIC_LIB): $(COVERAGE_OBJS)
$(AR) rc $@ $?

#
# LIBDIR usually gets substituted with arch specific dir.
# It's relative in deb build and can be whatever in rpm build.
#

LIBDIR ?= usr/lib
ABS_LIBDIR := $(shell echo /$(LIBDIR) | sed -r 's|/+|/|g')

$(PKGCONFIG): $(LIB_NAME).pc.in Makefile
sed -e 's|@version@|$(PCVERSION)|g' -e 's|@libdir@|$(ABS_LIBDIR)|g' $< > $@

debian/%.install: debian/%.install.in
sed 's|@LIBDIR@|$(LIBDIR)|g' $< > $@

#
# Install
#
Expand All @@ -227,20 +241,10 @@ INSTALL = install
INSTALL_DIRS = $(INSTALL) -d
INSTALL_FILES = $(INSTALL) -m $(INSTALL_PERM)

# This one could be substituted with arch specific dir
LIBDIR ?= /usr/lib
ABS_LIBDIR = $(shell echo /$(LIBDIR) | sed -r 's|/+|/|g')

INSTALL_LIB_DIR = $(DESTDIR)$(ABS_LIBDIR)
INSTALL_INCLUDE_DIR = $(DESTDIR)/usr/include/gutil
INSTALL_PKGCONFIG_DIR = $(DESTDIR)$(ABS_LIBDIR)/pkgconfig

$(PKGCONFIG): $(LIB_NAME).pc.in
sed -e 's|@version@|$(PCVERSION)|g' -e 's|@libdir@|$(ABS_LIBDIR)|' $< > $@

debian/%.install: debian/%.install.in
sed 's|@LIBDIR@|$(LIBDIR)|g' $< > $@

install: $(INSTALL_LIB_DIR)
$(INSTALL_FILES) $(RELEASE_LIB) $(INSTALL_LIB_DIR)
ln -sf $(LIB) $(INSTALL_LIB_DIR)/$(LIB_SYMLINK2)
Expand Down

0 comments on commit b9ebf5b

Please sign in to comment.