]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/blobdiff - src/Makefile.am
Install libcoloredstderr.so read-only.
[coloredstderr/coloredstderr.git] / src / Makefile.am
index b62b114041e0d615c6b5c3784fb0af835b39cb23..46f9289437bc038dfdcd73bfee55f96155cb85cb 100644 (file)
@@ -1,7 +1,17 @@
 lib_LTLIBRARIES             = libcoloredstderr.la
 libcoloredstderr_la_SOURCES = coloredstderr.c \
+                              compiler.h \
                               constants.h \
                               debug.h \
                               hookmacros.h \
                               ldpreload.h \
                               trackfds.h
+
+# Make sure the library is not writable. See README why this is important. Is
+# not run with `make libcoloredstderr.la`, but this isn't common usage.
+all-local: $(lib_LTLIBRARIES)
+       find .libs -type f -exec chmod ugo-w '{}' \;
+# `install` uses normal permissions, "fix" them so `make install` also
+# installs non-writable files.
+install-exec-hook:
+       find $(DESTDIR)$(libdir) -type f -exec chmod ugo-w '{}' \;