When compiling libselinux with CC=clang, "make pywrap" reports the following message: bash exception.sh > selinuxswig_python_exception.i clang-3.9: error: no such file or directory: 'temp.aux' awk: fatal: cannot open file `temp.aux' for reading (No such file or directory) This does not make the build fail as exception.sh returns an "OK" status. Use "bash -e" with this script to make it return an error value. In order not to keep an empty selinuxswig_python_exception.i file after a build fails (which would make a second run of "make pywrap" incorrectly succeed), remove the file when exception.sh fails. As libsemanage uses the same code to build semanageswig_python_exception.i, modify its Makefile too. By the way, on Linux clang does not seem to currently support -aux-info so it cannot be used to craft selinuxswig_python_exception.i. Signed-off-by: Nicolas Iooss <nicolas.iooss@xxxxxxx> --- 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 b92fe1c8f5f9..24946cee8a01 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -140,7 +140,7 @@ $(LIBPC): $(LIBPC).in ../VERSION sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@ selinuxswig_python_exception.i: ../include/selinux/selinux.h - bash exception.sh > $@ + bash -e exception.sh > $@ || (rm -f $@ ; false) $(AUDIT2WHYLOBJ): audit2why.c $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $< diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index 55e3f469b0ba..cd29a8abf5ab 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -98,7 +98,7 @@ $(LIBPC): $(LIBPC).in ../VERSION sed -e 's/@VERSION@/$(VERSION)/; s:@prefix@:$(PREFIX):; s:@libdir@:$(LIBBASE):; s:@includedir@:$(INCLUDEDIR):' < $< > $@ semanageswig_python_exception.i: ../include/semanage/semanage.h - bash exception.sh > $@ + bash -e exception.sh > $@ || (rm -f $@ ; false) conf-scan.c: conf-scan.l conf-parse.h $(LEX) $(LFLAGS) -t $< > $@ -- 2.10.2 _______________________________________________ Selinux mailing list Selinux@xxxxxxxxxxxxx To unsubscribe, send email to Selinux-leave@xxxxxxxxxxxxx. To get help, send an email containing "help" to Selinux-request@xxxxxxxxxxxxx.