| 1 | ifneq ($(BINDIR),) |
|---|
| 2 | BINDIR := $(BINDIR)/ |
|---|
| 3 | else |
|---|
| 4 | BINDIR := $(dir $(firstword $(wildcard /usr/bin/mkbootmsg) $(wildcard ../../mkbootmsg))) |
|---|
| 5 | endif |
|---|
| 6 | ifneq ($(PRIVBINDIR),) |
|---|
| 7 | PRIVBINDIR := $(PRIVBINDIR)/ |
|---|
| 8 | else |
|---|
| 9 | PRIVBINDIR := $(dir $(firstword $(wildcard /usr/share/gfxboot/bin/keymapchars) $(wildcard ../../keymapchars))) |
|---|
| 10 | endif |
|---|
| 11 | |
|---|
| 12 | MKBOOTMSG = $(BINDIR)mkbootmsg |
|---|
| 13 | KEYMAPCHARS = $(PRIVBINDIR)keymapchars |
|---|
| 14 | BFLAGS = -O -v -L ../.. |
|---|
| 15 | INCLUDES = $(wildcard *.inc) |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | TRANSLATIONS = $(addsuffix .tr,en $(filter-out ar bn dz gu he hi km ml mn ne pa ta th, $(notdir $(basename $(wildcard po/*.po))))) |
|---|
| 22 | |
|---|
| 23 | DEFAULT_LANG = |
|---|
| 24 | |
|---|
| 25 | PIC_COMMON = back.jpg |
|---|
| 26 | |
|---|
| 27 | FILES_CORE = init |
|---|
| 28 | |
|---|
| 29 | INST_EXT = langlist $(TRANSLATIONS) 16x16.fnt $(PIC_COMMON) |
|---|
| 30 | |
|---|
| 31 | FILES_INST = $(FILES_CORE) $(INST_EXT) |
|---|
| 32 | |
|---|
| 33 | FILES_BOOT = $(FILES_CORE) langlist $(TRANSLATIONS) 16x16.fnt \ |
|---|
| 34 | $(PIC_COMMON) |
|---|
| 35 | |
|---|
| 36 | FILES_BOOT_EN = $(FILES_CORE) en.tr 16x16.fnt $(PIC_COMMON) |
|---|
| 37 | |
|---|
| 38 | ifdef DEFAULT_LANG |
|---|
| 39 | FILES_INST += lang |
|---|
| 40 | FILES_BOOT += lang |
|---|
| 41 | FILES_BOOT_EN += lang $(DEFAULT_LANG).tr |
|---|
| 42 | endif |
|---|
| 43 | |
|---|
| 44 | .PHONY: all themes font clean po |
|---|
| 45 | |
|---|
| 46 | all: themes |
|---|
| 47 | |
|---|
| 48 | boot install: po |
|---|
| 49 | mkdir -p $@ |
|---|
| 50 | |
|---|
| 51 | po: |
|---|
| 52 | make -C po |
|---|
| 53 | |
|---|
| 54 | themes: bootdir installdir |
|---|
| 55 | |
|---|
| 56 | bootdir: boot.config boot $(INCLUDES) |
|---|
| 57 | @cp -a po/*.tr boot |
|---|
| 58 | @for i in $(FILES_BOOT) ; do [ -f $$i ] && cp $$i boot ; done ; true |
|---|
| 59 | @echo en >boot/langlist |
|---|
| 60 | $(MKBOOTMSG) $(BFLAGS) -l boot/log -c $< boot/init |
|---|
| 61 | ifdef DEFAULT_LANG |
|---|
| 62 | @echo $(DEFAULT_LANG) >boot/lang |
|---|
| 63 | @echo $(DEFAULT_LANG) >>boot/langlist |
|---|
| 64 | endif |
|---|
| 65 | @cd boot && echo $(FILES_BOOT_EN) | sed -e "s/ /\n/g" | cpio --quiet -o >message |
|---|
| 66 | |
|---|
| 67 | installdir: install.config install $(INCLUDES) |
|---|
| 68 | @cp -a po/*.tr install |
|---|
| 69 | @for i in $(FILES_INST) ; do [ -f $$i ] && cp $$i install ; done ; true |
|---|
| 70 | $(MKBOOTMSG) $(BFLAGS) -l install/log -c $< install/init |
|---|
| 71 | ifdef DEFAULT_LANG |
|---|
| 72 | @echo $(DEFAULT_LANG) >install/lang |
|---|
| 73 | endif |
|---|
| 74 | @cd install && echo $(FILES_CORE) | sed -e "s/ /\n/g" | cpio --quiet -o >bootlogo |
|---|
| 75 | @tar -C install -czf install/bootlogo.tar.gz bootlogo $(INST_EXT) |
|---|
| 76 | |
|---|
| 77 | font: |
|---|
| 78 | @if [ -z "$(DI_PATH)" ]; then echo "Please set DI_PATH to an unpacked debian-installer source tree" >&2; exit 1; fi |
|---|
| 79 | cat po/*.po >tmp.txt |
|---|
| 80 | cat $(DI_PATH)/build/boot/x86/po/*.po >>tmp.txt |
|---|
| 81 | mkblfont -v -l 18 -p /usr/share/fonts/X11/misc \ |
|---|
| 82 | -c ISO-8859-15 -c ISO-8859-2 -c koi8-r \ |
|---|
| 83 | `$(KEYMAPCHARS) keytables.inc` \ |
|---|
| 84 | -t tmp.txt \ |
|---|
| 85 | -t install/log -t boot/log \ |
|---|
| 86 | -t langlist -t langnames.inc \ |
|---|
| 87 | -f unifont:prop=2:space_width=4 \ |
|---|
| 88 | 16x16.fnt >16x16.fnt.log |
|---|
| 89 | rm -f tmp.txt |
|---|
| 90 | |
|---|
| 91 | clean: |
|---|
| 92 | make -C po clean |
|---|
| 93 | rm -f bootdir installdir *~ *.log |
|---|
| 94 | rm -rf boot install |
|---|