diff --git a/usr.bin/crunch/crunchgen/crunchgen.c b/usr.bin/crunch/crunchgen/crunchgen.c index 16aa8003808d..ebe3d4fc4bb8 100644 --- a/usr.bin/crunch/crunchgen/crunchgen.c +++ b/usr.bin/crunch/crunchgen/crunchgen.c @@ -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 * All Rights Reserved. @@ -33,7 +33,7 @@ */ #include #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 #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}.strip:\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\tcp ${PROG} ${PROG}.unstripped && \\\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, "objs: $(SUBMAKE_TARGETS)\n"); 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); }