On 11/11/19 6:53 AM, Nicolas Iooss wrote:
selinuxswig_python_exception.i and semanageswig_python_exception.i need
to be regenerated when either an input header file changes or
exception.sh changes. Add the missing items to the respective Makefiles.
Signed-off-by: Nicolas Iooss <nicolas.iooss@xxxxxxx>
Wondering if we ought to be passing the dependencies as arguments to
exception.sh and having it use them rather than a hardcoded header file
path, but regardless:
Acked-by: Stephen Smalley <sds@xxxxxxxxxxxxx>
---
libselinux/src/Makefile | 2 +-
libsemanage/src/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index 3b8bad810de0..7f5a5d7418e9 100644
--- a/libselinux/src/Makefile
+++ b/libselinux/src/Makefile
@@ -151,7 +151,7 @@ $(LIBSO): $(LOBJS)
$(LIBPC): $(LIBPC).in ../VERSION
sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):; s:@PCRE_MODULE@:$(PCRE_MODULE):' < $< > $@
-selinuxswig_python_exception.i: ../include/selinux/selinux.h
+selinuxswig_python_exception.i: exception.sh ../include/selinux/selinux.h
bash -e exception.sh > $@ || (rm -f $@ ; false)
%.o: %.c policy.h
diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile
index e029f0988dd8..8a9570c74163 100644
--- a/libsemanage/src/Makefile
+++ b/libsemanage/src/Makefile
@@ -94,7 +94,7 @@ $(LIBSO): $(LOBJS)
$(LIBPC): $(LIBPC).in ../VERSION
sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBDIR):; s:@includedir@:$(INCLUDEDIR):' < $< > $@
-semanageswig_python_exception.i: ../include/semanage/semanage.h
+semanageswig_python_exception.i: exception.sh $(wildcard ../include/semanage/*.h)
bash -e exception.sh > $@ || (rm -f $@ ; false)
conf-scan.c: conf-scan.l conf-parse.h