diff options
author | bde <bde@FreeBSD.org> | 1997-12-19 18:48:45 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-12-19 18:48:45 +0000 |
commit | ae349861e586a926e4d38e6cf9dcdaf210ec2f33 (patch) | |
tree | 8215d342ac8e9f8e639abe188e07b6444b5d230a /share/mk/bsd.obj.mk | |
parent | 8e957697c83621114a5d0afe449498991460beb3 (diff) | |
download | FreeBSD-src-ae349861e586a926e4d38e6cf9dcdaf210ec2f33.zip FreeBSD-src-ae349861e586a926e4d38e6cf9dcdaf210ec2f33.tar.gz |
Only remove ${CLEANFILES} in the default clean rule. In particular,
don't remove a.out explicitly. a.out should only be generated for
libraries and is removed in the non-default rule in bsd.lib.mk.
Removed undocumented cleanfiles target. It was the same as the
default clean target except it didn't descend into subdirs. It was
different from special clean targets in other ways. This feature
hasn't been missed for more important targets.
Removed unused default cleandepend target. bsd.dep.mk has a better
version which is always used.
Use a better rule for checkdpadd in the BINFORMAT=aout case. This
mainly checks that ld -f is working correctly. The old rule is
still available via `make BINFORMAT=foo checkdpadd' and should be
used to check for regressions under 2.2 where ld -f is not available.
Diffstat (limited to 'share/mk/bsd.obj.mk')
-rw-r--r-- | share/mk/bsd.obj.mk | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index 5c7f44a..c62f3f0 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -1,7 +1,7 @@ -# $Id: bsd.obj.mk,v 1.19 1997/02/22 13:56:12 peter Exp $ +# $Id: bsd.obj.mk,v 1.20 1997/04/30 17:04:11 bde Exp $ # # The include file <bsd.obj.mk> handles creating the 'obj' directory -# and cleaning up object files, log files etc. +# and cleaning up object files, etc. # # # +++ variables +++ @@ -32,7 +32,7 @@ # +++ targets +++ # # clean: -# remove a.out Errs errs mklog ${CLEANFILES} +# remove ${CLEANFILES} # # cleandir: # remove the build directory (and all its contents) created by obj @@ -108,9 +108,6 @@ whereobj: @cd ${.CURDIR}; ${MAKE} -V .OBJDIR .endif -# -# cleanup -# cleanobj: @if [ -d ${CANONICALOBJDIR}/ ]; then \ rm -rf ${CANONICALOBJDIR}; \ @@ -119,30 +116,31 @@ cleanobj: fi @if [ -h ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi -.if !target(cleanfiles) -cleanfiles: - rm -f a.out Errs errs mklog ${CLEANFILES} -.endif - -# see bsd.dep.mk -.if !target(cleandepend) -cleandepend: - @rm -f .depend -.endif - .if !target(clean) -clean: cleanfiles _SUBDIR +clean: _SUBDIR +.if defined(CLEANFILES) && !empty(CLEANFILES) + rm -f ${CLEANFILES} +.endif .endif .if !target(checkdpadd) checkdpadd: _SUBDIR .if (defined(DPADD) || defined(LDADD)) checkdpadd: +.if ${BINFORMAT} != aout @if [ "${DPADD:S;^/usr/lib/lib;-l;S;.a$;;}" != "${LDADD}" ] ; then \ echo ${.CURDIR} ; \ echo "DPADD -> " ${DPADD:S;^/usr/lib/lib;-l;S;.a$;;} ; \ echo "LDADD = " ${LDADD} ; \ fi +.else + @dpadd=`echo \`ld -Bstatic -f ${LDDESTDIR} ${LDADD}\`` ; \ + if [ "$$dpadd" != "${DPADD}" ] ; then \ + echo ${.CURDIR} ; \ + echo "LDADD -> " $$dpadd ; \ + echo "DPADD = " ${DPADD} ; \ + fi +.endif .endif .endif |