mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
makefiles: use configure vars
Use binaries found in configure.
This commit is contained in:
parent
3350eb67cc
commit
fc0e49297d
@ -40,6 +40,11 @@ SED = @SED@
|
|||||||
CFLOW_CMD = @CFLOW_CMD@
|
CFLOW_CMD = @CFLOW_CMD@
|
||||||
AWK = @AWK@
|
AWK = @AWK@
|
||||||
CHMOD = @CHMOD@
|
CHMOD = @CHMOD@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
GREP = @GREP@
|
||||||
|
SORT = @SORT@
|
||||||
|
WC = @WC@
|
||||||
|
|
||||||
PYTHON2 = @PYTHON2@
|
PYTHON2 = @PYTHON2@
|
||||||
PYTHON3 = @PYTHON3@
|
PYTHON3 = @PYTHON3@
|
||||||
PYCOMPILE = $(top_srcdir)/autoconf/py-compile
|
PYCOMPILE = $(top_srcdir)/autoconf/py-compile
|
||||||
@ -512,9 +517,9 @@ ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
|
|||||||
) > $@
|
) > $@
|
||||||
else
|
else
|
||||||
set -e;\
|
set -e;\
|
||||||
R=$$(sort $^ | uniq -u);\
|
R=$$($(SORT) $^ | uniq -u);\
|
||||||
test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\
|
test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\
|
||||||
( for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | sort -rnt_ -k5 ); do\
|
( for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -rnt_ -k5 ); do\
|
||||||
echo "$${i##*.} {"; echo " global:";\
|
echo "$${i##*.} {"; echo " global:";\
|
||||||
$(SED) "s/^/ /;s/$$/;/" $$i;\
|
$(SED) "s/^/ /;s/$$/;/" $$i;\
|
||||||
echo "};";\
|
echo "};";\
|
||||||
|
@ -39,7 +39,7 @@ S ?= @ # never match anything by default
|
|||||||
VERBOSE ?= 0
|
VERBOSE ?= 0
|
||||||
ALL := $(shell find -L $(srcdir) \( -path \*/shell/\*.sh -or -path \*/api/\*.sh \) | sort)
|
ALL := $(shell find -L $(srcdir) \( -path \*/shell/\*.sh -or -path \*/api/\*.sh \) | sort)
|
||||||
comma = ,
|
comma = ,
|
||||||
RUN := $(shell find -L $(srcdir) -regextype posix-egrep \( -path \*/shell/\*.sh -or -path \*/api/\*.sh \) -and -regex "$(srcdir)/.*($(subst $(comma),|,$(T))).*" -and -not -regex "$(srcdir)/.*($(subst $(comma),|,$(S))).*" | sort)
|
RUN := $(shell find -L $(srcdir) -regextype posix-egrep \( -path \*/shell/\*.sh -or -path \*/api/\*.sh \) -and -regex "$(srcdir)/.*($(subst $(comma),|,$(T))).*" -and -not -regex "$(srcdir)/.*($(subst $(comma),|,$(S))).*" | ($SORT))
|
||||||
RUN_BASE = $(subst $(srcdir)/,,$(RUN))
|
RUN_BASE = $(subst $(srcdir)/,,$(RUN))
|
||||||
|
|
||||||
ifeq ("@BUILD_LVMETAD@", "yes")
|
ifeq ("@BUILD_LVMETAD@", "yes")
|
||||||
@ -267,7 +267,7 @@ lib/%: lib/%.o .lib-dir-stamp
|
|||||||
|
|
||||||
lib/%: $(srcdir)/lib/%.sh .lib-dir-stamp
|
lib/%: $(srcdir)/lib/%.sh .lib-dir-stamp
|
||||||
cp $< $@
|
cp $< $@
|
||||||
chmod +x $@
|
$(CHMOD) +x $@
|
||||||
|
|
||||||
lib/flavour-%: $(srcdir)/lib/flavour-%.sh .lib-dir-stamp
|
lib/flavour-%: $(srcdir)/lib/flavour-%.sh .lib-dir-stamp
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
@ -173,15 +173,10 @@ liblvm2cmd.$(LIB_SUFFIX).$(LIB_VERSION): liblvm2cmd.$(LIB_SUFFIX)
|
|||||||
|
|
||||||
.commands: $(srcdir)/commands.h $(srcdir)/cmdnames.h Makefile
|
.commands: $(srcdir)/commands.h $(srcdir)/cmdnames.h Makefile
|
||||||
$(CC) -E -P $(srcdir)/cmdnames.h 2> /dev/null | \
|
$(CC) -E -P $(srcdir)/cmdnames.h 2> /dev/null | \
|
||||||
egrep -v '^ *(|#.*|config|devtypes|dumpconfig|formats|fullreport|help|lastlog|lvpoll|pvdata|segtypes|systemid|tags|version) *$$' > .commands
|
$(EGREP) -v '^ *(|#.*|config|devtypes|dumpconfig|formats|fullreport|help|lastlog|lvpoll|pvdata|segtypes|systemid|tags|version) *$$' > .commands
|
||||||
|
|
||||||
.DELETE_ON_ERROR:
|
.DELETE_ON_ERROR:
|
||||||
|
|
||||||
# move properly to configure
|
|
||||||
WC = /usr/bin/wc
|
|
||||||
GREP = /bin/grep
|
|
||||||
SORT = /bin/sort
|
|
||||||
|
|
||||||
command-count.h: $(srcdir)/command-lines.in Makefile
|
command-count.h: $(srcdir)/command-lines.in Makefile
|
||||||
set -o pipefail && \
|
set -o pipefail && \
|
||||||
( cat $(top_srcdir)/doc/license.txt && \
|
( cat $(top_srcdir)/doc/license.txt && \
|
||||||
@ -204,7 +199,7 @@ command-lines-input.h: $(srcdir)/command-lines.in Makefile
|
|||||||
( cat $(top_srcdir)/doc/license.txt && \
|
( cat $(top_srcdir)/doc/license.txt && \
|
||||||
echo "/* Do not edit. This file is generated by the Makefile. */" && \
|
echo "/* Do not edit. This file is generated by the Makefile. */" && \
|
||||||
echo -en "const char _command_input[] =\n\n\"" && \
|
echo -en "const char _command_input[] =\n\n\"" && \
|
||||||
$(GREP) -Ev '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \
|
$(EGREP) -v '^#|\-\-\-|^$$' $(srcdir)/command-lines.in | $(AWK) 'BEGIN {ORS = "\\n\"\n\""} //' && \
|
||||||
echo "\\n\";" \
|
echo "\\n\";" \
|
||||||
) > $@
|
) > $@
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ ifeq ("@BUILD_LVMETAD@", "yes")
|
|||||||
LVM_RULES+=69-dm-lvm-metad.rules
|
LVM_RULES+=69-dm-lvm-metad.rules
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DM_DIR=$(shell grep "\#define DM_DIR" $(top_srcdir)/libdm/misc/dm-ioctl.h | awk '{print $$3}')
|
DM_DIR=$(shell $(GREP) "\#define DM_DIR" $(top_srcdir)/libdm/misc/dm-ioctl.h | $(AWK) '{print $$3}')
|
||||||
|
|
||||||
ifeq ("@UDEV_RULE_EXEC_DETECTION@", "yes")
|
ifeq ("@UDEV_RULE_EXEC_DETECTION@", "yes")
|
||||||
SBIN=\$$env{DM_SBIN_PATH}
|
SBIN=\$$env{DM_SBIN_PATH}
|
||||||
|
Loading…
Reference in New Issue
Block a user