1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

make: support comments in exported symbols

Now the lines starting with '#' in exported symbols files are treated as
comments (ignored).
This commit is contained in:
Zdenek Kabelac 2019-07-30 15:31:01 +02:00
parent 3fcb4697f6
commit f2489d9dda
2 changed files with 6 additions and 6 deletions

View File

@ -512,17 +512,17 @@ EXPORTED_SYMBOLS := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.expor
.export.sym: .exported_symbols_generated $(EXPORTED_SYMBOLS)
ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
$(Q) set -e; (echo "Base {"; echo " global:";\
$(SED) "s/^/ /;s/$$/;/" $<;\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\
echo "};";\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\
) > $@
else
$(Q) set -e;\
R=$$($(SORT) $^ | uniq -u);\
R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\
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\
echo "$${i##*.} {"; echo " global:";\
$(SED) "s/^/ /;s/$$/;/" $$i;\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\
echo "};";\
done;\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\

View File

@ -551,17 +551,17 @@ EXPORTED_SYMBOLS := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.expor
.export.sym: .exported_symbols_generated $(EXPORTED_SYMBOLS)
ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
$(Q) set -e; (echo "Base {"; echo " global:";\
$(SED) "s/^/ /;s/$$/;/" $<;\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\
echo "};";\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\
) > $@
else
$(Q) set -e;\
R=$$($(SORT) $^ | uniq -u);\
R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\
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\
echo "$${i##*.} {"; echo " global:";\
$(SED) "s/^/ /;s/$$/;/" $$i;\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\
echo "};";\
done;\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\