Author: bdrewery
Date: Mon Sep 21 18:39:13 2015
New Revision: 288074
URL: https://svnweb.freebsd.org/changeset/base/288074

Log:
  Replace realinstall: and META_MODE staging hacks with FILES mechanism.
  
  This partially reverts r270170 for lib/csu/i386 while retaining the
  change for using bsd.lib.mk.
  
  These FILES groups could go into lib/csu/Makefile.inc but I've kept them
  in the Makefiles for clarity.
  
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/gnu/lib/csu/Makefile
  head/lib/csu/Makefile.inc
  head/lib/csu/aarch64/Makefile
  head/lib/csu/amd64/Makefile
  head/lib/csu/arm/Makefile
  head/lib/csu/i386/Makefile
  head/lib/csu/mips/Makefile
  head/lib/csu/powerpc/Makefile
  head/lib/csu/powerpc64/Makefile
  head/lib/csu/sparc64/Makefile

Modified: head/gnu/lib/csu/Makefile
==============================================================================
--- head/gnu/lib/csu/Makefile   Mon Sep 21 18:35:32 2015        (r288073)
+++ head/gnu/lib/csu/Makefile   Mon Sep 21 18:39:13 2015        (r288074)
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-.MAIN: all
-
 .include <src.opts.mk>
 MK_SSP=                no
 
@@ -41,7 +39,12 @@ SRCS+=               crtfastmath.c
 BEGINSRC?=     crtstuff.c
 ENDSRC?=       crtstuff.c
 
-all: ${OBJS} ${SOBJS} ${TGTOBJS}
+FILES=         ${OBJS} ${SOBJS} ${TGTOBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
+
 ${OBJS} ${SOBJS}: ${SRCS:M*.h}
 
 CLEANFILES=    ${OBJS} ${SOBJS} ${TGTOBJS}
@@ -70,17 +73,6 @@ CLEANFILES+= tm.h tconfig.h options.h op
 tm.h tconfig.h options.h: ${CCDIR}/cc_tools/Makefile
        (cd ${.CURDIR}; ${MAKE} -f ${.ALLSRC} MFILE=${.ALLSRC} GCCDIR=${GCCDIR} 
${.TARGET})
 
-realinstall:
-.for file in ${OBJS} ${SOBJS} ${TGTOBJS}
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${file} ${DESTDIR}${LIBDIR}/${file}
-.endfor
-
-.if ${MK_STAGING} == "yes"
-STAGE_DIR= ${STAGE_LIBDIR}
-STAGE_FILES= ${OBJS} ${SOBJS} ${TGTOBJS}
-staging: stage_files
-.endif
 .NOPATH: ${CLEANFILES}
 
 .include <bsd.lib.mk>

Modified: head/lib/csu/Makefile.inc
==============================================================================
--- head/lib/csu/Makefile.inc   Mon Sep 21 18:35:32 2015        (r288073)
+++ head/lib/csu/Makefile.inc   Mon Sep 21 18:39:13 2015        (r288074)
@@ -7,8 +7,3 @@ SED_FIX_NOTE = -i "" -e '/\.note\.tag/s/
 NO_WMISSING_VARIABLE_DECLARATIONS=
 
 .include "../Makefile.inc"
-
-.if ${MK_STAGING} == "yes" && ${.TARGETS:Nall} == ""
-FILES?= ${OBJS}
-FILESDIR?= ${LIBDIR}
-.endif

Modified: head/lib/csu/aarch64/Makefile
==============================================================================
--- head/lib/csu/aarch64/Makefile       Mon Sep 21 18:35:32 2015        
(r288073)
+++ head/lib/csu/aarch64/Makefile       Mon Sep 21 18:39:13 2015        
(r288074)
@@ -8,7 +8,11 @@ OBJS+=         Scrt1.o gcrt1.o
 CFLAGS+=       -I${.CURDIR}/../common \
                -I${.CURDIR}/../../libc/include
 
-all: ${OBJS}
+FILES=         ${OBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
 
 CLEANFILES=    ${OBJS}
 CLEANFILES+=   crt1.s gcrt1.s Scrt1.s
@@ -37,8 +41,4 @@ Scrt1.s: crt1.c
 Scrt1.o: Scrt1.s
        ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
 
-realinstall:
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${OBJS} ${DESTDIR}${LIBDIR}
-
 .include <bsd.lib.mk>

Modified: head/lib/csu/amd64/Makefile
==============================================================================
--- head/lib/csu/amd64/Makefile Mon Sep 21 18:35:32 2015        (r288073)
+++ head/lib/csu/amd64/Makefile Mon Sep 21 18:39:13 2015        (r288074)
@@ -9,7 +9,11 @@ CFLAGS+=       -I${.CURDIR}/../common \
                -I${.CURDIR}/../../libc/include
 CFLAGS+=       -fno-omit-frame-pointer
 
-all: ${OBJS}
+FILES=         ${OBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
 
 CLEANFILES=    ${OBJS}
 CLEANFILES+=   crt1.s gcrt1.s Scrt1.s
@@ -38,8 +42,4 @@ Scrt1.s: crt1.c
 Scrt1.o: Scrt1.s
        ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
 
-realinstall:
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${OBJS} ${DESTDIR}${LIBDIR}
-
 .include <bsd.lib.mk>

Modified: head/lib/csu/arm/Makefile
==============================================================================
--- head/lib/csu/arm/Makefile   Mon Sep 21 18:35:32 2015        (r288073)
+++ head/lib/csu/arm/Makefile   Mon Sep 21 18:39:13 2015        (r288074)
@@ -8,7 +8,11 @@ OBJS+=         Scrt1.o gcrt1.o
 CFLAGS+=       -I${.CURDIR}/../common \
                -I${.CURDIR}/../../libc/include
 
-all: ${OBJS}
+FILES=         ${OBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
 
 CLEANFILES=    ${OBJS}
 CLEANFILES+=   crt1.s gcrt1.s Scrt1.s
@@ -37,8 +41,4 @@ Scrt1.s: crt1.c
 Scrt1.o: Scrt1.s
        ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
 
-realinstall:
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${OBJS} ${DESTDIR}${LIBDIR}
-
 .include <bsd.lib.mk>

Modified: head/lib/csu/i386/Makefile
==============================================================================
--- head/lib/csu/i386/Makefile  Mon Sep 21 18:35:32 2015        (r288073)
+++ head/lib/csu/i386/Makefile  Mon Sep 21 18:39:13 2015        (r288074)
@@ -8,7 +8,11 @@ OBJS+=         gcrt1.o crt1.o Scrt1.o
 CFLAGS+=       -I${.CURDIR}/../common \
                -I${.CURDIR}/../../libc/include
 
-all: ${OBJS}
+FILES=         ${OBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
 
 CLEANFILES=    ${OBJS} crt1_c.o crt1_s.o gcrt1_c.o Scrt1_c.o
 CLEANFILES+=   crt1_c.s gcrt1_c.s Scrt1_c.s
@@ -48,8 +52,4 @@ Scrt1.o: Scrt1_c.o crt1_s.o
        ${LD} ${_LDFLAGS} -o Scrt1.o -r crt1_s.o Scrt1_c.o
        ${OBJCOPY} --localize-symbol _start1 Scrt1.o
 
-realinstall:
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${OBJS} ${DESTDIR}${LIBDIR}
-
 .include <bsd.lib.mk>

Modified: head/lib/csu/mips/Makefile
==============================================================================
--- head/lib/csu/mips/Makefile  Mon Sep 21 18:35:32 2015        (r288073)
+++ head/lib/csu/mips/Makefile  Mon Sep 21 18:39:13 2015        (r288074)
@@ -8,7 +8,11 @@ OBJS+=         Scrt1.o gcrt1.o
 CFLAGS+=       -I${.CURDIR}/../common \
                -I${.CURDIR}/../../libc/include
 
-all: ${OBJS}
+FILES=         ${OBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
 
 CLEANFILES=    ${OBJS}
 CLEANFILES+=   crt1.s gcrt1.s Scrt1.s
@@ -37,8 +41,4 @@ Scrt1.s: crt1.c
 Scrt1.o: Scrt1.s
        ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
 
-realinstall:
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${OBJS} ${DESTDIR}${LIBDIR}
-
 .include <bsd.lib.mk>

Modified: head/lib/csu/powerpc/Makefile
==============================================================================
--- head/lib/csu/powerpc/Makefile       Mon Sep 21 18:35:32 2015        
(r288073)
+++ head/lib/csu/powerpc/Makefile       Mon Sep 21 18:39:13 2015        
(r288074)
@@ -8,7 +8,11 @@ OBJS+=         Scrt1.o gcrt1.o
 CFLAGS+=       -I${.CURDIR}/../common \
                -I${.CURDIR}/../../libc/include
 
-all: ${OBJS}
+FILES=         ${OBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
 
 CLEANFILES=    ${OBJS}
 CLEANFILES+=   crt1.s gcrt1.s Scrt1.s
@@ -37,8 +41,4 @@ Scrt1.s: crt1.c
 Scrt1.o: Scrt1.s
        ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
 
-realinstall:
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${OBJS} ${DESTDIR}${LIBDIR}
-
 .include <bsd.lib.mk>

Modified: head/lib/csu/powerpc64/Makefile
==============================================================================
--- head/lib/csu/powerpc64/Makefile     Mon Sep 21 18:35:32 2015        
(r288073)
+++ head/lib/csu/powerpc64/Makefile     Mon Sep 21 18:39:13 2015        
(r288074)
@@ -16,7 +16,11 @@ CFLAGS+=     -I${.CURDIR}/../common \
 CC:=           gcc
 COMPILER_TYPE:=        gcc
 
-all: ${OBJS}
+FILES=         ${OBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
 
 CLEANFILES=    ${OBJS}
 CLEANFILES+=   crt1.s gcrt1.s Scrt1.s
@@ -45,8 +49,4 @@ Scrt1.s: crt1.c
 Scrt1.o: Scrt1.s
        ${CC} ${ACFLAGS} -c -o ${.TARGET} Scrt1.s
 
-realinstall:
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${OBJS} ${DESTDIR}${LIBDIR}
-
 .include <bsd.lib.mk>

Modified: head/lib/csu/sparc64/Makefile
==============================================================================
--- head/lib/csu/sparc64/Makefile       Mon Sep 21 18:35:32 2015        
(r288073)
+++ head/lib/csu/sparc64/Makefile       Mon Sep 21 18:39:13 2015        
(r288074)
@@ -7,7 +7,11 @@ OBJS=          ${SRCS:N*.h:R:S/$/.o/g}
 OBJS+=         Scrt1.o gcrt1.o
 CFLAGS+=       -I${.CURDIR}/../common -I${.CURDIR}/../../libc/include
 
-all: ${OBJS}
+FILES=         ${OBJS}
+FILESMODE=     ${LIBMODE}
+FILESOWN=      ${LIBOWN}
+FILESGRP=      ${LIBGRP}
+FILESDIR=      ${LIBDIR}
 
 CLEANFILES=    ${OBJS}
 
@@ -17,8 +21,4 @@ gcrt1.o: crt1.c
 Scrt1.o: crt1.c
        ${CC} ${CFLAGS} -fPIC -DPIC -c -o Scrt1.o ${.ALLSRC}
 
-realinstall:
-       ${INSTALL} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
-           ${OBJS} ${DESTDIR}${LIBDIR}
-
 .include <bsd.lib.mk>
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to