summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-aout/Makefile
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-09-12 03:42:54 +0000
committerbde <bde@FreeBSD.org>1996-09-12 03:42:54 +0000
commit318d275f52251797be260e14e9ebb1cf54048088 (patch)
tree854e30f024287dedc75db9fd55544135218ac707 /libexec/rtld-aout/Makefile
parentc7aeb11bfa8bde102b3fce6486b3d9018c68f48b (diff)
downloadFreeBSD-src-318d275f52251797be260e14e9ebb1cf54048088.zip
FreeBSD-src-318d275f52251797be260e14e9ebb1cf54048088.tar.gz
Use `install -C' instead of lots of shell commands to install ld.so
as atomically as possible. (Immutable targets can't be renamed without opening a window when neither the source nor the target is immutable. Perhaps there should be a rename_immutable syscall to do this if unsetting the immutable flags would work.)
Diffstat (limited to 'libexec/rtld-aout/Makefile')
-rw-r--r--libexec/rtld-aout/Makefile15
1 files changed, 2 insertions, 13 deletions
diff --git a/libexec/rtld-aout/Makefile b/libexec/rtld-aout/Makefile
index 7fc09fc..414e18c 100644
--- a/libexec/rtld-aout/Makefile
+++ b/libexec/rtld-aout/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.18 1996/01/11 17:49:55 phk Exp $
+# $Id: Makefile,v 1.19 1996/05/07 23:15:58 wosch Exp $
PROG= ld.so
SRCS= mdprologue.S rtld.c malloc.c shlib.c etc.c md.c
@@ -11,6 +11,7 @@ ASFLAGS+=-k
DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/}
LDADD+= -lc_pic -lgcc_pic
BINDIR= /usr/libexec
+INSTALLFLAGS+= -fschg -C # -C to install as atomically as possible
MLINKS= rtld.1 ld.so.1
.PATH: $(LDDIR) $(LDDIR)/$(MACHINE)
@@ -18,16 +19,4 @@ MLINKS= rtld.1 ld.so.1
$(PROG): ${OBJS} ${DPADD}
$(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD)
-realinstall:
- ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
- ${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}/${PROG}.new
- test -f ${DESTDIR}${BINDIR}/${PROG}.old && \
- chflags noschg ${DESTDIR}${BINDIR}/${PROG}.old || \
- :
- -chflags noschg ${DESTDIR}${BINDIR}/${PROG}
- -ln -f ${DESTDIR}${BINDIR}/${PROG} ${DESTDIR}${BINDIR}/${PROG}.old
- mv -f ${DESTDIR}${BINDIR}/${PROG}.new ${DESTDIR}${BINDIR}/${PROG}
- chflags schg ${DESTDIR}${BINDIR}/${PROG}
- -rm -f ${DESTDIR}${BINDIR}/${PROG}.old
-
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud