From e0b2202ac04964b6a30306df2f859ee22933eb5e Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Wed, 3 Aug 2005 22:39:55 +0000 Subject: document cache file name, more use of $@, use exec where appropriate. okay deraadt@ --- distrib/crunch/crunchgen/crunchgen.1 | 6 ++++-- distrib/crunch/crunchgen/crunchgen.c | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'distrib/crunch') diff --git a/distrib/crunch/crunchgen/crunchgen.1 b/distrib/crunch/crunchgen/crunchgen.1 index 4d8a28dd2d0..a5c69e11bdc 100644 --- a/distrib/crunch/crunchgen/crunchgen.1 +++ b/distrib/crunch/crunchgen/crunchgen.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: crunchgen.1,v 1.16 2005/08/02 11:25:05 espie Exp $ +.\" $OpenBSD: crunchgen.1,v 1.17 2005/08/03 22:39:54 espie Exp $ .\" .\" .\" Copyright (c) 1994 University of Maryland @@ -60,7 +60,9 @@ For each component program, .Nm can optionally attempt to determine the object (.o) files that make up the program from its source directory Makefile. -This information is cached between runs. +This information is cached in a file named +.Pa .cache +between runs. .Nm uses the companion program .Xr crunchide 1 diff --git a/distrib/crunch/crunchgen/crunchgen.c b/distrib/crunch/crunchgen/crunchgen.c index 65b330bb669..948be3187b6 100644 --- a/distrib/crunch/crunchgen/crunchgen.c +++ b/distrib/crunch/crunchgen/crunchgen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crunchgen.c,v 1.22 2005/08/02 11:25:05 espie Exp $ */ +/* $OpenBSD: crunchgen.c,v 1.23 2005/08/03 22:39:54 espie Exp $ */ /* * Copyright (c) 1994 University of Maryland @@ -42,7 +42,7 @@ #include #include -#define CRUNCH_VERSION "0.2" +#define CRUNCH_VERSION "0.3" #define MAXLINELEN 16384 #define MAXFIELDS 2048 @@ -910,7 +910,7 @@ 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, "\tcd $(%s_SRCDIR) && $(MAKE) -f %s $(%s_OBJS)\n\n", + fprintf(outmk, "\tcd $(%s_SRCDIR) && exec $(MAKE) -f %s $(%s_OBJS)\n\n", p->ident, p->mf_name, p->ident); } else fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n", @@ -922,8 +922,8 @@ prog_makefile_rules(FILE * outmk, prog_t * p) fprintf(outmk, "%s_stub.c:\n", p->name); fprintf(outmk, "\techo \"" "int _crunched_%s_stub(int argc, char **argv, char **envp)" - "{return main(argc,argv,envp);}\" >%s_stub.c\n", - p->ident, p->name); + "{return main(argc,argv,envp);}\" >$@\n", + p->ident); fprintf(outmk, "%s.lo: %s_stub.o $(%s_OBJPATHS)\n", p->name, p->name, p->ident); fprintf(outmk, "\t$(LINK) -o $@ %s_stub.o $(%s_OBJPATHS)\n", -- cgit v1.2.3