misc: Various fixes

This commit is contained in:
mintsuki 2022-01-28 10:23:26 +01:00
parent 3ea53247c2
commit 68faef19be
7 changed files with 19 additions and 14 deletions

View File

@ -107,6 +107,6 @@ jobs:
with:
body_path: rel_notes.txt
files: |
limine-*.tar.xz
limine-*.tar.*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -209,7 +209,7 @@ $(call MKESCAPE,$(BINDIR))/limine-hdd.h: $(call MKESCAPE,$(BUILDDIR))/hgen $(cal
.PHONY: limine-install
limine-install:
mkdir -p '$(call SHESCAPE,$(BINDIR))'
cp '$(call SHESCAPE,$(SRCDIR))/limine-install/'* '$(call SHESCAPE,$(SRCDIR))/limine-install/.gitignore' '$(call SHESCAPE,$(BINDIR))/'
cp '$(call SHESCAPE,$(SRCDIR))/limine-install/Makefile' '$(call SHESCAPE,$(SRCDIR))/limine-install/limine-install.c' '$(call SHESCAPE,$(SRCDIR))/limine-install/.gitignore' '$(call SHESCAPE,$(BINDIR))/'
$(MAKE) limine-hdd.h
$(MAKE) -C '$(call SHESCAPE,$(BINDIR))'
@ -308,6 +308,7 @@ dist:
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/autom4te.cache"
echo "$(LIMINE_VERSION)" > '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/version"
cd '$(call SHESCAPE,$(BUILDDIR))' && tar -Jcf "limine-$(LIMINE_VERSION).tar.xz" "limine-$(LIMINE_VERSION)"
cd '$(call SHESCAPE,$(BUILDDIR))' && tar -zcf "limine-$(LIMINE_VERSION).tar.gz" "limine-$(LIMINE_VERSION)"
rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)"
.PHONY: distclean

View File

@ -4,6 +4,18 @@ AC_PREREQ(2.69)
AC_SUBST(limine_version, m4_esyscmd([./version.sh]))
test "x$CFLAGS" = "x" && CFLAGS='-g -O2 -pipe -Wall -Wextra'
werror_state="no"
AC_ARG_ENABLE([werror],
AS_HELP_STRING([--enable-werror], [treat warnings as errors]),
werror_state="$enableval")
if test "$werror_state" = "yes"; then
AC_SUBST(werror, [-Werror])
CFLAGS="$CFLAGS -Werror"
fi
AC_PROG_CC
AC_PROG_INSTALL
@ -37,15 +49,6 @@ test "x$LIMINE_OBJDUMP" = "x" && LIMINE_OBJDUMP='$(TOOLCHAIN)-objdump'
AC_ARG_VAR(LIMINE_READELF, [Readelf command for Limine [$(TOOLCHAIN)-readelf]])
test "x$LIMINE_READELF" = "x" && LIMINE_READELF='$(TOOLCHAIN)-readelf'
werror_state="no"
AC_ARG_ENABLE([werror],
AS_HELP_STRING([--enable-werror], [treat warnings as errors]),
werror_state="$enableval")
if test "$werror_state" = "yes"; then
AC_SUBST(werror, [-Werror])
fi
AC_PREFIX_DEFAULT(/usr/local)
AC_CONFIG_FILES(GNUmakefile)

View File

@ -1 +1,2 @@
limine-install
limine-install.exe

View File

@ -4,7 +4,7 @@ INSTALL ?= ./install-sh
PREFIX ?= /usr/local
DESTDIR ?=
CFLAGS ?= -O2 -pipe -Wall -Wextra
CFLAGS ?= -g -O2 -pipe -Wall -Wextra
.PHONY: all
all: limine-install

View File

@ -276,7 +276,7 @@ static bool _device_write(const void *_buffer, uint64_t loc, size_t count) {
int main(int argc, char *argv[]) {
int ok = 1;
int force_mbr = 0;
uint8_t *bootloader_img = (uint8_t *)_binary_limine_hdd_bin_data;
const uint8_t *bootloader_img = _binary_limine_hdd_bin_data;
size_t bootloader_file_size = sizeof(_binary_limine_hdd_bin_data);
uint8_t orig_mbr[70], timestamp[6];

View File

@ -1,4 +1,4 @@
#! /bin/sh
[ -f version ] || ( git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null || git log -n1 --pretty='%h' ) | xargs printf '%s'
[ -f version ] || ( git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null || git log -n1 --pretty='%h' ) | sed 's/^v//g' | xargs printf '%s'
[ -f version ] && ( cat version 2>/dev/null ) | xargs printf '%s'