mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 06:50:12 +00:00
Fix libafs_tree's cross-architecture support
The results of libafs_tree are supposed to build on any platform that shares the same basic kernel code, but this had broken in two ways: libafs_tree was including a pre-built afs/param.h, which needs to be regenerated on different architectures, and the Linux kernel build makefile was being pre-generated despite having some architecture-specific options. Copy over more of src/config and postpone generation of afs/param.h and generation of libafs/Makefile to the libafs build. Remove the substitution of AFS_SYSNAME from make_libafs_tree.pl; it was unused and now definitely shouldn't be used since it will break the architecture-independence of the resulting tree. Change-Id: I2730d3745cc67cf5f3ae61cf4643842f87865a80 Reviewed-on: http://gerrit.openafs.org/2019 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
8aa5328bd5
commit
f924010fbc
@ -1,3 +1,5 @@
|
|||||||
|
# -*- makefile -*-
|
||||||
|
#
|
||||||
# Copyright 2000, International Business Machines Corporation and others.
|
# Copyright 2000, International Business Machines Corporation and others.
|
||||||
# All Rights Reserved.
|
# All Rights Reserved.
|
||||||
#
|
#
|
||||||
@ -5,12 +7,19 @@
|
|||||||
# License. For details, see the LICENSE file in the top-level source
|
# License. For details, see the LICENSE file in the top-level source
|
||||||
# directory or online at http://www.openafs.org/dl/license10.html
|
# directory or online at http://www.openafs.org/dl/license10.html
|
||||||
|
|
||||||
|
include src/config/Makefile.config
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
cd src && cd config && $(MAKE)
|
||||||
|
src/config/config src/libafs/MakefileProto \
|
||||||
|
src/libafs/Makefile ${SYS_NAME}
|
||||||
cd src && cd libafs && $(MAKE)
|
cd src && cd libafs && $(MAKE)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
cd src && cd config && $(MAKE) clean
|
||||||
cd src && cd libafs && $(MAKE) clean
|
cd src && cd libafs && $(MAKE) clean
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f Makefile src/config/Makefile.config src/config/Makefile.version \
|
rm -f Makefile src/config/Makefile src/config/Makefile.config \
|
||||||
src/libafs/Makefile.common src/libafs/Makefile
|
src/config/Makefile.version src/libafs/Makefile.common \
|
||||||
|
src/libafs/Makefile
|
||||||
|
@ -436,14 +436,12 @@ ${DEST}/bin/dedebug: dedebug
|
|||||||
#
|
#
|
||||||
# libafs build targets
|
# libafs build targets
|
||||||
#
|
#
|
||||||
libafs_setup: config export
|
libafs: config export lwp_depinstall rx_depinstall vlserver_depinstall tvlserver_depinstall rxkad_depinstall fsint_depinstall \
|
||||||
src/config/config src/libafs/MakefileProto.${MKAFS_OSTYPE} src/libafs/Makefile ${SYS_NAME}
|
|
||||||
|
|
||||||
libafs: libafs_setup lwp_depinstall rx_depinstall vlserver_depinstall tvlserver_depinstall rxkad_depinstall fsint_depinstall \
|
|
||||||
libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall sys_depinstall
|
libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall sys_depinstall
|
||||||
|
src/config/config src/libafs/MakefileProto.${MKAFS_OSTYPE} src/libafs/Makefile ${SYS_NAME}
|
||||||
+${COMPILE_PART1} libafs ${COMPILE_PART2}
|
+${COMPILE_PART1} libafs ${COMPILE_PART2}
|
||||||
|
|
||||||
libafs_tree: libafs_setup lwp_depinstall rx_depinstall vlserver_depinstall tvlserver_depinstall rxkad_depinstall fsint_depinstall \
|
libafs_tree: export lwp_depinstall rx_depinstall vlserver_depinstall tvlserver_depinstall rxkad_depinstall fsint_depinstall \
|
||||||
libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall sys_depinstall
|
libacl_depinstall afs_depinstall dir_depinstall rxstat_depinstall sys_depinstall
|
||||||
${TOP_SRCDIR}/config/make_libafs_tree.pl \
|
${TOP_SRCDIR}/config/make_libafs_tree.pl \
|
||||||
-sn $(SYS_NAME) \
|
-sn $(SYS_NAME) \
|
||||||
|
@ -15,8 +15,10 @@ OPENAFS_CONFIGURE_COMMON
|
|||||||
|
|
||||||
AC_OUTPUT( \
|
AC_OUTPUT( \
|
||||||
Makefile \
|
Makefile \
|
||||||
|
src/config/Makefile \
|
||||||
src/config/Makefile.config \
|
src/config/Makefile.config \
|
||||||
src/config/Makefile.version:src/config/Makefile.version-NOCML.in \
|
src/config/Makefile.version-CML \
|
||||||
|
src/config/Makefile.version-NOCML \
|
||||||
src/libafs/Makefile.common \
|
src/libafs/Makefile.common \
|
||||||
src/libafs/Makefile \
|
src/libafs/MakefileProto \
|
||||||
)
|
)
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
Makefile.in
|
||||||
Makefile.config.in
|
Makefile.config.in
|
||||||
|
Makefile.version-CML.in
|
||||||
Makefile.version-NOCML.in
|
Makefile.version-NOCML.in
|
||||||
afsconfig.h.in
|
afsconfig.h.in
|
||||||
|
config.c
|
||||||
|
mc.c
|
||||||
|
mkvers.c
|
||||||
|
*.h
|
||||||
|
@ -65,11 +65,12 @@ finddepth(\&find_libafsdep, $projdir);
|
|||||||
#
|
#
|
||||||
©it("$projdir/configure-libafs", "$treedir/configure");
|
©it("$projdir/configure-libafs", "$treedir/configure");
|
||||||
©it("$projdir/Makefile-libafs.in", "$treedir/Makefile.in");
|
©it("$projdir/Makefile-libafs.in", "$treedir/Makefile.in");
|
||||||
|
©it("$projdir/src/libafs/MakefileProto.$ostype.in",
|
||||||
|
"$treedir/src/libafs/MakefileProto.in");
|
||||||
|
|
||||||
system("$objdir/src/config/config",
|
# We need to regenerate this to support building amd64 kernels from a
|
||||||
"$projdir/src/libafs/MakefileProto.$ostype.in",
|
# libafs_tree built on i386.
|
||||||
"$treedir/src/libafs/Makefile.in",
|
unlink("$treedir/include/afs/param.h");
|
||||||
$sysname);
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Subs
|
# Subs
|
||||||
@ -108,7 +109,6 @@ sub process_libafsdep
|
|||||||
# do some simple substitution in dep file
|
# do some simple substitution in dep file
|
||||||
#
|
#
|
||||||
$file =~ s/MKAFS_OSTYPE/$ostype/ge;
|
$file =~ s/MKAFS_OSTYPE/$ostype/ge;
|
||||||
$file =~ s/AFS_SYSNAME/$sysname/ge;
|
|
||||||
|
|
||||||
next if ( $file eq "" );
|
next if ( $file eq "" );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user