Keep unstripped binary in $OBJ, use are timestamp instead of prog.stripped.
Patentially useful as a source of symbol information for debugging.
This commit is contained in:
parent
4e043afc74
commit
9778762a60
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: crunchgen.c,v 1.48 2003/06/01 02:03:22 thorpej Exp $ */
|
/* $NetBSD: crunchgen.c,v 1.49 2003/07/09 19:51:07 dsl Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994 University of Maryland
|
* Copyright (c) 1994 University of Maryland
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
#if defined(__RCSID) && !defined(lint)
|
#if defined(__RCSID) && !defined(lint)
|
||||||
__RCSID("$NetBSD: crunchgen.c,v 1.48 2003/06/01 02:03:22 thorpej Exp $");
|
__RCSID("$NetBSD: crunchgen.c,v 1.49 2003/07/09 19:51:07 dsl Exp $");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_CONFIG_H
|
#if HAVE_CONFIG_H
|
||||||
|
@ -861,14 +861,15 @@ void top_makefile_rules(FILE *outmk)
|
||||||
fprintf(outmk, "${PROG}.crunched: ${SUBMAKE_TARGETS} .WAIT ${PROG}.strip\n");
|
fprintf(outmk, "${PROG}.crunched: ${SUBMAKE_TARGETS} .WAIT ${PROG}.strip\n");
|
||||||
fprintf(outmk, "${PROG}.strip:\n");
|
fprintf(outmk, "${PROG}.strip:\n");
|
||||||
fprintf(outmk, "\t${MAKE} -f ${PROG}.mk ${PROG}\n");
|
fprintf(outmk, "\t${MAKE} -f ${PROG}.mk ${PROG}\n");
|
||||||
fprintf(outmk, "\t[ -f ${PROG}.stripped -a ! ${PROG} -nt ${PROG}.stripped ] || { \\\n");
|
fprintf(outmk, "\t@[ -f ${PROG}.unstripped -a ! ${PROG} -nt ${PROG}.unstripped ] || { \\\n");
|
||||||
fprintf(outmk, "\t\techo stripping ${PROG}; \\\n");
|
fprintf(outmk, "\t\techo stripping ${PROG}; \\\n");
|
||||||
|
fprintf(outmk, "\t\tcp ${PROG} ${PROG}.unstripped && \\\n");
|
||||||
fprintf(outmk, "\t\t${OBJCOPY} -S -R .note -R .ident ${PROG} && \\\n");
|
fprintf(outmk, "\t\t${OBJCOPY} -S -R .note -R .ident ${PROG} && \\\n");
|
||||||
fprintf(outmk, "\t\ttouch ${PROG}.stripped; \\\n");
|
fprintf(outmk, "\t\ttouch ${PROG}.unstripped; \\\n");
|
||||||
fprintf(outmk, "\t}\n");
|
fprintf(outmk, "\t}\n");
|
||||||
fprintf(outmk, "objs: $(SUBMAKE_TARGETS)\n");
|
fprintf(outmk, "objs: $(SUBMAKE_TARGETS)\n");
|
||||||
fprintf(outmk, "exe: %s\n", execfname);
|
fprintf(outmk, "exe: %s\n", execfname);
|
||||||
fprintf(outmk, "clean:\n\trm -rf %s *.cro *.cro.syms *.o *_stub.c ${CRUNCHEDOBJSDIRS} ${PROG}.stripped\n",
|
fprintf(outmk, "clean:\n\trm -rf %s *.cro *.cro.syms *.o *_stub.c ${CRUNCHEDOBJSDIRS} $[PROG}.unstripped\n",
|
||||||
execfname);
|
execfname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue