OSDN Git Service

Add a make target to rebuild our abidw .abixml files
authorPeter Jones <pjones@redhat.com>
Wed, 6 Jun 2018 21:37:03 +0000 (17:37 -0400)
committerPeter Jones <pmjones@gmail.com>
Fri, 8 Jun 2018 19:11:37 +0000 (15:11 -0400)
Signed-off-by: Peter Jones <pjones@redhat.com>
Make.rules
Makefile
src/Makefile

index 44112ec..86856e1 100644 (file)
@@ -24,6 +24,7 @@ include $(TOPDIR)/Make.version
 
 %.abixml : %.so
        $(ABIDW) --headers-dir $(TOPDIR)/src/include/efivar/ --out-file $@ $^
+       @sed -i -s 's,$(TOPDIR)/,,g' $@
 
 %.abicheck : %.so
        $(ABIDIFF) \
index a2943c3..8c67b9d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,10 @@ install :
 abidw abicheck efivar efivar-static static:
        $(MAKE) -C src $@
 
+abiupdate :
+       $(MAKE) clean all
+       $(MAKE) -C src abiclean abixml
+
 $(SUBDIRS) :
        $(MAKE) -C $@
 
@@ -35,7 +39,7 @@ a :
                exit 1 ; \
        fi
 
-.PHONY: $(SUBDIRS) a brick
+.PHONY: $(SUBDIRS) a brick abiupdate
 
 GITTAG = $(shell bash -c "echo $$(($(VERSION) + 1))")
 
index 5f394e4..76bc474 100644 (file)
@@ -34,6 +34,12 @@ all : $(TARGETS)
 
 static : $(STATICTARGETS)
 
+abiclean :
+       @rm -vf $(patsubst %.so,%.abixml,$@)
+
+abixml : | $(LIBTARGETS)
+abixml : $(patsubst %.so,%.abixml,$(LIBTARGETS))
+
 abidw : $(patsubst %.so,%.abixml,$(LIBTARGETS))
        git commit -s --amend $^
 
@@ -104,7 +110,7 @@ install : all
 test : all
        $(MAKE) -C test $@
 
-.PHONY: test deps
+.PHONY: test deps abiclean abixml
 .SECONDARY : libefivar.so.1.$(VERSION) libefivar.so.1
 .SECONDARY : libefiboot.so.1.$(VERSION) libefivar.so.1
 .SECONDARY : include/efivar/efivar-guids.h guid-symbols.c