Deleted Added
full compact
bsd.obj.mk (22988) bsd.obj.mk (25316)
1# $Id$
1# $Id: bsd.obj.mk,v 1.19 1997/02/22 13:56:12 peter Exp $
2#
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.

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

61.endif
62
63.if !target(obj)
64.if defined(NOOBJ)
65obj:
66.else
67.if !defined(OBJLINK)
68obj: _SUBDIR
2#
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.

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

61.endif
62
63.if !target(obj)
64.if defined(NOOBJ)
65obj:
66.else
67.if !defined(OBJLINK)
68obj: _SUBDIR
69 @if ! test -d ${CANONICALOBJDIR}; then \
69 @if ! test -d ${CANONICALOBJDIR}/; then \
70 mkdir -p ${CANONICALOBJDIR}; \
70 mkdir -p ${CANONICALOBJDIR}; \
71 if ! test -d ${CANONICALOBJDIR}; then \
71 if ! test -d ${CANONICALOBJDIR}/; then \
72 ${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
73 exit 1; \
74 fi; \
75 ${ECHO} "${CANONICALOBJDIR} created for ${.CURDIR}"; \
76 fi
77.else
78obj: _SUBDIR
72 ${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
73 exit 1; \
74 fi; \
75 ${ECHO} "${CANONICALOBJDIR} created for ${.CURDIR}"; \
76 fi
77.else
78obj: _SUBDIR
79 @if ! test -d ${CANONICALOBJDIR}; then \
79 @if ! test -d ${CANONICALOBJDIR}/; then \
80 mkdir -p ${CANONICALOBJDIR}; \
80 mkdir -p ${CANONICALOBJDIR}; \
81 if ! test -d ${CANONICALOBJDIR}; then \
81 if ! test -d ${CANONICALOBJDIR}/; then \
82 ${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
83 exit 1; \
84 fi; \
85 rm -f ${.CURDIR}/obj; \
86 ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
87 ${ECHO} "${.CURDIR} -> ${CANONICALOBJDIR}"; \
88 fi
89.endif
90.endif
91.endif
92
93.if !target(objlink)
94objlink: _SUBDIR
82 ${ECHO} "Unable to create ${CANONICALOBJDIR}."; \
83 exit 1; \
84 fi; \
85 rm -f ${.CURDIR}/obj; \
86 ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
87 ${ECHO} "${.CURDIR} -> ${CANONICALOBJDIR}"; \
88 fi
89.endif
90.endif
91.endif
92
93.if !target(objlink)
94objlink: _SUBDIR
95 @if test -d ${CANONICALOBJDIR}; then \
95 @if test -d ${CANONICALOBJDIR}/; then \
96 rm -f ${.CURDIR}/obj; \
97 ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
98 else \
99 echo "No ${CANONICALOBJDIR} to link to - do a make obj."; \
100 fi
101.endif
102
103#
104# where would that obj directory be?
105#
106.if !target(whereobj)
107whereobj:
108 @cd ${.CURDIR}; ${MAKE} -V .OBJDIR
109.endif
110
111#
112# cleanup
113#
114cleanobj:
96 rm -f ${.CURDIR}/obj; \
97 ln -s ${CANONICALOBJDIR} ${.CURDIR}/obj; \
98 else \
99 echo "No ${CANONICALOBJDIR} to link to - do a make obj."; \
100 fi
101.endif
102
103#
104# where would that obj directory be?
105#
106.if !target(whereobj)
107whereobj:
108 @cd ${.CURDIR}; ${MAKE} -V .OBJDIR
109.endif
110
111#
112# cleanup
113#
114cleanobj:
115 @if [ -d ${CANONICALOBJDIR} ]; then \
115 @if [ -d ${CANONICALOBJDIR}/ ]; then \
116 rm -rf ${CANONICALOBJDIR}; \
117 else \
118 cd ${.CURDIR} && ${MAKE} clean cleandepend; \
119 fi
120 @if [ -h ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi
121
122.if !target(cleanfiles)
123cleanfiles:

--- 26 unchanged lines hidden ---
116 rm -rf ${CANONICALOBJDIR}; \
117 else \
118 cd ${.CURDIR} && ${MAKE} clean cleandepend; \
119 fi
120 @if [ -h ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi
121
122.if !target(cleanfiles)
123cleanfiles:

--- 26 unchanged lines hidden ---