From b87f5db94dbcbd882d6434afbc61f6b57318503a Mon Sep 17 00:00:00 2001 From: "Jason N." <33561705+JasonN3@users.noreply.github.com> Date: Wed, 14 Feb 2024 19:20:41 +0000 Subject: [PATCH] single makefile --- Makefile | 23 +++++++++++++++++++---- lorax_templates/Makefile | 7 ------- xorriso/Makefile | 9 --------- xorriso/gen_input.sh.in | 1 - 4 files changed, 19 insertions(+), 21 deletions(-) delete mode 100644 lorax_templates/Makefile delete mode 100644 xorriso/Makefile diff --git a/Makefile b/Makefile index ca841ef..18406ee 100644 --- a/Makefile +++ b/Makefile @@ -27,11 +27,26 @@ $(image_name)-$(version): install-deps: dnf install -y lorax xorriso podman git rpm-ostree + + +lorax_templates/%.tmpl: lorax_templates/%.tmpl.in + sed 's/@IMAGE_NAME@/$(image_name)' $*.in > $* + sed 's/@IMAGE_REPO@/$(image_repo)' $* > $* + sed 's/@VERSION@/$(version)' $* $* + + + +xorriso/input.txt: xorriso/gen_input.sh + bash xorriso/gen_input.sh > input.txt + +xorriso/%.sh: xorriso/%.sh.in + sed 's/@IMAGE_NAME@/$(image_name)-$(version)/' $*.in > $* + + clean: rm -f boot.iso rm -f deploy.iso rm -Rf $(image_name)-$(version) - for dir in $(subdir) ; do \ - $(MAKE) -C $$dir clean ; \ - done - + rm lorax_templates/*.tmpl + rm xorriso/input.txt + rm xorriso/gen_input.sh diff --git a/lorax_templates/Makefile b/lorax_templates/Makefile deleted file mode 100644 index 3e165b1..0000000 --- a/lorax_templates/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -%.tmpl: - sed 's/@IMAGE_NAME@/$(image_name)' $*.in > $* - sed 's/@IMAGE_REPO@/$(image_repo)' $* > $* - sed 's/@VERSION@/$(version)' $* $* - -clean: - rm *.tmpl \ No newline at end of file diff --git a/xorriso/Makefile b/xorriso/Makefile deleted file mode 100644 index 8d78fb3..0000000 --- a/xorriso/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -input.txt: gen_input.sh - bash gen_input.sh "$(base_dir)" > input.txt - -%.sh: - sed 's/@IMAGE_NAME@/$(image_name)-$(version)/' $*.in > $* - -clean: - rm input.txt - rm gen_input.sh \ No newline at end of file diff --git a/xorriso/gen_input.sh.in b/xorriso/gen_input.sh.in index e230ab7..bf06031 100644 --- a/xorriso/gen_input.sh.in +++ b/xorriso/gen_input.sh.in @@ -6,7 +6,6 @@ echo "-boot_image any replay" echo "-volid Fedora-S-dvd-x86_64-39" echo "-joliet on" echo "-compliance joliet_long_names" -cd $1 for file in $(find @IMAGE_NAME@) do echo "-map $(pwd)/${file} ${file}"