-/* $OpenBSD: config.h,v 1.29 2016/10/16 09:35:40 tb Exp $ */
+/* $OpenBSD: config.h,v 1.30 2017/06/22 15:57:16 deraadt Exp $ */
/* $NetBSD: config.h,v 1.30 1997/02/02 21:12:30 thorpej Exp $ */
/*
struct hashtab;
const char *conffile; /* source file, e.g., "GENERIC.sparc" */
+const char *last_component;
const char *machine; /* machine type, e.g., "sparc" or "sun3" */
const char *machinearch; /* machine arch, e.g., "sparc" or "m68k" */
const char *srcdir; /* path to source directory (rel. to build) */
-/* $OpenBSD: main.c,v 1.58 2017/06/19 17:35:04 deraadt Exp $ */
+/* $OpenBSD: main.c,v 1.59 2017/06/22 15:57:16 deraadt Exp $ */
/* $NetBSD: main.c,v 1.22 1997/02/02 21:12:33 thorpej Exp $ */
/*
main(int argc, char *argv[])
{
char *p;
- const char *last_component;
char *outfile = NULL;
int ch, eflag, uflag, fflag;
char dirbuffer[PATH_MAX];
-/* $OpenBSD: mkmakefile.c,v 1.42 2016/10/16 17:50:00 tb Exp $ */
+/* $OpenBSD: mkmakefile.c,v 1.43 2017/06/22 15:57:16 deraadt Exp $ */
/* $NetBSD: mkmakefile.c,v 1.34 1997/02/02 21:12:36 thorpej Exp $ */
/*
".SUFFIXES:\n"
".SUFFIXES: .s .S .c .o\n\n"
- ".PHONY: depend all install clean tags\n\n"
+ ".PHONY: depend all install clean tags newbsd update-link\n\n"
".c.o:\n"
"\t${NORMAL_C}\n\n"
}
if (fputs("\t${NORMAL_C}\n\n", fp) < 0)
return (1);
+
+ if (fprintf(fp, "new%s: gap.o\n", nm) < 0)
+ return (1);
+ if (fprintf(fp,
+ "\t${SYSTEM_LD_HEAD}\n"
+ "\t${SYSTEM_LD} swap%s.o\n"
+ "\t${SYSTEM_LD_TAIL}\n"
+ "\tmv -f new%s %s\n\n",
+ swname, nm, nm) < 0)
+ return (1);
+
+ if (fprintf(fp, "update-link:\n") < 0)
+ return (1);
+ if (fprintf(fp,
+ "\tmkdir -p -m 700 /usr/share/compile\n"
+ "\trm -rf /usr/share/compile/%s /usr/share/compile.tgz\n"
+ "\tmkdir /usr/share/compile/%s\n"
+ "\ttar -chf - Makefile makegap.sh ld.script *.o | \\\n"
+ "\t tar -C /usr/share/compile/%s -xf -\n\n",
+ last_component, last_component, last_component) < 0)
+ return (1);
}
return (0);
}