More renaming using the .ext convention

Changed more variables with the convention to use .ext rather than _EXT.
For example, replace PREFIX_DLL with PREFIX.dll.

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
This commit is contained in:
Christophe de Dinechin 2020-12-18 20:51:12 +01:00
parent 13ef51b35c
commit df4c924ff6
7 changed files with 103 additions and 103 deletions

View File

@ -46,8 +46,8 @@ HDR_INSTALL= \
$(wildcard config.*.mk) \
$(MIQ_OBJDIR)config.system-setup.mk
PREFIX_CONFIG=$(PREFIX_SHR)$(PACKAGE_DIR)config/
PACKAGE_INSTALL_LIB=$(DESTDIR)$(PREFIX_CONFIG)
PREFIX.config=$(PREFIX.share)$(PACKAGE_DIR)config/
PACKAGE_INSTALL.lib=$(DESTDIR)$(PREFIX.config)
LIB_INSTALL=$(wildcard config/check*.c)
DOC_INSTALL= README.md AUTHORS NEWS
TESTS=example/
@ -60,23 +60,23 @@ MIQ=./
include $(MIQ)rules.mk
# Install the check*.c files as data
INSTALL_LIB=$(INSTALL_DATA)
INSTALL.lib=$(INSTALL.data)
# Generation of the system setup file
SYSTEM_SETUP= \
$(SYSCONFIG:%=SYSCONFIG?="$(SYSCONFIG)") \
$(PREFIX:%=PREFIX?="$(PREFIX)") \
$(PREFIX_BIN:%=PREFIX_BIN?="$(PREFIX_BIN)") \
$(PREFIX_SBIN:%=PREFIX_SBIN?="$(PREFIX_SBIN)") \
$(PREFIX_HDR:%=PREFIX_HDR?="$(PREFIX_HDR)") \
$(PREFIX_SHR:%=PREFIX_SHR?="$(PREFIX_SHR)") \
$(PREFIX_LIB:%=PREFIX_LIB?="$(PREFIX_LIB)") \
$(PREFIX_DLL:%=PREFIX_DLL?="$(PREFIX_DLL)") \
$(PREFIX_LIBEXEC:%=PREFIX_LIBEXEC?="$(PREFIX_LIBEXEC)") \
$(PREFIX_MAN:%=PREFIX_MAN?="$(PREFIX_MAN)") \
$(PREFIX_DOC:%=PREFIX_DOC?="$(PREFIX_DOC)") \
$(PREFIX_VAR:%=PREFIX_VAR?="$(PREFIX_VAR)") \
CONFIG_SOURCES="$(PREFIX_CONFIG)"
$(PREFIX.bin:%=PREFIX.bin?="$(PREFIX.bin)") \
$(PREFIX.sbin:%=PREFIX.sbin?="$(PREFIX.sbin)") \
$(PREFIX.hdr:%=PREFIX.hdr?="$(PREFIX.hdr)") \
$(PREFIX.share:%=PREFIX.share?="$(PREFIX.share)") \
$(PREFIX.lib:%=PREFIX.lib?="$(PREFIX.lib)") \
$(PREFIX.dll:%=PREFIX.dll?="$(PREFIX.dll)") \
$(PREFIX.libexec:%=PREFIX.libexec?="$(PREFIX.libexec)") \
$(PREFIX.man:%=PREFIX.man?="$(PREFIX.man)") \
$(PREFIX.doc:%=PREFIX.doc?="$(PREFIX.doc)") \
$(PREFIX.var:%=PREFIX.var?="$(PREFIX.var)") \
CONFIG_SOURCES="$(PREFIX.config)"
$(MIQ_OBJDIR)config.system-setup.mk:
$(PRINT_GENERATE) ( $(SYSTEM_SETUP:%=echo %;) true ) > $@

View File

@ -284,8 +284,8 @@ Some of the most useful environment variables include:
the default `make` will become equivalent to `make debug`.
* `PREFIX` specifies the installation location. You can also specify
the installation location for executables (`PREFIX_BIN`), libraries
(`PREFIX_LIB`) or shared libraries (`PREFIX_DLL`).
the installation location for executables (`PREFIX.bin`), libraries
(`PREFIX.lib`) or shared libraries (`PREFIX.dll`).
For compatibility with `automake`-generated makefiles, you can also
execute a staged install by setting `DESTDIR` when running `make`.

View File

@ -47,17 +47,17 @@ PYTHON= python
AR= $(CROSS_COMPILE:%=%-)ar -rcs
RANLIB= $(CROSS_COMPILE:%=%-)ranlib
INSTALL= install
INSTALL_DATA= $(INSTALL) -m 644
INSTALL_BIN= $(INSTALL)
INSTALL_HDR= $(INSTALL_DATA)
INSTALL_SHR= $(INSTALL_DATA)
INSTALL_LIB= $(INSTALL)
INSTALL_MAN= $(INSTALL_DATA)
INSTALL_DOC= $(INSTALL_DATA)
INSTALL_ETC= $(INSTALL_DATA)
INSTALL.data= $(INSTALL) -m 644
INSTALL.bin= $(INSTALL)
INSTALL.h= $(INSTALL.data)
INSTALL.share= $(INSTALL.data)
INSTALL.lib= $(INSTALL)
INSTALL.man= $(INSTALL.data)
INSTALL.doc= $(INSTALL.data)
INSTALL.etc= $(INSTALL.data)
UNINSTALL= /bin/rm -f
UNINSTALL_DIR= /bin/rmdir > /dev/null 2>&1
UNINSTALL_OK= || true
UNINSTALL.dir= /bin/rmdir > /dev/null 2>&1
UNINSTALL.ok= || true
CAT= cat /dev/null
# Tarball generation
@ -145,7 +145,7 @@ MIQ_SYMLINKS= $(PRODUCTS_VERSION:%=&& $(MIQ_SYMLINKS_SO))
MAKE_DIR= mkdir -p $*
MAKE_OBJDIR= $(MAKE_DIR) && touch $@
LDFLAGS_RPATH= -Wl,-rpath,$(PREFIX_DLL)
LDFLAGS_RPATH= -Wl,-rpath,$(PREFIX.dll)
ifdef LIBTOOL
COMPILE-lt= $(LIBTOOL) --silent --mode=compile
@ -158,7 +158,7 @@ LINK.lib= $(LINK-lt) $(LD) $(MIQ_LDFLAGS) $(MIQ_LINKARGS) \
$(MIQ_LT_VERS_OPT)
LINK.dll= $(LINK.lib)
INSTALL.dll= $(LIBTOOL) --silent --mode=install \
$(INSTALL) $(MIQ_DLLNAME) $(PACKAGE_INSTALL_DLL)
$(INSTALL) $(MIQ_DLLNAME) $(PACKAGE_INSTALL.dll)
LINK.exe= $(MIQ_LINK) $(LD) $(MIQ_LINKARGS) $(MIQ_LDFLAGS) -o $@
else
# Non-libtool case: manage manually
@ -171,8 +171,8 @@ LINK.dll= $(LD) -shared $(MIQ_LINKARGS) $(MIQ_LDFLAGS) \
-o $(MIQ_DLLNAME) \
$(MIQ_SONAME_OPT) \
&& (cd $(OUTPUT) $(MIQ_SYMLINKS))
INSTALL.dll= $(INSTALL) $(MIQ_DLLNAME) $(PACKAGE_INSTALL_DLL) \
&& (cd $(PACKAGE_INSTALL_DLL) $(MIQ_SYMLINKS))
INSTALL.dll= $(INSTALL) $(MIQ_DLLNAME) $(PACKAGE_INSTALL.dll) \
&& (cd $(PACKAGE_INSTALL.dll) $(MIQ_SYMLINKS))
LINK.exe= $(LD) $(MIQ_LINKARGS) $(MIQ_LDFLAGS) -o $@
endif

View File

@ -44,7 +44,7 @@ OS_NAME_BUILDENV_mingw=windows
include $(MIQ)config.gnu.mk
# On Windows, DLLs have to go with the .exe
PREFIX_DLL:=$(PREFIX_DLL:$(PREFIX_LIB)=$(PREFIX_BIN))
PREFIX.dll:=$(PREFIX.dll:$(PREFIX.lib)=$(PREFIX.bin))
# Windows overrides for extensions
EXT.exe= .exe
@ -53,7 +53,7 @@ EXT.dll= .dll
# MinGW has no 'install' program
INSTALL= cp
INSTALL_DATA= $(INSTALL)
INSTALL.data= $(INSTALL)
# All code is PIC in MinGW, so avoid a warning
CFLAGS_PIC=

View File

@ -108,30 +108,30 @@ CLANG_FORMAT_SOURCES=$(SOURCES) $(HDR_INSTALL)
# Variables typically provided by configure scripts
SYSCONFIG?=/etc/
PREFIX?=/usr/local/
PREFIX_BIN?=$(PREFIX)bin/
PREFIX_SBIN?=$(PREFIX)sbin/
PREFIX_LIB?=$(PREFIX)lib/
PREFIX_LIBEXEC?=$(PREFIX)libexec/
PREFIX_DLL?=$(PREFIX_LIB)
PREFIX_HDR?=$(PREFIX)include/
PREFIX_SHR?=$(PREFIX)share/
PREFIX_MAN?=$(PREFIX_SHR)man/
PREFIX_DOC?=$(PREFIX_SHR)doc/
PREFIX_VAR?=$(PREFIX)var/
PREFIX.bin?=$(PREFIX)bin/
PREFIX.sbin?=$(PREFIX)sbin/
PREFIX.lib?=$(PREFIX)lib/
PREFIX.libexec?=$(PREFIX)libexec/
PREFIX.dll?=$(PREFIX.lib)
PREFIX.h?=$(PREFIX)include/
PREFIX.share?=$(PREFIX)share/
PREFIX.man?=$(PREFIX.share)man/
PREFIX.doc?=$(PREFIX.share)doc/
PREFIX.var?=$(PREFIX)var/
# Package configuration directories by default
# The defaut is to install binaries and shared libraries in the prefix
# but to install headers and data items under a directory named after project
PACKAGE_INSTALL?=$(DESTDIR)$(PREFIX)
PACKAGE_INSTALL_BIN?=$(DESTDIR)$(PREFIX_BIN)
PACKAGE_INSTALL_LIB?=$(DESTDIR)$(PREFIX_LIB)
PACKAGE_INSTALL_DLL?=$(DESTDIR)$(PREFIX_DLL)
PACKAGE_INSTALL_HDR?=$(DESTDIR)$(PREFIX_HDR)$(PACKAGE_DIR)
PACKAGE_INSTALL_SHR?=$(DESTDIR)$(PREFIX_SHR)$(PACKAGE_DIR)
PACKAGE_INSTALL_MAN?=$(DESTDIR)$(PREFIX_MAN)
PACKAGE_INSTALL_DOC?=$(DESTDIR)$(PREFIX_DOC)$(PACKAGE_DIR)
PACKAGE_INSTALL_PKGCONFIG?=$(DESTDIR)$(PREFIX_SHR)pkgconfig/
PACKAGE_INSTALL_SYSCONFIG?=$(DESTDIR)$(SYSCONFIG)$(PACKAGE_DIR)
PACKAGE_INSTALL.bin?=$(DESTDIR)$(PREFIX.bin)
PACKAGE_INSTALL.lib?=$(DESTDIR)$(PREFIX.lib)
PACKAGE_INSTALL.dll?=$(DESTDIR)$(PREFIX.dll)
PACKAGE_INSTALL.h?=$(DESTDIR)$(PREFIX.h)$(PACKAGE_DIR)
PACKAGE_INSTALL.share?=$(DESTDIR)$(PREFIX.share)$(PACKAGE_DIR)
PACKAGE_INSTALL.man?=$(DESTDIR)$(PREFIX.man)
PACKAGE_INSTALL.doc?=$(DESTDIR)$(PREFIX.doc)$(PACKAGE_DIR)
PACKAGE_INSTALL.pkgconfig?=$(DESTDIR)$(PREFIX.share)pkgconfig/
PACKAGE_INSTALL.sysconfig?=$(DESTDIR)$(SYSCONFIG)$(PACKAGE_DIR)
#------------------------------------------------------------------------------

24
configure vendored
View File

@ -49,24 +49,24 @@ while [ $# -ne 0 ]; do
--program-prefix=*) output IGNORED_PROGRAM_PREFIX=${1/--program-prefix=/}/;;
--disable-dependency-tracking) output IGNORED_DEPENDENCY_TRACKING=0;;
--prefix=*) output PREFIX=$DD${1/--prefix=/}/;;
--exec-prefix=*) output PREFIX_EXEC=$DD${1/--exec-prefix=/}/;;
--bindir=*) output PREFIX_BIN=$DD${1/--bindir=/}/;;
--sbindir=*) output PREFIX_SBIN=$DD${1/--sbindir=/}/;;
--exec-prefix=*) output PREFIX.exec=$DD${1/--exec-prefix=/}/;;
--bindir=*) output PREFIX.bin=$DD${1/--bindir=/}/;;
--sbindir=*) output PREFIX.sbin=$DD${1/--sbindir=/}/;;
--sysconfigdir=*) output SYSCONFIG=$DD${1/--sysconfigdir=/}/;;
--datadir=*) output PREFIX_SHR=$DD${1/--datadir=/}/;;
--includedir=*) output PREFIX_HDR=$DD${1/--includedir=/}/;;
--libdir=*) output PREFIX_LIB=$DD${1/--libdir=/}/;;
--libexecdir=*) output PREFIX_LIBEXEC=$DD${1/--libexecdir=/}/;;
--localstatedir=*) output PREFIX_VAR=$DD${1/--localstatedir=/}/;;
--sharedstatedir==*) output PREFIX_STR=$DD${1/--sharedstatedir=/}/;;
--mandir==*) output PREFIX_MAN=$DD${1/--mandir=/}/;;
--infodir==*) output PREFIX_INFO=$DD${1/--infodir=/}/;;
--datadir=*) output PREFIX.share=$DD${1/--datadir=/}/;;
--includedir=*) output PREFIX.h=$DD${1/--includedir=/}/;;
--libdir=*) output PREFIX.lib=$DD${1/--libdir=/}/;;
--libexecdir=*) output PREFIX.libexec=$DD${1/--libexecdir=/}/;;
--localstatedir=*) output PREFIX.var=$DD${1/--localstatedir=/}/;;
--sharedstatedir==*) output PREFIX.str=$DD${1/--sharedstatedir=/}/;;
--mandir==*) output PREFIX.man=$DD${1/--mandir=/}/;;
--infodir==*) output PREFIX.info=$DD${1/--infodir=/}/;;
esac
shift
done
# Emit the location of configuration sources
output 'CONFIG_SOURCES=$(PREFIX_LIB)make-it-quick/config/'
output 'CONFIG_SOURCES=$(PREFIX.lib)make-it-quick/config/'
echo "# Summary of configuration:"
cat $SETUP

View File

@ -111,7 +111,7 @@ MIQ_SOURCES= $(SOURCES) \
$(MIQ_OUT_SOURCES)
# Automatically put the man pages in the correct section
MIQ_MANDIR= $(PACKAGE_INSTALL_MAN)man$(MIQ_MANSECT)/
MIQ_MANDIR= $(PACKAGE_INSTALL.man)man$(MIQ_MANSECT)/
MIQ_MANSECT= $(subst .,,$(suffix $(*:.gz=)))
ifndef MIQ_DIR
@ -638,48 +638,48 @@ benchmark: $(BENCHMARKS:%=%.benchmark)
# Installing the product: always need to build it first
%.install: $(PACKAGE_INSTALL).mkdir-only %
$(PRINT_INSTALL) $(INSTALL_DATA) $* $(PACKAGE_INSTALL)
%.install_exe: $(PACKAGE_INSTALL_BIN).mkdir-only %
$(PRINT_INSTALL) $(INSTALL_BIN) $* $(PACKAGE_INSTALL_BIN)
%.install_lib: $(PACKAGE_INSTALL_LIB).mkdir-only %
$(PRINT_INSTALL) $(INSTALL_LIB) $* $(PACKAGE_INSTALL_LIB)
%.install_dll: $(PACKAGE_INSTALL_DLL).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.data) $* $(PACKAGE_INSTALL)
%.install_exe: $(PACKAGE_INSTALL.bin).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.bin) $* $(PACKAGE_INSTALL.bin)
%.install_lib: $(PACKAGE_INSTALL.lib).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.lib) $* $(PACKAGE_INSTALL.lib)
%.install_dll: $(PACKAGE_INSTALL.dll).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.dll)
%.install_hdr: $(PACKAGE_INSTALL_HDR).mkdir-only %
$(PRINT_INSTALL) $(INSTALL_HDR) $* $(PACKAGE_INSTALL_HDR)
%.install_shr: $(PACKAGE_INSTALL_SHR).mkdir-only %
$(PRINT_INSTALL) $(INSTALL_SHR) $* $(PACKAGE_INSTALL_SHR)
%.install_man: $(PACKAGE_INSTALL_MAN).mkdir-only %
%.install_hdr: $(PACKAGE_INSTALL.h).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.h) $* $(PACKAGE_INSTALL.h)
%.install_shr: $(PACKAGE_INSTALL.share).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.share) $* $(PACKAGE_INSTALL.share)
%.install_man: $(PACKAGE_INSTALL.man).mkdir-only %
$(PRINT_COMMAND) $(MKDIR) -p $(MIQ_MANDIR)
$(PRINT_INSTALL) $(INSTALL_MAN) $* $(MIQ_MANDIR)
%.install_doc: $(PACKAGE_INSTALL_DOC).mkdir-only %
$(PRINT_INSTALL) $(INSTALL_DOC) $* $(PACKAGE_INSTALL_DOC)
%.install_etc: $(PACKAGE_INSTALL_SYSCONFIG).mkdir-only %
$(PRINT_INSTALL) $(INSTALL_ETC) $* $(PACKAGE_INSTALL_SYSCONFIG)
%.install_pc: $(PACKAGE_INSTALL_PKGCONFIG).mkdir-only %
$(PRINT_INSTALL) $(INSTALL_DATA) $* $(PACKAGE_INSTALL_PKGCONFIG)
$(PRINT_INSTALL) $(INSTALL.man) $* $(MIQ_MANDIR)
%.install_doc: $(PACKAGE_INSTALL.doc).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.doc) $* $(PACKAGE_INSTALL.doc)
%.install_etc: $(PACKAGE_INSTALL.sysconfig).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.etc) $* $(PACKAGE_INSTALL.sysconfig)
%.install_pc: $(PACKAGE_INSTALL.pkgconfig).mkdir-only %
$(PRINT_INSTALL) $(INSTALL.data) $* $(PACKAGE_INSTALL.pkgconfig)
# Uninstalling the product
%.uninstall:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL)%) ; $(UNINSTALL_DIR) $(PACKAGE_INSTALL) $(UNINSTALL_OK)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL)%) ; $(UNINSTALL.dir) $(PACKAGE_INSTALL) $(UNINSTALL.ok)
%.uninstall_exe:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_BIN)%) ; $(UNINSTALL_DIR) $(PACKAGE_INSTALL_BIN) $(UNINSTALL_OK)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.bin)%) ; $(UNINSTALL.dir) $(PACKAGE_INSTALL.bin) $(UNINSTALL.ok)
%.uninstall_lib:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_LIB)%) ; $(UNINSTALL_DIR) $(PACKAGE_INSTALL_LIB) $(UNINSTALL_OK)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.lib)%) ; $(UNINSTALL.dir) $(PACKAGE_INSTALL.lib) $(UNINSTALL.ok)
%.uninstall_dll:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_DLL)%) ; $(UNINSTALL_DIR) $(PACKAGE_INSTALL_DLL) $(UNINSTALL_OK)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.dll)%) ; $(UNINSTALL.dir) $(PACKAGE_INSTALL.dll) $(UNINSTALL.ok)
%.uninstall_hdr:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_HDR)%) ; $(UNINSTALL_DIR) $(PACKAGE_INSTALL_HDR) $(UNINSTALL_OK)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.h)%) ; $(UNINSTALL.dir) $(PACKAGE_INSTALL.h) $(UNINSTALL.ok)
%.uninstall_shr:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_SHR)%) ; $(UNINSTALL_DIR) $(PACKAGE_INSTALL_SHR) $(UNINSTALL_OK)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.share)%) ; $(UNINSTALL.dir) $(PACKAGE_INSTALL.share) $(UNINSTALL.ok)
%.uninstall_doc:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_DOC)%) ; $(UNINSTALL_DIR) $(PACKAGE_INSTALL_DOC) $(UNINSTALL_OK)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.doc)%) ; $(UNINSTALL.dir) $(PACKAGE_INSTALL.doc) $(UNINSTALL.ok)
%.uninstall_man:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_MAN)%)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.man)%)
%.uninstall_etc:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_SYSCONFIG)%)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.sysconfig)%)
%.uninstall_pc:
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL_PKGCONFIG)%) ; $(UNINSTALL_DIR) $(PACKAGE_INSTALL_PKGCONFIG) $(UNINSTALL_OK)
$(PRINT_UNINSTALL) $(UNINSTALL) $(*F:%=$(PACKAGE_INSTALL.pkgconfig)%) ; $(UNINSTALL.dir) $(PACKAGE_INSTALL.pkgconfig) $(UNINSTALL.ok)
#------------------------------------------------------------------------------
@ -694,10 +694,10 @@ MIQ_PACKAGELDPATH=$(firstword \
$(PACKAGE_DLLS:%=-L$${libdir}))
MIQ_GENPC= \
(echo 'prefix=$(PREFIX_BIN)' ;\
(echo 'prefix=$(PREFIX.bin)' ;\
echo 'exec_prefix=$${prefix}' ;\
echo 'libdir=$(PREFIX_LIB)' ;\
echo 'includedir=$(PREFIX_HDR)' ;\
echo 'libdir=$(PREFIX.lib)' ;\
echo 'includedir=$(PREFIX.h)' ;\
echo 'Name: $(PACKAGE_NAME)' ;\
echo 'Description: $(PACKAGE_DESCRIPTION)' ;\
echo 'Version: $(PACKAGE_VERSION)' ;\