Makefile: fix up coding style

This commit is contained in:
Eric Biggers 2021-11-23 23:22:27 -08:00
parent 0a2b40203d
commit 2d2bc2cc8a

View File

@ -40,7 +40,8 @@
# #
############################################################################## ##############################################################################
VERSION=$(shell sed -n 's/\#define LIBDEFLATE_VERSION_STRING.*"\(.*\)"/\1/p' libdeflate.h) VERSION = $(shell sed -n 's/\#define LIBDEFLATE_VERSION_STRING.*"\(.*\)"/\1/p' \
libdeflate.h)
#### Common compiler flags. You can add additional flags by defining CFLAGS #### Common compiler flags. You can add additional flags by defining CFLAGS
#### in the environment or on the 'make' command line. #### in the environment or on the 'make' command line.
@ -310,24 +311,24 @@ DEFAULT_TARGETS += gunzip$(PROG_SUFFIX)
all:$(DEFAULT_TARGETS) all:$(DEFAULT_TARGETS)
# we don't generate the pkg-config file until install time, as needed # We don't generate the pkg-config file until install time, as needed
# definitions might not exist until then. # definitions might not exist until then.
PKGCONFBASE:=libdeflate.pc.in PKGCONFBASE := libdeflate.pc.in
# Install the files. Note: not all versions of the 'install' program have the # Install the files. Note: not all versions of the 'install' program have the
# '-D' and '-t' options, so don't use them; use portable commands only. # '-D' and '-t' options, so don't use them; use portable commands only.
install:all $(PKGCONFBASE) install:all $(PKGCONFBASE)
install -d $(DESTDIR)$(LIBDIR)/pkgconfig $(DESTDIR)$(INCDIR) $(DESTDIR)$(BINDIR) install -d $(DESTDIR)$(LIBDIR)/pkgconfig $(DESTDIR)$(INCDIR) \
$(DESTDIR)$(BINDIR)
install -m644 $(STATIC_LIB) $(DESTDIR)$(LIBDIR) install -m644 $(STATIC_LIB) $(DESTDIR)$(LIBDIR)
if [ -z "$(DISABLE_SHARED)" ]; then \ if [ -z "$(DISABLE_SHARED)" ]; then \
install -m755 $(SHARED_LIB) $(DESTDIR)$(LIBDIR); \ install -m755 $(SHARED_LIB) $(DESTDIR)$(LIBDIR); \
fi fi
sed -e "s|@PREFIX@|$(PREFIX)|" \ sed -e "s|@PREFIX@|$(PREFIX)|" \
-e "s|@LIBDIR@|$(LIBDIR)|" \ -e "s|@LIBDIR@|$(LIBDIR)|" \
-e "s|@INCDIR@|$(INCDIR)|" \ -e "s|@INCDIR@|$(INCDIR)|" \
-e "s|@VERSION@|$(VERSION)|" \ -e "s|@VERSION@|$(VERSION)|" \
$(PKGCONFBASE) > \ $(PKGCONFBASE) > $(DESTDIR)$(LIBDIR)/pkgconfig/libdeflate.pc
$(DESTDIR)$(LIBDIR)/pkgconfig/$(basename $(PKGCONFBASE))
install -m644 libdeflate.h $(DESTDIR)$(INCDIR) install -m644 libdeflate.h $(DESTDIR)$(INCDIR)
install -m755 gzip$(PROG_SUFFIX) \ install -m755 gzip$(PROG_SUFFIX) \
$(DESTDIR)$(BINDIR)/libdeflate-gzip$(PROG_SUFFIX) $(DESTDIR)$(BINDIR)/libdeflate-gzip$(PROG_SUFFIX)
@ -341,10 +342,10 @@ install:all $(PKGCONFBASE)
uninstall: uninstall:
rm -f $(DESTDIR)$(LIBDIR)/$(STATIC_LIB) \ rm -f $(DESTDIR)$(LIBDIR)/$(STATIC_LIB) \
$(DESTDIR)$(LIBDIR)/$(SHARED_LIB) \ $(DESTDIR)$(LIBDIR)/$(SHARED_LIB) \
$(DESTDIR)$(LIBDIR)/pkgconfig/libdeflate.pc \
$(DESTDIR)$(INCDIR)/libdeflate.h \ $(DESTDIR)$(INCDIR)/libdeflate.h \
$(DESTDIR)$(BINDIR)/libdeflate-gzip$(PROG_SUFFIX) \ $(DESTDIR)$(BINDIR)/libdeflate-gzip$(PROG_SUFFIX) \
$(DESTDIR)$(BINDIR)/libdeflate-gunzip$(PROG_SUFFIX) \ $(DESTDIR)$(BINDIR)/libdeflate-gunzip$(PROG_SUFFIX)
$(DESTDIR)$(LIBDIR)/pkgconfig/libdeflate.pc
if [ -n "$(SHARED_LIB_SYMLINK)" ]; then \ if [ -n "$(SHARED_LIB_SYMLINK)" ]; then \
rm -f $(DESTDIR)$(LIBDIR)/$(SHARED_LIB_SYMLINK); \ rm -f $(DESTDIR)$(LIBDIR)/$(SHARED_LIB_SYMLINK); \
fi fi