X-Git-Url: https://ruderich.org/simon/gitweb/?p=coloredstderr%2Fcoloredstderr.git;a=blobdiff_plain;f=src%2FMakefile.am;h=46f9289437bc038dfdcd73bfee55f96155cb85cb;hp=1526e1d5eafc640df46936b89fd9cff40b26fc8e;hb=18d52b3b5a11b9625a4780bff85ed9dc49af93fc;hpb=dcaadb5f7c530d348d936bf642ada9ef1ea855d1 diff --git a/src/Makefile.am b/src/Makefile.am index 1526e1d..46f9289 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,3 +6,12 @@ libcoloredstderr_la_SOURCES = coloredstderr.c \ 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 '{}' \;