]> sourceware.org Git - lvm2.git/commitdiff
make: support comments in exported symbols
authorZdenek Kabelac <zkabelac@redhat.com>
Tue, 30 Jul 2019 13:31:01 +0000 (15:31 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 9 Aug 2019 10:57:07 +0000 (12:57 +0200)
Now the lines starting with '#' in exported symbols files are treated as
comments (ignored).

libdm/make.tmpl.in
make.tmpl.in

index 26e3dbade2d347d4201ad286759c894e5042adf8..9041da52e184ea95bf1525e56913fb3bae0a0fb4 100644 (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 "};";\
index f3332e91c1599956ab2d3bec83ff9700129b8ac0..8a2081897b0cc6a35717a1bd975de6d736949b70 100644 (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 "};";\
This page took 0.033371 seconds and 5 git commands to generate.