Skip to content

Commit

Permalink
bugfix: "all" & friends were defined before its dependency variables …
Browse files Browse the repository at this point in the history
…got their values
  • Loading branch information
aitap committed Jul 3, 2017
1 parent 78c81b6 commit 97fc810
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ CONTENTS := contents
DOWNLOAD := download
SUDO := sudo

IMAGES := $(sysrcd) $(grub4dos)
ALL_IMAGES := $(IMAGES) $(knoppix) $(porteus) $(kav) $(drweb) $(memtest)

.PHONY: clean copy_over install_bootloader

# macros
Expand All @@ -25,18 +22,12 @@ endef

# base

all: $(base) $(IMAGES) $(config)
all_images: all $(ALL_IMAGES)

base := $(DOWNLOAD) $(CONTENTS) $(CONTENTS)/boot/grub
$(base):
mkdir -pv $(base)
touch $(base)
base: $(base)

clean:
rm -rvf $(ALL_IMAGES) $(CONTENTS) $(DOWNLOAD)

# images themselves, download and extract separately

sysrcd_iso := $(CONTENTS)/boot/sysrcd.iso
Expand Down Expand Up @@ -165,3 +156,14 @@ install_bootloader:
$(SUDO) grub-install --boot-directory="$(TARGET_DIR)/boot" --target=$(arch)-efi \
--efi-directory="$(TARGET_DIR)" --removable --no-nvram; \
)

# now that we've defined all the variables, time to define the "all" rules

IMAGES = $(sysrcd) $(grub4dos)
EXTRA_IMAGES = $(IMAGES) $(knoppix) $(porteus) $(kav) $(drweb) $(memtest)

all: $(base) $(IMAGES) $(config)
all_images: $(EXTRA_IMAGES) all

clean:
rm -rvf $(IMAGES) $(EXTRA_IMAGES) $(CONTENTS) $(DOWNLOAD)

0 comments on commit 97fc810

Please sign in to comment.