diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-08-03 22:39:55 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-08-03 22:39:55 +0000 |
commit | e0b2202ac04964b6a30306df2f859ee22933eb5e (patch) | |
tree | 1703a7f771ee998c3ac8d15c99bb39ff5f8f9438 /distrib/crunch | |
parent | e01fb4a945f7e440741ab63b7b284ea1b0508e12 (diff) |
document cache file name,
more use of $@, use exec where appropriate.
okay deraadt@
Diffstat (limited to 'distrib/crunch')
-rw-r--r-- | distrib/crunch/crunchgen/crunchgen.1 | 6 | ||||
-rw-r--r-- | distrib/crunch/crunchgen/crunchgen.c | 10 |
2 files changed, 9 insertions, 7 deletions
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 <conf-name>.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 <sys/stat.h> #include <sys/param.h> -#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", |