From 37d3e807570dea9c79721fd54a0695d15db4f261 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Fri, 2 Sep 2022 01:08:19 +0200 Subject: [PATCH] build: Remove unneeded libgcc files in make dist --- GNUmakefile.in | 10 ++++++++++ bootstrap | 15 +-------------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/GNUmakefile.in b/GNUmakefile.in index adb0c110..5021b512 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -207,6 +207,16 @@ dist: rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/freestanding-headers/.git" rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/.git" rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/.gitignore" + + libgcc_needed="i686 x86_64-no-red-zone"; \ + for f in $$libgcc_needed; do \ + mv '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/libgcc-$$f.a" '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/libgcc-$$f.a.save"; \ + done; \ + rm '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries"/*.a; \ + for f in $$libgcc_needed; do \ + mv '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/libgcc-$$f.a.save" '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/libgcc-binaries/libgcc-$$f.a"; \ + done + rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/limine-efi/.git" rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/limine-efi/.gitignore" rm -rf '$(call SHESCAPE,$(BUILDDIR))'/"limine-$(LIMINE_VERSION)/stivale/.git" diff --git a/bootstrap b/bootstrap index a18988a6..f21ff2d3 100755 --- a/bootstrap +++ b/bootstrap @@ -11,20 +11,7 @@ cd "$srcdir" [ -d freestanding-headers ] || git clone https://github.com/mintsuki/freestanding-headers.git [ -d stivale ] || git clone https://github.com/stivale/stivale.git [ -d limine-efi ] || git clone https://github.com/limine-bootloader/limine-efi.git - -if ! [ -d libgcc-binaries ]; then - git clone https://github.com/mintsuki/libgcc-binaries.git - - # Remove the libgcc files we don't need - libgcc_needed="i686 x86_64-no-red-zone" - for f in $libgcc_needed; do - mv libgcc-binaries/libgcc-$f.a libgcc-binaries/libgcc-$f.a.save - done - rm libgcc-binaries/*.a - for f in $libgcc_needed; do - mv libgcc-binaries/libgcc-$f.a.save libgcc-binaries/libgcc-$f.a - done -fi +[ -d libgcc-binaries ] || git clone https://github.com/mintsuki/libgcc-binaries.git automake_libdir="$(automake --print-libdir)"