Comment: | move modules to a subdirectory in order to keep the directory tree organized and make room for OS-specific build files |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
14172a910addcc5ea3e8ec179b45b8c4 |
User & Date: | lexi on 2019-08-21 06:00:24 |
Other Links: | manifest | tags |
2019-08-21
| ||
06:43 | create dist folder for OS-specific supporting build files check-in: 49b6e9c7f6 user: lexi tags: trunk | |
06:00 | move modules to a subdirectory in order to keep the directory tree organized and make room for OS-specific build files check-in: 14172a910a user: lexi tags: trunk | |
04:50 | Add initial build setup for Nix check-in: a26e579866 user: glow tags: trunk | |
Modified build.sh from [4eaecd6098] to [9bf8bf8013].
212 212 awk -f global/gen-ident.awk <global/modules >$gen/internal.ident.c 213 213 comp_co $gen/internal.ident.c $to/internal.ident.o 214 214 215 215 # first pass: copy all headers into place, 216 216 # including ones we need to generate 217 217 218 218 for mod in ${modules[@]}; do 219 - for h in $(scan $mod '*.h'); do 219 + for h in $(scan mod/$mod '*.h'); do 220 220 base=$(basename $h) 221 221 cp "$h" "$to/k/$base" 222 222 done 223 223 224 - for h in $(scan $mod '*.h.m'); do 224 + for h in $(scan mod/$mod '*.h.m'); do 225 225 base=$(basename $h) 226 226 dest=${base%%.m} 227 227 comp_mac "$h" "$to/k/$dest" 228 228 done 229 229 done 230 230 231 231 # second pass: generate manpage, html, and pdf 232 232 # versions of the documentation from the md src 233 233 234 234 if test "$doc" = "yes"; then 235 235 global/build-manpage.sh libk.md 236 236 for mod in ${modules[@]}; do 237 - for doc in $(scan $mod '*.md'); do 237 + for doc in $(scan mod/$mod '*.md'); do 238 238 base="$(basename $doc)" 239 239 stem="${base%%.md}" 240 240 report global/build-manpage.sh "$doc" 241 241 done 242 242 done 243 243 fi 244 244 ................................................................................ 247 247 # which is a runtime or function unit. exe's 248 248 # will not be compiled until a later pass 249 249 250 250 fn_objects=() 251 251 rt_objects=() 252 252 data_objects=( $to/internal.ident.o ) 253 253 for mod in ${modules[@]}; do 254 - for fn in $(scan $mod '*.fn.c'); do 254 + for fn in $(scan mod/$mod '*.fn.c'); do 255 255 base="$(basename $fn)" 256 256 dest="$to/$mod.${base%%.c}.o" 257 257 comp_co "$fn" "$dest" 258 258 fn_objects+=("$dest") 259 259 done 260 260 261 - for rt in $(scan $mod '*.rt.c'); do 261 + for rt in $(scan mod/$mod '*.rt.c'); do 262 262 base="$(basename $rt)" 263 263 dest="$to/$mod.${base%%.c}.o" 264 264 comp_co "$rt" "$dest" 265 265 rt_objects+=("$dest") 266 266 done 267 267 268 - for fn in $(scan $mod "*.fn.$target.s"); do 268 + for fn in $(scan mod/$mod "*.fn.$target.s"); do 269 269 base="$(basename $fn)" 270 270 dest="$to/$mod.${base%%.s}.o" 271 271 comp_asm "$fn" "$dest" 272 272 fn_objects+=("$dest") 273 273 done 274 274 275 - for rt in $(scan $mod "*.rt.$target.s"); do 275 + for rt in $(scan mod/$mod "*.rt.$target.s"); do 276 276 base="$(basename $rt)" 277 277 dest="$to/$mod.${base%%.s}.o" 278 278 comp_asm "$rt" "$dest" 279 279 rt_objects+=("$dest") 280 280 done 281 281 done 282 282 ................................................................................ 295 295 report ld -shared ${fn_objects[@]} -o $to/libk.so 296 296 fi 297 297 298 298 # fifth pass: compile the executable tools 299 299 # against the libraries created in pass 5 300 300 301 301 for mod in ${modules[@]}; do 302 - for exe in $(scan $mod '*.exe.c'); do 302 + for exe in $(scan mod/$mod '*.exe.c'); do 303 303 base="$(basename $exe)" 304 304 dest="$to/$mod.${base%%.exe.c}" 305 305 if test $build_shared_library == yes; then 306 306 comp_c "$to/boot.o $exe" "$dest" -lk 307 307 else 308 308 comp_c "$exe" "$dest" -lk 309 309 fi 310 310 done 311 311 done 312 312 313 313 set +x 314 314 say "all passes finished; build $build complete at $(timestamp)"
Modified global/common.sh from [0ffa5553a2] to [e60df5a627].
49 49 else 50 50 printf " [94;4m$a[m"; 51 51 fi 52 52 done 53 53 echo 54 54 } 55 55 else 56 - announce() { shift; echo " --> " $@; } 56 + announce() { echo " --> " $@; } 57 57 fi 58 58 59 59 # the following function is called to report a command invocation 60 60 # the person compiling the library. the first argument should be 61 61 # an ansi format string; this is used to color-code the tool being 62 62 # launched and thus should be different for each one. 63 63 64 64 report() { announce $@; $@; }
Name change from kbuild/kbuild.md to mod/kbuild/kbuild.md.
Name change from kconf/kconf.md to mod/kconf/kconf.md.
Name change from kcore/__stack_chk_fail.fn.c to mod/kcore/__stack_chk_fail.fn.c.
Name change from kcore/boot.rt.c to mod/kcore/boot.rt.c.
Name change from kcore/boot.rt.x86.lin.64.s to mod/kcore/boot.rt.x86.lin.64.s.
Name change from kcore/core.h to mod/kcore/core.h.
Name change from kcore/def.h.m to mod/kcore/def.h.m.
Name change from kcore/kcore.md to mod/kcore/kcore.md.
Name change from kcore/magic.h to mod/kcore/magic.h.
Name change from kcore/platform.syscall.fn.c to mod/kcore/platform.syscall.fn.c.
Name change from kcore/stop.fn.c to mod/kcore/stop.fn.c.
Name change from kcore/syscall.fn.x86.lin.64.s to mod/kcore/syscall.fn.x86.lin.64.s.
Name change from kcore/testbin.exe.c to mod/kcore/testbin.exe.c.
Name change from kcore/type.h.m to mod/kcore/type.h.m.
Name change from kdb/kdb.md to mod/kdb/kdb.md.
Name change from kdbg/dbg.h to mod/kdbg/dbg.h.
Name change from kdbg/kdbg.md to mod/kdbg/kdbg.md.
Name change from kfile/file.h to mod/kfile/file.h.
Name change from kfile/kfile.md to mod/kfile/kfile.md.
Name change from kgraft/attach.exe.c to mod/kgraft/attach.exe.c.
Name change from kgraft/graft.h to mod/kgraft/graft.h.
Name change from kgraft/kgraft.md to mod/kgraft/kgraft.md.
Name change from kio/io.h.m to mod/kio/io.h.m.
Name change from kio/kio.md to mod/kio/kio.md.
Name change from kio/send.fn.c to mod/kio/send.fn.c.
Name change from kmem/free.fn.c to mod/kmem/free.fn.c.
Name change from kmem/heapa.fn.c to mod/kmem/heapa.fn.c.
Name change from kmem/heapao.fn.c to mod/kmem/heapao.fn.c.
Name change from kmem/heapf.fn.c to mod/kmem/heapf.fn.c.
Name change from kmem/kmem.md to mod/kmem/kmem.md.
Name change from kmem/mem.h to mod/kmem/mem.h.
Name change from kmem/platform.mmap.fn.x86.lin.64.s to mod/kmem/platform.mmap.fn.x86.lin.64.s.
Name change from kmem/platform.munmap.fn.x86.lin.64.s to mod/kmem/platform.munmap.fn.x86.lin.64.s.
Name change from kmem/zero.fn.c to mod/kmem/zero.fn.c.
Name change from kmsg/kmsg.md to mod/kmsg/kmsg.md.
Name change from kmsg/msg.h to mod/kmsg/msg.h.
Name change from knet/knet.md to mod/knet/knet.md.
Name change from knet/net.h to mod/knet/net.h.
Name change from knum/knum.md to mod/knum/knum.md.
Name change from kproc/kproc.md to mod/kproc/kproc.md.
Name change from kproc/proc.h to mod/kproc/proc.h.
Name change from kstr/ks_to_int.c to mod/kstr/ks_to_int.c.
Name change from kstr/kstr.md to mod/kstr/kstr.md.
Name change from kstr/str.h to mod/kstr/str.h.
Name change from kterm/kterm.md to mod/kterm/kterm.md.
Name change from kterm/term.h to mod/kterm/term.h.