Deleted Added
full compact
auto.obj.mk (246223) auto.obj.mk (281812)
1# $Id: auto.obj.mk,v 1.8 2011/08/08 17:35:20 sjg Exp $
1# $Id: auto.obj.mk,v 1.10 2015/04/16 16:59:00 sjg Exp $
2#
3# @(#) Copyright (c) 2004, Simon J. Gerraty
4#
5# This file is provided in the hope that it will
6# be of use. There is absolutely NO WARRANTY.
7# Permission to copy, redistribute or otherwise
8# use this file is hereby granted provided that
9# the above copyright notice and this notice are

--- 19 unchanged lines hidden (view full) ---

29 done > /dev/null 2>&1; \
30 mkdir $$d || exit $$?; \
31 done; }
32.endif
33
34# if MKOBJDIRS is set to auto (and NOOBJ isn't defined) do some magic...
35# This will automatically create objdirs as needed.
36# Skip it if we are just doing 'clean'.
2#
3# @(#) Copyright (c) 2004, Simon J. Gerraty
4#
5# This file is provided in the hope that it will
6# be of use. There is absolutely NO WARRANTY.
7# Permission to copy, redistribute or otherwise
8# use this file is hereby granted provided that
9# the above copyright notice and this notice are

--- 19 unchanged lines hidden (view full) ---

29 done > /dev/null 2>&1; \
30 mkdir $$d || exit $$?; \
31 done; }
32.endif
33
34# if MKOBJDIRS is set to auto (and NOOBJ isn't defined) do some magic...
35# This will automatically create objdirs as needed.
36# Skip it if we are just doing 'clean'.
37.if ${MK_AUTO_OBJ:Uno} == "yes"
38MKOBJDIRS= auto
39.endif
37.if !defined(NOOBJ) && !defined(NO_OBJ) && ${MKOBJDIRS:Uno} == auto
38# Use __objdir here so it is easier to tweak without impacting
39# the logic.
40__objdir?= ${MAKEOBJDIR}
40.if !defined(NOOBJ) && !defined(NO_OBJ) && ${MKOBJDIRS:Uno} == auto
41# Use __objdir here so it is easier to tweak without impacting
42# the logic.
43__objdir?= ${MAKEOBJDIR}
44__objdir:= ${__objdir:tA}
41.if ${.OBJDIR} != ${__objdir}
42# We need to chdir, make the directory if needed
43.if !exists(${__objdir}/) && \
44 (${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "")
45# This will actually make it...
46__objdir_made != echo ${__objdir}/; umask ${OBJDIR_UMASK:U002}; \
47 ${ECHO_TRACE} "[Creating objdir ${__objdir}...]" >&2; \
48 ${Mkdirs}; Mkdirs ${__objdir}
45.if ${.OBJDIR} != ${__objdir}
46# We need to chdir, make the directory if needed
47.if !exists(${__objdir}/) && \
48 (${.TARGETS} == "" || ${.TARGETS:Nclean*:N*clean:Ndestroy*} != "")
49# This will actually make it...
50__objdir_made != echo ${__objdir}/; umask ${OBJDIR_UMASK:U002}; \
51 ${ECHO_TRACE} "[Creating objdir ${__objdir}...]" >&2; \
52 ${Mkdirs}; Mkdirs ${__objdir}
53__objdir:= ${__objdir:tA}
49.endif
50# This causes make to use the specified directory as .OBJDIR
51.OBJDIR: ${__objdir}
52.if ${.OBJDIR} != ${__objdir} && ${__objdir_made:Uno:M${__objdir}/*} != ""
54.endif
55# This causes make to use the specified directory as .OBJDIR
56.OBJDIR: ${__objdir}
57.if ${.OBJDIR} != ${__objdir} && ${__objdir_made:Uno:M${__objdir}/*} != ""
53.error could not use ${__objdir}
58.error could not use ${__objdir}: .OBJDIR=${.OBJDIR}
54.endif
55.endif
56.endif
59.endif
60.endif
61.endif