Commit 4d0ae3af authored by Michael Shigorin's avatar Michael Shigorin

syslinux: dedup generate.mk

Should be a (slightly cleaner) no-op.
parent 5cfcd809
...@@ -29,6 +29,7 @@ SYSLINUX_CFG := $(SYSLINUX_CFG) $(SUBPROFILE_DIRS) defaults ...@@ -29,6 +29,7 @@ SYSLINUX_CFG := $(SYSLINUX_CFG) $(SUBPROFILE_DIRS) defaults
endif endif
DSTDIR := $(BUILDDIR)/stage1/files/syslinux/.in DSTDIR := $(BUILDDIR)/stage1/files/syslinux/.in
DSTCFGS := $(DSTDIR)/*.cfg
# we can do SYSLINUX_{CFG,MODULES,FILES} # we can do SYSLINUX_{CFG,MODULES,FILES}
# CFG have only cfg snippet # CFG have only cfg snippet
...@@ -56,7 +57,7 @@ all: debug timeout ...@@ -56,7 +57,7 @@ all: debug timeout
@sed -i \ @sed -i \
-e 's,@mkimage-profiles@,$(IMAGE_NAME),' \ -e 's,@mkimage-profiles@,$(IMAGE_NAME),' \
-e 's,@relname@,$(RELNAME),' \ -e 's,@relname@,$(RELNAME),' \
$(DSTDIR)/*.cfg $(DSTCFGS)
# integerity check # integerity check
timeout: distro timeout: distro
...@@ -65,7 +66,7 @@ timeout: distro ...@@ -65,7 +66,7 @@ timeout: distro
else \ else \
TIMEOUT="$(DEFAULT_TIMEOUT)"; \ TIMEOUT="$(DEFAULT_TIMEOUT)"; \
fi; \ fi; \
sed -i "s,@timeout@,$$TIMEOUT," $(DSTDIR)/*.cfg sed -i "s,@timeout@,$$TIMEOUT," $(DSTCFGS)
distro: bootargs distro: bootargs
@if [ -n "$(META_VOL_SET)" ]; then \ @if [ -n "$(META_VOL_SET)" ]; then \
...@@ -73,26 +74,26 @@ distro: bootargs ...@@ -73,26 +74,26 @@ distro: bootargs
else \ else \
DISTRO="ALT"; \ DISTRO="ALT"; \
fi; \ fi; \
sed -i "s,@distro@,$$DISTRO," $(DSTDIR)/*.cfg sed -i "s,@distro@,$$DISTRO," $(DSTCFGS)
# pass over additional parameters, if any # pass over additional parameters, if any
bootargs: clean bootargs: clean
@if [ -n "$(STAGE2_BOOTARGS)" ]; then \ @if [ -n "$(STAGE2_BOOTARGS)" ]; then \
sed -i "s,@bootargs@,$(STAGE2_BOOTARGS)," $(DSTDIR)/*.cfg; \ sed -i "s,@bootargs@,$(STAGE2_BOOTARGS)," $(DSTCFGS); \
fi; \ fi; \
sed -i "s,@bootargs@,," $(DSTDIR)/*.cfg sed -i "s,@bootargs@,," $(DSTCFGS)
@if [ -n "$(RESCUE_BOOTARGS)" ]; then \ @if [ -n "$(RESCUE_BOOTARGS)" ]; then \
sed -i "s,@rescue_bootargs@,$(RESCUE_BOOTARGS)," $(DSTDIR)/*.cfg; \ sed -i "s,@rescue_bootargs@,$(RESCUE_BOOTARGS)," $(DSTCFGS); \
fi; \ fi; \
sed -i "s,@rescue_bootargs@,," $(DSTDIR)/*.cfg sed -i "s,@rescue_bootargs@,," $(DSTCFGS)
@if [ -n "$(BOOTVGA)" ]; then \ @if [ -n "$(BOOTVGA)" ]; then \
sed -i "s,@bootvga@,$(BOOTVGA)," $(DSTDIR)/*.cfg; \ sed -i "s,@bootvga@,$(BOOTVGA)," $(DSTCFGS); \
fi; \ fi; \
sed -i "s,@bootvga@,,;s,vga= ,," $(DSTDIR)/*.cfg sed -i "s,@bootvga@,,;s,vga= ,," $(DSTCFGS)
clean: copy clean: copy
@if [ "$(SYSLINUX_UI)" = gfxboot ]; then \ @if [ "$(SYSLINUX_UI)" = gfxboot ]; then \
sed -i "s/\^//;/menu label /d" $(DSTDIR)/*.cfg; \ sed -i "s/\^//;/menu label /d" $(DSTCFGS); \
fi fi
copy: prep copy: prep
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment