bsd.obj.mk (18545) | bsd.obj.mk (18566) |
---|---|
1# $Id: bsd.obj.mk,v 1.14 1996/09/24 04:17:14 ache Exp $ | 1# $Id: bsd.obj.mk,v 1.15 1996/09/28 19:39:18 nate Exp $ |
2# | 2# |
3# The include file | 3# The include file <bsd.obj.mk> handles creating the 'obj' directory |
4# and cleaning up object files, log files etc. 5# 6# 7# +++ variables +++ 8# 9# CLEANFILES Additional files to remove for the clean and cleandir targets. 10# | 4# and cleaning up object files, log files etc. 5# 6# 7# +++ variables +++ 8# 9# CLEANFILES Additional files to remove for the clean and cleandir targets. 10# |
11# MAKEOBJDIRPREFIX Specify somewhere other than /usr/obj to root the object 12# tree. Note: MAKEOBJDIRPREFIX is an *enviroment* variable 13# and does work proper only if set as enviroment variable, 14# not as global or command line variable! [obj] | 11# MAKEOBJDIR A pathname for the directory where the targets 12# are built. Note: MAKEOBJDIR is an *enviroment* variable 13# and works properly only if set as an enviroment variable, 14# not as a global or command line variable! |
15# | 15# |
16# E.g. use `env MAKEOBJDIR=temp-obj make' 17# 18# MAKEOBJDIRPREFIX Specifies somewhere other than /usr/obj to root the object 19# tree. Note: MAKEOBJDIRPREFIX is an *enviroment* variable 20# and works properly only if set as an enviroment variable, 21# not as a global or command line variable! 22# |
|
16# E.g. use `env MAKEOBJDIRPREFIX=/somewhere/obj make' 17# | 23# E.g. use `env MAKEOBJDIRPREFIX=/somewhere/obj make' 24# |
18# NOOBJ Do not create build directory in object tree. | 25# NOOBJ Do not create object directories. This should not be set 26# if anything is built. |
19# | 27# |
20# OBJLINK Create a symbolic link from ${CANONICALOBJDIR} to ${.CURDIR}/obj 21# Note: This BREAKS the read-only src tree rule! | 28# OBJLINK Create a symbolic link from ${.CURDIR}/obj to 29# ${CANONICALOBJDIR}. Note: this BREAKS the read-only source 30# tree rule! |
22# 23# +++ targets +++ 24# 25# clean: 26# remove a.out Errs errs mklog ${CLEANFILES} 27# 28# cleandir: 29# remove the build directory (and all its contents) created by obj --- 7 unchanged lines hidden (view full) --- 37.else 38CANONICALOBJDIR:=/usr/obj${.CURDIR} 39.endif 40 41# 42# Warn of unorthodox object directory 43# 44objwarn: | 31# 32# +++ targets +++ 33# 34# clean: 35# remove a.out Errs errs mklog ${CLEANFILES} 36# 37# cleandir: 38# remove the build directory (and all its contents) created by obj --- 7 unchanged lines hidden (view full) --- 46.else 47CANONICALOBJDIR:=/usr/obj${.CURDIR} 48.endif 49 50# 51# Warn of unorthodox object directory 52# 53objwarn: |
45.if !defined(NOOBJ) | 54.if !defined(NOOBJ) && ${.OBJDIR} != ${CANONICALOBJDIR} |
46.if ${.OBJDIR} == ${.CURDIR} 47 @${ECHO} "Warning: Object directory not changed from original ${.CURDIR}" | 55.if ${.OBJDIR} == ${.CURDIR} 56 @${ECHO} "Warning: Object directory not changed from original ${.CURDIR}" |
48.elif !defined(MAKEOBJDIRPREFIX) && ${.OBJDIR} != ${CANONICALOBJDIR} 49.if !defined(OBJLINK) | 57.elif !defined(MAKEOBJDIR) && !defined(MAKEOBJDIRPREFIX) && !defined(OBJLINK) |
50 @${ECHO} "Warning: Using ${.OBJDIR} as object directory instead of\ 51 canonical ${CANONICALOBJDIR}" 52.endif 53.endif | 58 @${ECHO} "Warning: Using ${.OBJDIR} as object directory instead of\ 59 canonical ${CANONICALOBJDIR}" 60.endif 61.endif |
54.endif | |
55 | 62 |
56 57 | |
58.if !target(obj) 59.if defined(NOOBJ) 60obj: 61.else 62.if !defined(OBJLINK) 63obj: _SUBDIR 64 @if ! test -d ${CANONICALOBJDIR}; then \ 65 mkdir -p ${CANONICALOBJDIR}; \ --- 81 unchanged lines hidden --- | 63.if !target(obj) 64.if defined(NOOBJ) 65obj: 66.else 67.if !defined(OBJLINK) 68obj: _SUBDIR 69 @if ! test -d ${CANONICALOBJDIR}; then \ 70 mkdir -p ${CANONICALOBJDIR}; \ --- 81 unchanged lines hidden --- |