mirror of
https://github.com/limine-bootloader/limine-c-template
synced 2025-09-30 23:03:22 +02:00
Add .deps-obtained file to track whether deps were gotten
This commit is contained in:
parent
e58842480b
commit
6a0bf74695
5 changed files with 11 additions and 11 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,4 +1,3 @@
|
|||
/kernel-deps
|
||||
/limine
|
||||
/ovmf
|
||||
*.iso
|
||||
|
|
|
|||
|
|
@ -156,12 +156,11 @@ limine/limine:
|
|||
LDFLAGS="$(HOST_LDFLAGS)" \
|
||||
LIBS="$(HOST_LIBS)"
|
||||
|
||||
kernel-deps:
|
||||
kernel/.deps-obtained:
|
||||
./kernel/get-deps
|
||||
touch kernel-deps
|
||||
|
||||
.PHONY: kernel
|
||||
kernel: kernel-deps
|
||||
kernel: kernel/.deps-obtained
|
||||
$(MAKE) -C kernel
|
||||
|
||||
$(IMAGE_NAME).iso: limine/limine kernel
|
||||
|
|
|
|||
1
kernel/.gitignore
vendored
1
kernel/.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
|||
/compile_commands.json
|
||||
/.cache
|
||||
/.deps-obtained
|
||||
/freestnd-c-hdrs
|
||||
/cc-runtime
|
||||
/limine-protocol
|
||||
|
|
|
|||
|
|
@ -56,8 +56,8 @@ endif
|
|||
LDFLAGS :=
|
||||
|
||||
# Ensure the dependencies have been obtained.
|
||||
ifneq ($(shell ( test '$(MAKECMDGOALS)' = clean || test '$(MAKECMDGOALS)' = distclean ); echo $$?),0)
|
||||
ifeq ($(shell ( ! test -d freestnd-c-hdrs || ! test -d cc-runtime || ! test -d limine-protocol ); echo $$?),0)
|
||||
ifneq ($(filter-out clean distclean,$(MAKECMDGOALS)),)
|
||||
ifeq ($(wildcard .deps-obtained),)
|
||||
$(error Please run the ./get-deps script first)
|
||||
endif
|
||||
endif
|
||||
|
|
@ -224,7 +224,7 @@ clean:
|
|||
# Remove everything built and generated including downloaded dependencies.
|
||||
.PHONY: distclean
|
||||
distclean:
|
||||
rm -rf bin-* obj-* freestnd-c-hdrs cc-runtime limine-protocol
|
||||
rm -rf bin-* obj-* .deps-obtained freestnd-c-hdrs cc-runtime limine-protocol
|
||||
|
||||
# Install the final built executable to its final on-root location.
|
||||
.PHONY: install
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
srcdir="$(dirname "$0")"
|
||||
test -z "$srcdir" && srcdir=.
|
||||
|
|
@ -16,7 +16,6 @@ clone_repo_commit() {
|
|||
fi
|
||||
else
|
||||
if test -d "$2"; then
|
||||
set +x
|
||||
echo "error: '$2' is not a Git repository" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -30,6 +29,8 @@ clone_repo_commit() {
|
|||
fi
|
||||
}
|
||||
|
||||
rm -f .deps-obtained
|
||||
|
||||
clone_repo_commit \
|
||||
https://github.com/osdev0/freestnd-c-hdrs-0bsd.git \
|
||||
freestnd-c-hdrs \
|
||||
|
|
@ -45,6 +46,6 @@ clone_repo_commit \
|
|||
limine-protocol \
|
||||
fedf97facd1c473ee8720f8dfd5a71d03490d928
|
||||
|
||||
set +x
|
||||
touch .deps-obtained
|
||||
|
||||
printf "\nDependencies obtained successfully!\n"
|
||||
printf "\nDependencies obtained successfully.\n"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue