From 0087c20d629cb5fac824a86ff66d1dd9f29d6c40 Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Mon, 28 Mar 2011 10:31:53 +0000 Subject: [PATCH] Makefile: autobuild livecd git-svn-id: svn://kolibrios.org@1911 a494cfbc-eb01-0410-851d-a64ba20cac60 --- data/eng/Makefile | 22 +++++++++++++++++++++- data/rus/Makefile | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/data/eng/Makefile b/data/eng/Makefile index da06f77bfa..1475ce2aa6 100644 --- a/data/eng/Makefile +++ b/data/eng/Makefile @@ -264,6 +264,13 @@ OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ #end of list #3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT +# Extra targets for LiveCD image in the syntax of mkisofs +MKISOFS_EXTRA:=\ + dosbox/=$(PROGS)/emulator/DosBox/dosbox \ + dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \ + dosbox/=$(PROGS)/emulator/DosBox/readme.txt \ +#end of list + # Some macro for convenient work. # Macros for replacing '|' to escaped space '\ '. space:=\ #plus space @@ -306,7 +313,14 @@ define newline endef mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) -# The main goal: image. +# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), +# substitute "=" with space, get the 2nd word and join all results +mkisofs_extra_targets:=$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))) + +# The main goal: build kolibri.img and kolibri.iso +all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso + +# The first goal: floppy image. $(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ Makefile \ $(BUILD_DIR)/boot_fat12.bin \ @@ -331,6 +345,12 @@ $(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK $(mcopy_all_items) +# The second goal: LiveCD image. +$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets) + mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -hide-joliet kolibri.img -graft-points \ + -A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \ + -iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(MKISOFS_EXTRA) 2>&1 + # Special targets to modify behaviour of make. .DELETE_ON_ERROR: .SUFFIXES: # delete all predefined rules diff --git a/data/rus/Makefile b/data/rus/Makefile index 2f73e95b32..eae85f85f1 100644 --- a/data/rus/Makefile +++ b/data/rus/Makefile @@ -266,6 +266,13 @@ OTHER_FILES:=asciivju:ASCIIVJU autorun.dat:AUTORUN.DAT \ #end of list #3d/logio.bmp:3D/LOGIO.BMP 3d/cubetext:3D/CUBETEXT +# Extra targets for LiveCD image in the syntax of mkisofs +MKISOFS_EXTRA:=\ + dosbox/=$(PROGS)/emulator/DosBox/dosbox \ + dosbox/=$(PROGS)/emulator/DosBox/dosbox.conf \ + dosbox/=$(PROGS)/emulator/DosBox/readme.txt \ +#end of list + # Some macro for convenient work. # Macros for replacing '|' to escaped space '\ '. space:=\ #plus space @@ -308,7 +315,14 @@ define newline endef mcopy_all_items:=$(foreach f,$(targets_full),$(mcopy_item_command)$(newline)) -# The main goal: image. +# dependencies of MKISOFS_EXTRA; we iterate through $(MKISOFS_EXTRA), +# substitute "=" with space, get the 2nd word and join all results +mkisofs_extra_targets:=$(foreach f,$(MKISOFS_EXTRA),$(word 2,$(subst =, ,$(f)))) + +# The main goal: build kolibri.img and kolibri.iso +all: $(BUILD_DIR)/kolibri.img $(BUILD_DIR)/kolibri.iso + +# The first goal: floppy image. $(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ Makefile \ $(BUILD_DIR)/boot_fat12.bin \ @@ -333,6 +347,12 @@ $(BUILD_DIR)/kolibri.img: $(BUILD_DIR)/.dir \ mmd -i $(BUILD_DIR)/kolibri.img ::NETWORK $(mcopy_all_items) +# The second goal: LiveCD image. +$(BUILD_DIR)/kolibri.iso: $(BUILD_DIR)/kolibri.img $(mkisofs_extra_targets) + mkisofs -U -J -pad -b kolibri.img -c boot.catalog -hide-joliet boot.catalog -hide-joliet kolibri.img -graft-points \ + -A "KolibriOS AutoBuilder" -p "CleverMouse" -publisher "KolibriOS Team" -V "KolibriOS r$(REV)" -sysid "KOLIBRI" \ + -iso-level 3 -o $(BUILD_DIR)/kolibri.iso $(BUILD_DIR)/kolibri.img $(MKISOFS_EXTRA) 2>&1 + # Special targets to modify behaviour of make. .DELETE_ON_ERROR: .SUFFIXES: # disable all predefined rules