mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-03 08:49:22 +00:00
507951f550
Intersting/relevant changes since bmake-20240309 ChangeLog since bmake-20240309 2024-04-30 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240430 Merge with NetBSD make, pick up o main.c: ensure '.include <makefile>' respects MAKESYSPATH. Dir_FindFile will search .CURDIR first unless ".DOTLAST" is seen. 2024-04-28 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240428 Merge with NetBSD make, pick up o simplify freeing of lists o arch.c: trim pointless comments o var.c: delay variable assignments until actually needed don't reallocate memory after evaluating an expression, result is almost always short-lived. 2024-04-26 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240426 Merge with NetBSD make, pick up o job.c: in debug output, print the directory in which a job failed at same time as failed target so it is more easily found in build log. 2024-04-24 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240424 Merge with NetBSD make, pick up o clean up comments, code and tests 2024-04-23 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240422 Merge with NetBSD make, pick up o var.c: avoid LazyBuf for :*time modifiers. LazyBuf's are not nul terminated so not suitable for passing to functions that expect that. These modifiers are used sparingly so an extra allocation is not a problem. 2024-04-20 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240420 Merge with NetBSD make, pick up o provide more context information for parse/evaluate errors 2024-04-14 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240414 Merge with NetBSD make, pick up o parse.c: print -dp debug info earlier so we see which .if or .for line is being parsed. 2024-04-04 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240404 Merge with NetBSD make, pick up o fix some unit tests for Cygwin o parse.c: exit immediately after reading a null byte from a makefile * fix generation of bmake.cat1 2024-03-19 Simon J Gerraty <sjg@beast.crufty.net> * VERSION (_MAKE_VERSION): 20240314 Add/Improve support for Cygwin o uname -s output isn't useful so allow configure to set FORCE_MAKE_OS - to force the value of .MAKE.OS and use Cygwin which matches uname -o o fix some unit-tests for Cygwin * configure.in: use_makefile=no for Cygwin et al. NOTE: bmake does not support Cygwin and likely never will, mk/ChangeLog since bmake-20240309 2024-04-24 Simon J Gerraty <sjg@beast.crufty.net> * meta.autodep.mk: do not override start_utc 2024-04-18 Simon J Gerraty <sjg@beast.crufty.net> * sys.dirdeps.mk: set defaults for DEP_* at level 0 too. These help when first include of Makefile.depend happens in a leaf dir. * install-mk (MK_VERSION): 20240414 2024-04-09 Simon J Gerraty <sjg@beast.crufty.net> * install-mk (MK_VERSION): 20240408 * init.mk: allow for _ as well as . to join V and Q from QUALIFIED_VAR_LIST and VAR_QUALIFIER_LIST. * progs.mk: avoid overlap between PROG_VARS and init.mk's QUALIFIED_VAR_LIST since PROG would also match its VAR_QUALIFIER_LIST, libs.mk does not have the same issue. * subdir.mk: _SUBDIRUSE for realinstall should run install remove include of ${.CURDIR}/Makefile.inc that can be done via local.subdir.mk where needed * own.mk: do not conflict with man.mk 2024-03-19 Simon J Gerraty <sjg@beast.crufty.net> * install-mk (MK_VERSION): 20240314 * add sys/Cygwin.mk from Christian Franke
98 lines
2.1 KiB
Bash
Executable File
98 lines
2.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
prefix=@prefix@
|
|
srcdir=@srcdir@
|
|
|
|
DEFAULT_SYS_PATH="@default_sys_path@"
|
|
|
|
case "@use_meta@" in
|
|
yes) XDEFS="-DUSE_META ${XDEFS}";;
|
|
esac
|
|
|
|
CC="@CC@"
|
|
CFLAGS="@CFLAGS@ -I. -I${srcdir} @DEFS@ @CPPFLAGS@ -DMAKE_NATIVE ${XDEFS} -DBMAKE_PATH_MAX=@bmake_path_max@"
|
|
|
|
MAKE_VERSION=@_MAKE_VERSION@
|
|
|
|
MDEFS="-DMAKE_VERSION=\"$MAKE_VERSION\" \
|
|
-D@force_machine@MACHINE=\"@machine@\" \
|
|
-D@force_machine_arch@MACHINE_ARCH=\"@machine_arch@\" \
|
|
-D@force_make_os@MAKE_OS=\"@make_os@\" \
|
|
-D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\""
|
|
|
|
|
|
LDFLAGS="@LDFLAGS@"
|
|
LIBS="@LIBS@"
|
|
|
|
toUpper() {
|
|
${TR:-tr} abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
|
}
|
|
|
|
do_compile2() {
|
|
obj="$1"; shift
|
|
src="$1"; shift
|
|
echo ${CC} -c ${CFLAGS} "$@" -o "$obj" "$src"
|
|
${CC} -c ${CFLAGS} "$@" -o "$obj" "$src"
|
|
}
|
|
|
|
do_compile() {
|
|
obj="$1"; shift
|
|
case "$1" in
|
|
*.c) src=$1; shift;;
|
|
*) src=`basename "$obj" .o`.c;;
|
|
esac
|
|
|
|
for d in "$srcdir" "$srcdir/lst.lib"
|
|
do
|
|
test -s "$d/$src" || continue
|
|
|
|
do_compile2 "$obj" "$d/$src" "$@" || exit 1
|
|
return
|
|
done
|
|
echo "Unknown object file '$obj'" >&2
|
|
exit 1
|
|
}
|
|
|
|
do_link() {
|
|
output="$1"; shift
|
|
echo ${CC} ${LDSTATIC} ${LDFLAGS} -o "$output" "$@" ${LIBS}
|
|
${CC} ${LDSTATIC} ${LDFLAGS} -o "$output" "$@" ${LIBS}
|
|
}
|
|
|
|
BASE_OBJECTS="arch.o buf.o compat.o cond.o dir.o for.o hash.o \
|
|
lst.o make.o make_malloc.o metachar.o parse.o sigcompat.o str.o \
|
|
suff.o targ.o trace.o var.o util.o"
|
|
|
|
LIB_OBJECTS="@LIBOBJS@"
|
|
|
|
do_compile main.o ${MDEFS}
|
|
|
|
for o in ${BASE_OBJECTS} ${LIB_OBJECTS}
|
|
do
|
|
do_compile "$o"
|
|
done
|
|
|
|
case "@use_meta@" in
|
|
yes)
|
|
case "@use_filemon@" in
|
|
no) MDEFS=;;
|
|
*)
|
|
MDEFS="-DUSE_FILEMON -DUSE_FILEMON_`echo @use_filemon@ | toUpper`"
|
|
case "@use_filemon@,@filemon_h@" in
|
|
dev,*/filemon.h) FDEFS="-DHAVE_FILEMON_H -I`dirname @filemon_h@`";;
|
|
*) FDEFS=;;
|
|
esac
|
|
do_compile filemon_@use_filemon@.o filemon/filemon_@use_filemon@.c ${FDEFS}
|
|
BASE_OBJECTS="filemon_@use_filemon@.o $BASE_OBJECTS"
|
|
;;
|
|
esac
|
|
do_compile meta.o ${MDEFS}
|
|
BASE_OBJECTS="meta.o ${BASE_OBJECTS}"
|
|
;;
|
|
esac
|
|
do_compile job.o ${MDEFS}
|
|
|
|
do_link bmake main.o job.o ${BASE_OBJECTS} ${LST_OBJECTS} ${LIB_OBJECTS}
|