Make crunchgen crunch pre-built object files again, i.e.:

progs prog1
    special prog1 objdir ../../prog1/obj
    special prog1 objs prog1.o

This fixes a bug that I introduced around the time of 4.2-release.

Reported by:	Larry Baird <lab@gta.com>
This commit is contained in:
Josef Karthauser 2001-08-15 14:37:26 +00:00
parent 89a0be2e4f
commit 11384533ea

View File

@ -636,7 +636,7 @@ void fillin_program(prog_t *p)
if (!p->objs && p->srcdir && is_nonempty_file(path))
fillin_program_objs(p, path);
if (!p->srcdir && verbose)
if (!p->srcdir && !p->objdir && verbose)
warnx("%s: %s: %s",
"warning: could not find source directory",
infilename, p->name);
@ -644,7 +644,7 @@ void fillin_program(prog_t *p)
warnx("%s: %s: warning: could not find any .o files",
infilename, p->name);
if (!p->srcdir || !p->objs)
if (!p->objdir || !p->objs)
p->goterror = 1;
}
@ -962,18 +962,18 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
fprintf(outmk, "\n# -------- %s\n\n", p->name);
fprintf(outmk, "%s_OBJDIR=", p->ident);
if (p->objdir)
fprintf(outmk, "%s", p->objdir);
else
fprintf(outmk, "$(MAKEOBJDIRPREFIX)/$(%s_REALSRCDIR)\n",
p->ident);
fprintf(outmk, "\n");
if (p->srcdir && p->objs) {
fprintf(outmk, "%s_SRCDIR=%s\n", p->ident, p->srcdir);
fprintf(outmk, "%s_REALSRCDIR=%s\n", p->ident, p->realsrcdir);
fprintf(outmk, "%s_OBJDIR=", p->ident);
if (p->objdir)
fprintf(outmk, "%s", p->objdir);
else
fprintf(outmk, "$(MAKEOBJDIRPREFIX)/$(%s_REALSRCDIR)\n",
p->ident);
fprintf(outmk, "\n");
fprintf(outmk, "%s_OBJS=", p->ident);
output_strlst(outmk, p->objs);
if (p->buildopts != NULL) {