#include <sys/file.h>
#include <sys/time.h>
#include <stdio.h>
+#include <string.h>
#include <errno.h>
#include "AFS_component_version_number.c"
{
register FILE *infile;
register FILE *outfile;
- char *alist[3];
+ char *alist[5];
register int code;
+ char *sysname;
if (argc != 4) {
printf
printf("config: output file %s not found.\n", argv[2]);
exit(1);
}
+ memset (alist, 0, sizeof (alist));
alist[0] = argv[3];
alist[1] = "all";
- alist[2] = NULL;
+
+ /* This allows JUST arch or JUST OS/version,
+ * Linux 2.6 uses the in-kernel build system, so
+ * just 'linux26' is enough. */
+ sysname = strdup (alist[0]);
+ alist[2] = strchr (sysname, '_');
+ if (alist[2]) {
+ alist[3] = sysname;
+ *alist[2] = 0;
+ alist[2]++;
+ }
code = mc_copy(infile, outfile, alist);
if (code) {
printf("config: failed to correctly write makefile '%s', code %d\n",
LINUX_KERNEL_PATH=@LINUX_KERNEL_PATH@
# System specific build commands and flags
-<i386_linux26>
+<linux26>
# All the platform-specific and kernel-related things are provided by
# the kernel build system. So we should _not_ use COMMON_KERN_CFLAGS!
CCFLAGS = -Wno-strict-prototypes
include Makefile.common
-<i386_linux26>
+<linux26>
LINUX_MODULE_EXT=ko
-<all -i386_linux26>
+<all -linux26>
LINUX_MODULE_EXT=o
<all>
libafs.bm: $(LIBAFS_BM)
echo BM Build Complete
-<i386_linux26>
+<linux26>
${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: libafs.ko
cp libafs.ko $@
@TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
$(MAKE) -C ${LINUX_KERNEL_PATH} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
-<all -i386_linux26>
+<all -linux26>
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
$(RM) -f $@
$(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)