summaryrefslogtreecommitdiff
path: root/sub/dev
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-01-31 14:30:38 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2021-01-31 14:30:38 +0000
commit396794f00cbdddc1fad143a327f0cdf45d2e0ce7 (patch)
treeac4a27989ec07ce2fb3fa9636c7202e725df7297 /sub/dev
parent246806ab8a8af82361a996c979959729b1fe88a1 (diff)
downloadlh-bootstrap-396794f00cbdddc1fad143a327f0cdf45d2e0ce7.tar.xz
Add make to the dev image
Diffstat (limited to 'sub/dev')
-rw-r--r--sub/dev/Makefile.make32
-rw-r--r--sub/dev/Makefile.strace32
2 files changed, 64 insertions, 0 deletions
diff --git a/sub/dev/Makefile.make b/sub/dev/Makefile.make
new file mode 100644
index 0000000..3c33744
--- /dev/null
+++ b/sub/dev/Makefile.make
@@ -0,0 +1,32 @@
+
+MAKE_VERSION ?= 4.3
+MAKE_MAKE_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),LDFLAGS=-static,)
+
+clean-make:
+ rm -f $(OUTPUT)/build-host/.lh_make_*
+
+
+$(OUTPUT)/sources/make-$(MAKE_VERSION).tar.xz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://ftp.gnu.org//gnu/make/make-$(MAKE_VERSION).tar.gz
+
+$(OUTPUT)/build-host/.lh_make_dled: $(OUTPUT)/sources/make-$(MAKE_VERSION).tar.gz | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_make_copied: $(OUTPUT)/build-host/.lh_make_dled | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/make-$(MAKE_VERSION)
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -zxpvf $(OUTPUT)/sources/make-$(MAKE_VERSION).tar.gz
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_make_configured: $(OUTPUT)/build-host/.lh_make_copied | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/make-$(MAKE_VERSION) export CC "$(BUILD_HOST_CC)" ./configure --host=$(TRIPLE) --prefix=/opt/make-$(MAKE_VERSION) --disable-nls --disable-rpath
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_make_built: $(OUTPUT)/build-host/.lh_make_configured | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/make-$(MAKE_VERSION) $(MAKE) $(MAKE_MAKE_STATIC)
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_make_installed: $(OUTPUT)/build-host/.lh_make_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec cd $(OUTPUT)/build-host/make-$(MAKE_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs
+ exec makenamelink $(OUTPUT)/rootfs/opt make make-$(MAKE_VERSION) $(OUTPUT)/tmp
+ exec makelinks $(OUTPUT)/rootfs /bin /opt/make/bin
+ exec setuidgid $(NORMALUSER) s6-touch $@
diff --git a/sub/dev/Makefile.strace b/sub/dev/Makefile.strace
new file mode 100644
index 0000000..a4fa04f
--- /dev/null
+++ b/sub/dev/Makefile.strace
@@ -0,0 +1,32 @@
+
+STRACE_VERSION ?= 5.9
+STRACE_MAKE_STATIC := $(if $(filter true,$(BUILD_HOST_STATIC)),LDFLAGS=-static,)
+
+clean-strace:
+ rm -f $(OUTPUT)/build-host/.lh_strace_*
+
+
+$(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz: | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/sources wget https://strace.io/files/$(STRACE_VERSION)/strace-$(STRACE_VERSION).tar.xz
+
+$(OUTPUT)/build-host/.lh_strace_dled: $(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_strace_copied: $(OUTPUT)/build-host/.lh_strace_dled | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) s6-rmrf $(OUTPUT)/build-host/strace-$(STRACE_VERSION)
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host tar -Jxpvf $(OUTPUT)/sources/strace-$(STRACE_VERSION).tar.xz
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_strace_configured: $(OUTPUT)/build-host/.lh_strace_copied | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) export CC "$(BUILD_HOST_CC)" export LIBS "-lrt -lpthread" ./configure --host=$(TRIPLE) --prefix=/opt/strace-$(STRACE_VERSION) --enable-mpers=no
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_strace_built: $(OUTPUT)/build-host/.lh_strace_configured | $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec setuidgid $(NORMALUSER) cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) $(MAKE) $(STRACE_MAKE_STATIC)
+ exec setuidgid $(NORMALUSER) s6-touch $@
+
+$(OUTPUT)/build-host/.lh_strace_installed: $(OUTPUT)/build-host/.lh_strace_built | $(OUTPUT)/tmp/.lh_prepared $(OUTPUT)/build-build/.lh_skarnet_installed
+ exec cd $(OUTPUT)/build-host/strace-$(STRACE_VERSION) $(MAKE) install DESTDIR=$(OUTPUT)/rootfs
+ exec makenamelink $(OUTPUT)/rootfs/opt strace strace-$(STRACE_VERSION) $(OUTPUT)/tmp
+ exec makelinks $(OUTPUT)/rootfs /bin /opt/strace/bin
+ exec setuidgid $(NORMALUSER) s6-touch $@