diff options
| author | Brian Somers <brian@FreeBSD.org> | 1998-01-17 14:21:21 +0000 |
|---|---|---|
| committer | Brian Somers <brian@FreeBSD.org> | 1998-01-17 14:21:21 +0000 |
| commit | ced716c30fee118f9deecab56ddbd969f77d32b6 (patch) | |
| tree | b61391f2de07c962fea6ef362c25d2fae937951b /usr.sbin/crunch | |
| parent | bf770561eebdc852b225da413c34b44d1b404014 (diff) | |
Notes
Diffstat (limited to 'usr.sbin/crunch')
| -rw-r--r-- | usr.sbin/crunch/crunchgen/crunchgen.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c index ae0a78ffc0fc..946cbd13bcbd 100644 --- a/usr.sbin/crunch/crunchgen/crunchgen.c +++ b/usr.sbin/crunch/crunchgen/crunchgen.c @@ -748,6 +748,9 @@ void top_makefile_rules(FILE *outmk) fprintf(outmk, "SUBMAKE_TARGETS="); for(p = progs; p != NULL; p = p->next) fprintf(outmk, " %s_make", p->ident); + fprintf(outmk, "\nSUBCLEAN_TARGETS="); + for(p = progs; p != NULL; p = p->next) + fprintf(outmk, " %s_clean", p->ident); fprintf(outmk, "\n\n"); fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n", @@ -757,8 +760,10 @@ void top_makefile_rules(FILE *outmk) fprintf(outmk, "\tstrip %s\n", execfname); fprintf(outmk, "all: objs exe\nobjs: $(SUBMAKE_TARGETS)\n"); fprintf(outmk, "exe: %s\n", execfname); + fprintf(outmk, "realclean: clean subclean\n"); fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n", execfname); + fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n"); } @@ -773,8 +778,10 @@ void prog_makefile_rules(FILE *outmk, prog_t *p) fprintf(outmk, "%s_OBJS=", p->ident); output_strlst(outmk, p->objs); fprintf(outmk, "%s_make:\n", p->ident); - fprintf(outmk, "\t(cd $(%s_SRCDIR) && make depend && make $(%s_OBJS))\n\n", + fprintf(outmk, "\t(cd $(%s_SRCDIR) && make depend && make $(%s_OBJS))\n", p->ident, p->ident); + fprintf(outmk, "%s_clean:\n", p->ident); + fprintf(outmk, "\t(cd $(%s_SRCDIR) && make clean)\n\n", p->ident); } else fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n", |
