From 76def29a7f80dea3ff024bc9c12391a1c5608ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Mon, 1 Oct 2018 00:28:34 +0200 Subject: [PATCH] make [all] now uses the guix build environment (but other targets don't) --- .travis.yml | 1 + Makefile | 13 +++++++++---- Makefile.example-os | 22 +++++++++++----------- guix.scm | 2 +- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index c83ad48..832c0d3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ language: c addons: apt: packages: &common_apt_packages + - guix # graphical environment - scrot - twm diff --git a/Makefile b/Makefile index a102ae2..6c7bc51 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,11 @@ tests_emu = test/qemu-system-i386-floppy test/qemu-system-i386-cdrom test/qemu-s tests_requiring_sudo = test/fat12_mount test/iso_mount tests_noemu = test/zip test/os.reasm test/sizes test/fat12_contents test/reproducible_build +.DEFAULT_GOAL := all +.PHONY: all +all: + cp -f "$$(guix build --check -f guix.scm)/bin/$$(basename "${os_filename}")" "${os_filename}" + # We truncate the timezone, because the Darwin version of date seems to lack # the %:z format (for ±HH:MM timezone). define date_command @@ -52,10 +57,10 @@ include Makefile.test-example-os more_built_directories = ${built_directories} ${bld} -.PHONY: all -# all: os.arm.disasm -all: .gitignore \ - ${bld}/check_makefile +.PHONY: in-guix +# in-guix: os.arm.disasm +in-guix: .gitignore \ + ${bld}/check_makefile ${bld}/makefile_w_arnings: | $${@D} ${built_files}: | $${@D} diff --git a/Makefile.example-os b/Makefile.example-os index 348a37c..67b952e 100644 --- a/Makefile.example-os +++ b/Makefile.example-os @@ -73,17 +73,17 @@ os_partition_size_sectors = 717 # 720 - start os_floppy_chs_h = 2 os_floppy_chs_s = 9 -all: ${os_filename} \ - ${bld}/os.ndisasm.disasm \ - ${bld}/os.reasm.asm \ - ${bld}/os.file \ - ${bld}/os.gdisk \ - ${bld}/os.offsets.hex \ - ${bld}/os.offsets.dec \ - ${bld}/os.hex_with_offsets \ - ${more_offset_dec} \ - ${more_offset_hex} \ - ${bld}/check_makefile +in-guix: ${os_filename} \ + ${bld}/os.ndisasm.disasm \ + ${bld}/os.reasm.asm \ + ${bld}/os.file \ + ${bld}/os.gdisk \ + ${bld}/os.offsets.hex \ + ${bld}/os.offsets.dec \ + ${bld}/os.hex_with_offsets \ + ${more_offset_dec} \ + ${more_offset_hex} \ + ${bld}/check_makefile # 32k header of the ISO9660 image ${bld}/os.32k: example-os/os.asm ${bld}/check_makefile diff --git a/guix.scm b/guix.scm index cc502a2..99f82f7 100644 --- a/guix.scm +++ b/guix.scm @@ -81,7 +81,7 @@ (delete 'patch-shebangs) (delete 'strip)) #:parallel-build? #t - #:make-flags '("COMMIT_TIMESTAMP_ISO_8601=1970-01-01T00:00:00+00:00"))) + #:make-flags '("in-guix" "COMMIT_TIMESTAMP_ISO_8601=1970-01-01T00:00:00+00:00"))) (native-inputs `(("nasm" ,nasm) ("which" ,which)