From 2c298b17e356824bc55c2b45e7c6d12b1b4ec63d Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Mon, 18 Dec 2006 05:45:23 +0000 Subject: [PATCH] opt_ah.h ends up copied into a kernelcompile directory in some aches as a read-only file. In a number of cases this has led to compiles failing- usually due to some strange NFS drift which thinks that the opt_ah.h in the compile directory is out of date wrt the source it is copied from. When the copy is executed again, it fails because the target is read-only. Oops. Modify the compile hooks avoid this. Discussed with a while back with: Sam Leffler --- sys/conf/files.amd64 | 2 +- sys/conf/files.arm | 2 +- sys/conf/files.i386 | 2 +- sys/conf/files.pc98 | 2 +- sys/conf/files.powerpc | 2 +- sys/conf/files.sparc64 | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index b961ab7f2c2d..03fab91d44b8 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -53,7 +53,7 @@ hal.o optional ath_hal \ no-implicit-rule opt_ah.h optional ath_hal \ dependency "$S/contrib/dev/ath/public/x86_64-elf.opt_ah.h" \ - compile-with "cp $S/contrib/dev/ath/public/x86_64-elf.opt_ah.h opt_ah.h" \ + compile-with "rm -f opt_ah.h; cp $S/contrib/dev/ath/public/x86_64-elf.opt_ah.h opt_ah.h" \ no-obj no-implicit-rule before-depend \ clean "opt_ah.h" # diff --git a/sys/conf/files.arm b/sys/conf/files.arm index a71fe4862b6a..c4001ad62523 100644 --- a/sys/conf/files.arm +++ b/sys/conf/files.arm @@ -58,7 +58,7 @@ hal.o optional ath_hal \ compile-with "ATH_HAL_CPU=`echo ${CONF_CFLAGS}|sed 's/.*-mcpu=\([a-zA-Z0-9]*\).*/\1/'`; ATH_ENDIAN=`if (echo ${CC}|grep mbig-endian>/dev/null); then echo be; else echo le; fi;`; uudecode < $S/contrib/dev/ath/public/$$ATH_HAL_CPU-$$ATH_ENDIAN-elf.hal.o.uu" \ no-implicit-rule opt_ah.h optional ath_hal \ - compile-with "ATH_HAL_CPU=`echo ${CONF_CFLAGS}|sed 's/.*-mcpu=\([a-zA-Z0-9]*\).*/\1/'`; ATH_ENDIAN=`if (echo ${CC}|grep mbig-endian>/dev/null); then echo be; else echo le; fi;`; cp $S/contrib/dev/ath/public/$$ATH_HAL_CPU-$$ATH_ENDIAN-elf.opt_ah.h opt_ah.h" \ + compile-with "ATH_HAL_CPU=`echo ${CONF_CFLAGS}|sed 's/.*-mcpu=\([a-zA-Z0-9]*\).*/\1/'`; ATH_ENDIAN=`if (echo ${CC}|grep mbig-endian>/dev/null); then echo be; else echo le; fi;`; rm -f opt_ah.h; cp $S/contrib/dev/ath/public/$$ATH_HAL_CPU-$$ATH_ENDIAN-elf.opt_ah.h opt_ah.h" \ no-obj no-implicit-rule before-depend \ clean "opt_ah.h" libkern/arm/divsi3.S standard diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 3de50fea2a49..ed1698acdcec 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -57,7 +57,7 @@ hal.o optional ath_hal \ no-implicit-rule opt_ah.h optional ath_hal \ dependency "$S/contrib/dev/ath/public/i386-elf.opt_ah.h" \ - compile-with "cp $S/contrib/dev/ath/public/i386-elf.opt_ah.h opt_ah.h" \ + compile-with "rm -f opt_ah.h; cp $S/contrib/dev/ath/public/i386-elf.opt_ah.h opt_ah.h" \ no-obj no-implicit-rule before-depend \ clean "opt_ah.h" # diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98 index 8ee74d103cb4..8c909d681a43 100644 --- a/sys/conf/files.pc98 +++ b/sys/conf/files.pc98 @@ -49,7 +49,7 @@ hal.o optional ath_hal \ no-implicit-rule opt_ah.h optional ath_hal \ dependency "$S/contrib/dev/ath/public/i386-elf.opt_ah.h" \ - compile-with "cp $S/contrib/dev/ath/public/i386-elf.opt_ah.h opt_ah.h" \ + compile-with "rm -f opt_ah.h; cp $S/contrib/dev/ath/public/i386-elf.opt_ah.h opt_ah.h" \ no-obj no-implicit-rule before-depend \ clean "opt_ah.h" # diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index a60dfd26205e..b530346d186e 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -20,7 +20,7 @@ hal.o optional ath_hal \ no-implicit-rule opt_ah.h optional ath_hal \ dependency "$S/contrib/dev/ath/public/powerpc-be-elf.opt_ah.h" \ - compile-with "cp $S/contrib/dev/ath/public/powerpc-be-elf.opt_ah.h opt_ah.h" \ + compile-with "rm -f opt_ah.h; cp $S/contrib/dev/ath/public/powerpc-be-elf.opt_ah.h opt_ah.h" \ no-obj no-implicit-rule before-depend \ clean "opt_ah.h" # diff --git a/sys/conf/files.sparc64 b/sys/conf/files.sparc64 index da83c63622d5..7234b128a8d0 100644 --- a/sys/conf/files.sparc64 +++ b/sys/conf/files.sparc64 @@ -28,7 +28,7 @@ hal.o optional ath_hal \ no-implicit-rule opt_ah.h optional ath_hal \ dependency "$S/contrib/dev/ath/public/sparc64-be-elf.opt_ah.h" \ - compile-with "cp $S/contrib/dev/ath/public/sparc64-be-elf.opt_ah.h opt_ah.h" \ + compile-with "rm -f opt_ah.h; cp $S/contrib/dev/ath/public/sparc64-be-elf.opt_ah.h opt_ah.h" \ no-obj no-implicit-rule before-depend \ clean "opt_ah.h" #