svn commit: r248531 - in stable/9: etc share/mk usr.sbin/mergemaster

Brooks Davis brooks at FreeBSD.org
Tue Mar 19 20:00:36 UTC 2013


Author: brooks
Date: Tue Mar 19 20:00:34 2013
New Revision: 248531
URL: http://svnweb.freebsd.org/changeset/base/248531

Log:
  Revert r248352:
  
  >   Replace all known uses of ln in the build process with appropriate
  >   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
  >   variables.
  
  This breaks the assumption mergemaster and etcupdate that no new
  features of tools will be required to run "make distribution" or it's
  prerequisites.
  
  Plotting a way forward will take some time and nothing in 9-STABLE
  depends on INSTALL_LINK and INSTALL_SYMLINK yet so backing this out seem
  like the right short-term approach.
  
  PR:		misc/177055

Modified:
  stable/9/etc/Makefile
  stable/9/share/mk/bsd.incs.mk
  stable/9/share/mk/bsd.info.mk
  stable/9/share/mk/bsd.lib.mk
  stable/9/share/mk/bsd.links.mk
  stable/9/share/mk/bsd.man.mk
  stable/9/share/mk/bsd.own.mk
  stable/9/usr.sbin/mergemaster/mergemaster.sh
Directory Properties:
  stable/9/etc/   (props changed)
  stable/9/share/mk/   (props changed)

Modified: stable/9/etc/Makefile
==============================================================================
--- stable/9/etc/Makefile	Tue Mar 19 19:49:06 2013	(r248530)
+++ stable/9/etc/Makefile	Tue Mar 19 20:00:34 2013	(r248531)
@@ -321,29 +321,26 @@ distrib-dirs:
 		    -f $$m -p $$d; \
 		${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
 	done; true
-	${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys
+	ln -sfh usr/src/sys ${DESTDIR}/sys
 	cd ${DESTDIR}/usr/share/man; \
 	for mandir in man*; do \
-		${INSTALL_SYMLINK} ../$$mandir \
-		    ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
-		${INSTALL_SYMLINK} ../$$mandir \
-		    ${DESTDIR}/usr/share/man/en.UTF-8/; \
+		ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.ISO8859-1/; \
+		ln -sfh ../$$mandir ${DESTDIR}/usr/share/man/en.UTF-8/; \
 	done
 	cd ${DESTDIR}/usr/share/openssl/man; \
 	for mandir in man*; do \
-		${INSTALL_SYMLINK} ../$$mandir \
+		ln -sfh ../$$mandir \
 		    ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \
 	done
 	set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \
 	while [ $$# -gt 0 ] ; do \
-		${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \
-		${INSTALL_SYMLINK} "$$2" \
-		    "${DESTDIR}/usr/share/openssl/man/$$1"; \
+		ln -sfh "$$2" "${DESTDIR}/usr/share/man/$$1"; \
+		ln -sfh "$$2" "${DESTDIR}/usr/share/openssl/man/$$1"; \
 		shift; shift; \
 	done
 	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \
 	while [ $$# -gt 0 ] ; do \
-		${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
+		ln -sfh "$$2" "${DESTDIR}/usr/share/nls/$$1"; \
 		shift; shift; \
 	done
 

Modified: stable/9/share/mk/bsd.incs.mk
==============================================================================
--- stable/9/share/mk/bsd.incs.mk	Tue Mar 19 19:49:06 2013	(r248530)
+++ stable/9/share/mk/bsd.incs.mk	Tue Mar 19 20:00:34 2013	(r248531)
@@ -73,7 +73,7 @@ installincludes:
 		t=${DESTDIR}$$1; \
 		shift; \
 		${ECHO} $$t -\> $$l; \
-		${INSTALL_SYMLINK} $$l $$t; \
+		ln -fs $$l $$t; \
 	done; true
 .endif
 .endif # !target(installincludes)

Modified: stable/9/share/mk/bsd.info.mk
==============================================================================
--- stable/9/share/mk/bsd.info.mk	Tue Mar 19 19:49:06 2013	(r248530)
+++ stable/9/share/mk/bsd.info.mk	Tue Mar 19 20:00:34 2013	(r248531)
@@ -113,7 +113,7 @@ DVIPS2ASCII?=	dvips2ascii
 
 .info.html:
 	${INFO2HTML} ${.IMPSRC}
-	${INSTALL_LINK} ${.TARGET:R}.info.Top.html ${.TARGET}
+	ln -f ${.TARGET:R}.info.Top.html ${.TARGET}
 
 .PATH: ${.CURDIR} ${SRCDIR}
 

Modified: stable/9/share/mk/bsd.lib.mk
==============================================================================
--- stable/9/share/mk/bsd.lib.mk	Tue Mar 19 19:49:06 2013	(r248530)
+++ stable/9/share/mk/bsd.lib.mk	Tue Mar 19 20:00:34 2013	(r248531)
@@ -178,9 +178,9 @@ ${SHLIB_NAME}: ${SOBJS} beforelinking
 ${SHLIB_NAME}: ${SOBJS}
 .endif
 	@${ECHO} building shared library ${SHLIB_NAME}
-	@rm -f ${SHLIB_NAME} ${SHLIB_LINK}
+	@rm -f ${.TARGET} ${SHLIB_LINK}
 .if defined(SHLIB_LINK)
-	@${INSTALL_SYMLINK} ${SHLIB_NAME} ${SHLIB_LINK}
+	@ln -fs ${.TARGET} ${SHLIB_LINK}
 .endif
 .if !defined(NM)
 	@${CC} ${LDFLAGS} ${SSP_CFLAGS} ${SOLINKOPTS} \
@@ -291,9 +291,9 @@ _libinstall:
 	    ${_INSTALLFLAGS} lib${LIB}.ld ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
 .else
 .if ${SHLIBDIR} == ${LIBDIR}
-	${INSTALL_SYMLINK} ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
+	ln -fs ${SHLIB_NAME} ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
 .else
-	${INSTALL_SYMLINK} ${_SHLIBDIRPREFIX}${SHLIBDIR}/${SHLIB_NAME} \
+	ln -fs ${_SHLIBDIRPREFIX}${SHLIBDIR}/${SHLIB_NAME} \
 	    ${DESTDIR}${LIBDIR}/${SHLIB_LINK}
 .if exists(${DESTDIR}${LIBDIR}/${SHLIB_NAME})
 	-chflags noschg ${DESTDIR}${LIBDIR}/${SHLIB_NAME}

Modified: stable/9/share/mk/bsd.links.mk
==============================================================================
--- stable/9/share/mk/bsd.links.mk	Tue Mar 19 19:49:06 2013	(r248530)
+++ stable/9/share/mk/bsd.links.mk	Tue Mar 19 20:00:34 2013	(r248531)
@@ -15,7 +15,7 @@ _installlinks:
 		t=${DESTDIR}$$1; \
 		shift; \
 		${ECHO} $$t -\> $$l; \
-		${INSTALL_LINK} $$l $$t; \
+		ln -f $$l $$t; \
 	done; true
 .endif
 .if defined(SYMLINKS) && !empty(SYMLINKS)
@@ -26,6 +26,6 @@ _installlinks:
 		t=${DESTDIR}$$1; \
 		shift; \
 		${ECHO} $$t -\> $$l; \
-		${INSTALL_SYMLINK} $$l $$t; \
+		ln -fs $$l $$t; \
 	done; true
 .endif

Modified: stable/9/share/mk/bsd.man.mk
==============================================================================
--- stable/9/share/mk/bsd.man.mk	Tue Mar 19 19:49:06 2013	(r248530)
+++ stable/9/share/mk/bsd.man.mk	Tue Mar 19 20:00:34 2013	(r248531)
@@ -216,7 +216,7 @@ _maninstall: ${MAN}
 		t=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}/$$name; \
 		${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
 		rm -f $${t} $${t}${MCOMPRESS_EXT}; \
-		${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}; \
+		ln $${l}${ZEXT} $${t}${ZEXT}; \
 	done
 .if defined(MANBUILDCAT) && !empty(MANBUILDCAT)
 	@set ${MLINKS:C/\.([^.]*)$/.\1 \1/}; \
@@ -231,7 +231,7 @@ _maninstall: ${MAN}
 		t=${DESTDIR}${CATDIR}$${sect}${MANSUBDIR}/$$name; \
 		${ECHO} $${t}${ZEXT} -\> $${l}${ZEXT}; \
 		rm -f $${t} $${t}${MCOMPRESS_EXT}; \
-		${INSTALL_LINK} $${l}${ZEXT} $${t}${ZEXT}; \
+		ln $${l}${ZEXT} $${t}${ZEXT}; \
 	done
 .endif
 .endif

Modified: stable/9/share/mk/bsd.own.mk
==============================================================================
--- stable/9/share/mk/bsd.own.mk	Tue Mar 19 19:49:06 2013	(r248530)
+++ stable/9/share/mk/bsd.own.mk	Tue Mar 19 20:00:34 2013	(r248531)
@@ -181,15 +181,6 @@ NLSMODE?=	${NOBINMODE}
 
 INCLUDEDIR?=	/usr/include
 
-#
-# install(1) parameters.
-#
-HRDLINK?=	-l h
-SYMLINK?=	-l s
-
-INSTALL_LINK?=		${INSTALL} ${HRDLINK}
-INSTALL_SYMLINK?=	${INSTALL} ${SYMLINK}
-
 # Common variables
 .if !defined(DEBUG_FLAGS)
 STRIP?=		-s

Modified: stable/9/usr.sbin/mergemaster/mergemaster.sh
==============================================================================
--- stable/9/usr.sbin/mergemaster/mergemaster.sh	Tue Mar 19 19:49:06 2013	(r248530)
+++ stable/9/usr.sbin/mergemaster/mergemaster.sh	Tue Mar 19 20:00:34 2013	(r248531)
@@ -629,7 +629,12 @@ case "${RERUN}" in
         ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs >/dev/null
         ;;
       esac
-      od=${TEMPROOT}/usr/obj
+      if [ -d `${MM_MAKE} -V .OBJDIR` ]; then
+	od=`${MM_MAKE} -V MAKEOBJDIRPREFIX`
+      else
+        od=${TEMPROOT}/usr/obj
+      fi
+      echo $od 1>&2
       ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs >/dev/null &&
       MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc >/dev/null &&
       MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc >/dev/null &&


More information about the svn-src-stable-9 mailing list