2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <sys/types.h>
18 #include "AFS_component_version_number.c"
21 int mc_copy(FILE *, FILE *, char **);
24 main(int argc, char **argv)
34 ("config: usage is 'config <from file> <to file> <system name>'\n");
37 infile = fopen(argv[1], "r");
39 printf("config: input file %s not found.\n", argv[1]);
42 outfile = fopen(argv[2], "w+");
44 printf("config: output file %s not found.\n", argv[2]);
47 memset (alist, 0, sizeof (alist));
51 /* This allows JUST arch or JUST OS/version,
52 * Linux 2.6 uses the in-kernel build system, so
53 * just 'linux26' is enough. */
54 sysname = strdup (alist[0]);
55 alist[2] = strchr (sysname, '_');
61 code = mc_copy(infile, outfile, alist);
63 printf("config: failed to correctly write makefile '%s', code %d\n",
67 printf("Wrote new makefile '%s'.\n", argv[2]);