You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

49 lines
1.6 KiB

  1. #!/bin/csh
  2. setenv TARGET i386
  3. setenv TARGET_ARCH i386
  4. setenv __MAKE_CONF /dev/null
  5. setenv MAKEOBJDIRPREFIX "/tmp/${TARGET}-objdir"
  6. setenv DESTDIR /tmp/${TARGET}-kernel
  7. @ __freebsd_mk_jobs = `sysctl -n kern.smp.cpus` + 1
  8. set current_dir = `pwd`
  9. set _current_dir = `echo ${current_dir} | sed -e 's|\(.*/\)\(.*\.git\)\(/.*\)*|\2|g'`
  10. set _current_realdir = `echo ${current_dir} | sed -e 's|\(.*/\)\(.*\.git\)\(/.*\)*|\1/\2|g'`
  11. set _check_toolchain = "${MAKEOBJDIRPREFIX}/___kernel-toolchain_DONE"
  12. set _date=`date "+%Y%m%d%H%M%S"`
  13. set _log="/tmp/${TARGET}-cc-log-${_current_dir}-${_date}"
  14. if ( "`sysctl -n security.bsd.hardlink_check_uid`" == "1" ) then
  15. echo "build will fail, due to hard security checks"
  16. echo "sysctl security.bsd.hardlink_check_uid=0"
  17. exit
  18. endif
  19. if ( "`sysctl -n security.bsd.hardlink_check_gid`" == "1" ) then
  20. echo "build will fail, due to hard security checks"
  21. echo "sysctl security.bsd.hardlink_check_gid=0"
  22. exit
  23. endif
  24. if ( (${_current_dir} != "hardenedBSD.git")) then
  25. if ((${_current_dir} != "opBSD.git")) then
  26. set _current_dir = "hardenedBSD.git"
  27. endif
  28. endif
  29. echo "build source dir: ${_current_dir}"
  30. sleep 1
  31. if ( ! -d $MAKEOBJDIRPREFIX ) then
  32. mkdir $MAKEOBJDIRPREFIX
  33. endif
  34. if ( ! -f ${_check_toolchain} ) then
  35. (cd /usr/data/source/git/opBSD/${_current_dir}; make -j$__freebsd_mk_jobs -DNO_ROOT KERNCONF=GENERIC kernel-toolchain) |& tee ${_log} || exit
  36. touch ${_check_toolchain}
  37. else
  38. echo "skip make kernel-toolchain"
  39. sleep 1
  40. endif
  41. (cd /usr/data/source/git/opBSD/${_current_dir}; make -j$__freebsd_mk_jobs -DNO_ROOT KERNCONF=GENERIC kernel) |& tee -a ${_log}