mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
makefileproto-configer-cleanup-20040728
make config tool for MakefileProto processing able to deal with e.g. "linux26" for all linux 2.6 platforms
This commit is contained in:
parent
b1289615e1
commit
0bc9af9ed9
@ -12,6 +12,7 @@
|
|||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "AFS_component_version_number.c"
|
#include "AFS_component_version_number.c"
|
||||||
@ -24,8 +25,9 @@ main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
register FILE *infile;
|
register FILE *infile;
|
||||||
register FILE *outfile;
|
register FILE *outfile;
|
||||||
char *alist[3];
|
char *alist[5];
|
||||||
register int code;
|
register int code;
|
||||||
|
char *sysname;
|
||||||
|
|
||||||
if (argc != 4) {
|
if (argc != 4) {
|
||||||
printf
|
printf
|
||||||
@ -42,9 +44,20 @@ main(int argc, char **argv)
|
|||||||
printf("config: output file %s not found.\n", argv[2]);
|
printf("config: output file %s not found.\n", argv[2]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
memset (alist, 0, sizeof (alist));
|
||||||
alist[0] = argv[3];
|
alist[0] = argv[3];
|
||||||
alist[1] = "all";
|
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);
|
code = mc_copy(infile, outfile, alist);
|
||||||
if (code) {
|
if (code) {
|
||||||
printf("config: failed to correctly write makefile '%s', code %d\n",
|
printf("config: failed to correctly write makefile '%s', code %d\n",
|
||||||
|
@ -35,7 +35,7 @@ COMMON_DEFINES=-D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
|
|||||||
LINUX_KERNEL_PATH=@LINUX_KERNEL_PATH@
|
LINUX_KERNEL_PATH=@LINUX_KERNEL_PATH@
|
||||||
|
|
||||||
# System specific build commands and flags
|
# System specific build commands and flags
|
||||||
<i386_linux26>
|
<linux26>
|
||||||
# All the platform-specific and kernel-related things are provided by
|
# All the platform-specific and kernel-related things are provided by
|
||||||
# the kernel build system. So we should _not_ use COMMON_KERN_CFLAGS!
|
# the kernel build system. So we should _not_ use COMMON_KERN_CFLAGS!
|
||||||
CCFLAGS = -Wno-strict-prototypes
|
CCFLAGS = -Wno-strict-prototypes
|
||||||
@ -104,9 +104,9 @@ DESTDIRS=linux_destdirs
|
|||||||
|
|
||||||
include Makefile.common
|
include Makefile.common
|
||||||
|
|
||||||
<i386_linux26>
|
<linux26>
|
||||||
LINUX_MODULE_EXT=ko
|
LINUX_MODULE_EXT=ko
|
||||||
<all -i386_linux26>
|
<all -linux26>
|
||||||
LINUX_MODULE_EXT=o
|
LINUX_MODULE_EXT=o
|
||||||
<all>
|
<all>
|
||||||
|
|
||||||
@ -229,7 +229,7 @@ libafs.ep: $(LIBAFS_EP)
|
|||||||
libafs.bm: $(LIBAFS_BM)
|
libafs.bm: $(LIBAFS_BM)
|
||||||
echo BM Build Complete
|
echo BM Build Complete
|
||||||
|
|
||||||
<i386_linux26>
|
<linux26>
|
||||||
${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: libafs.ko
|
${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: libafs.ko
|
||||||
cp libafs.ko $@
|
cp libafs.ko $@
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ libafs.ko: .FORCE
|
|||||||
@TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
|
@TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
|
||||||
$(MAKE) -C ${LINUX_KERNEL_PATH} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
|
$(MAKE) -C ${LINUX_KERNEL_PATH} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
|
||||||
|
|
||||||
<all -i386_linux26>
|
<all -linux26>
|
||||||
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
|
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
|
||||||
$(RM) -f $@
|
$(RM) -f $@
|
||||||
$(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
|
$(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
|
||||||
|
Loading…
Reference in New Issue
Block a user