From 5ce8d30439463838f845c78bc926cc9b310a8743 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 27 Jan 2009 17:30:08 +0000 Subject: imported openSUSE.tar.bz2 (from gfxboot-4.1.19-2.1.src.rpm) --- Makefile | 211 ++++++++++++++++++++++----------------------------------------- 1 file changed, 72 insertions(+), 139 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 82b6936..850bde9 100644 --- a/Makefile +++ b/Makefile @@ -1,145 +1,78 @@ -NAME=mandriva-gfxboot-theme -PACKAGE=mandriva-gfxboot-theme -VERSION := 0.38 +BINDIR := $(shell [ -x ../../gfxboot-compile ] && echo ../../ ) -BINDIR := /usr/sbin/ +BASED_ON = $(shell perl -ne 'print if s/^based_on=//' config) -PRODUCT = "Mandriva Linux 2009 Spring" -export PRODUCT +ifeq ($(BASED_ON),) +PREPARED = 1 +else +PREPARED = $(shell [ -f .prepared ] && echo 1) +endif -HELP2TXT = $(BINDIR)/help2txt -MKBOOTMSG = $(BINDIR)/mkbootmsg +ADDDIR = ../../bin/adddir BFLAGS = -O -v -L ../.. -INCLUDES = $(wildcard *.inc) -TRANSLATIONS = $(addsuffix .tr,en $(notdir $(basename $(wildcard po/*.po)))) -HELPBOOT = $(addsuffix .hlp,$(addprefix boot/,$(subst .,,$(suffix $(basename $(wildcard help-boot.*.html)))))) -HELPINST := $(addsuffix .hlp,$(addprefix inst/,$(subst .,,$(suffix $(basename $(wildcard help-install.*.html)))))) - -HELPBOOT_ALL = $(notdir $(HELPBOOT)) -HELPINST_ALL = $(notdir $(HELPINST)) - -pic_always = timer_a.jpg -PIC_INSTALL = $(pic_always) back.jpg welcome.jpg mandriva.pcx star.dat -PIC_BOOT = $(pic_always) back.jpg - -in_cpio_always = init 16x16.fnt $(TRANSLATIONS) -IN_CPIO_INST = $(in_cpio_always) -IN_CPIO_BOOT = $(in_cpio_always) langs $(HELPBOOT_ALL) $(PIC_BOOT) - -#- NB: we can't $(HELPINST_ALL) inside cpio for isolinux otherwise the cpio is too big and it fails -OUTSIDE_CPIO_INST = langs $(HELPINST_ALL) $(PIC_INSTALL) -#- NB: we can't put things outside cpio for grub - -FILES = 16x16.fnt $(PIC_INSTALL) $(PIC_BOOT) $(INCLUDES) help*.html Makefile po install.config boot.config langs grub-gfxmenu - -sharedir=$(prefix)/usr/share -themedir=$(sharedir)/gfxboot/themes/Mandriva -sbindir=$(prefix)/usr/sbin - -boot/%.hlp: help-boot.%.html boot - $(HELP2TXT) --product=$(PRODUCT) $< >$@ - -inst/%.hlp: help-install.%.html inst - $(HELP2TXT) --product=$(PRODUCT) $< >$@ - -.PHONY: all themes font aafont bitmapfont clean po - -all: themes - -boot.config: - $(error run 'make prep' first) - -boot inst: po - mkdir -p $@ - -po: - make -C po - -themes: bootdir installdir - -bootdir: boot.config po boot $(INCLUDES) $(HELPBOOT) - @cp -a po/*.tr boot - @for i in $(IN_CPIO_BOOT) ; do [ -f $$i ] && cp $$i boot ; done ; true - $(MKBOOTMSG) $(BFLAGS) -l boot/log -c $< boot/init - @sh -c 'cd boot; echo $(IN_CPIO_BOOT) | sed -e "s/ /\n/g" | cpio --quiet -o >message' - @cd boot ; rm $(IN_CPIO_BOOT) - -installdir: install.config po inst $(INCLUDES) $(HELPINST) - @cp -a po/*.tr inst - for i in $(IN_CPIO_INST) $(OUTSIDE_CPIO_INST) ; do [ -f $$i ] && cp $$i inst ; done ; true - $(MKBOOTMSG) $(BFLAGS) -l inst/log -c $< inst/init - @sh -c 'cd inst; chmod +t *' - @sh -c 'cd inst; echo $(IN_CPIO_INST) | sed -e "s/ /\n/g" | cpio --quiet -o >bootlogo' - @cd inst; rm $(IN_CPIO_INST) - -install: - mkdir -p $(themedir)/{boot,install} - sh -c 'cd boot; install -m644 message $(themedir)/boot/message' - sh -c 'cd inst; install -m644 bootlogo $(OUTSIDE_CPIO_INST) $(themedir)/install/' - install -D grub-gfxmenu $(sbindir)/grub-gfxmenu - -font: aafont - -aafont: - cat po/*.po *.html >tmp.txt - mkblfont -v -l 18 \ - -c ISO-8859-15 -c ISO-8859-2 -c koi8-r \ - `keymapchars keymap.*.inc` \ - -t tmp.txt \ - -t inst/log -t boot/log \ - -t langs \ - -f NachlieliCLM-Bold:size=14:c=0x590-0x5ff \ - -f KacstOne:size=18:c=0x600-0x6ff,0xfe70-0xfefc:dy=6 \ - -f MuktiNarrow:size=18:c=0x0981-0x09fa:bold=1 \ - -f lohit_hi:size=18:c=0x0901-0x0970:bold=1 \ - -f lohit_pa:size=19:c=0x0a01-0x0a74:bold=1 \ - -f KhmerOSsys:size=16:c=0x1780-0x17f9:dy=-2 \ - -f DejaVuSans-Bold:size=14 \ - -f FZHeiTi:size=17:nobitmap=1 \ - -f gulim:size=17:bold=1:nobitmap=1 \ - 16x16.fnt >16x16.fnt.log - rm -f tmp.txt - -bitmapfont: - cat po/*.po *.html >tmp.txt - mkblfont -v -l 18 \ - -c ISO-8859-15 -c ISO-8859-2 -c koi8-r \ - `keymapchars keymap.*.inc` \ - -t tmp.txt \ - -t inst/log -t boot/log \ - -t langs \ - -f b16_b:prop=2:space_width=6 \ - 16x16.fnt >16x16.fnt.log - rm -f tmp.txt + +SUBDIRS = fonts help-boot help-install po src + +DEFAULT_LANG = + +.PHONY: all clean distclean themes $(SUBDIRS) + +ifeq ($(PREPARED), 1) + + all: bootlogo message + +else + + all: + $(ADDDIR) ../$(BASED_ON) . + make clean + touch .prepared + make + +endif + +themes: all + +%/.ready: % + make -C $* + +src/main.bin: src + make -C src + +bootlogo: src/main.bin help-install/.ready po/.ready fonts/.ready + @rm -rf bootlogo.dir + @mkdir bootlogo.dir + cp -rL data-install/* fonts/*.fnt po/*.tr bootlogo.dir + cp -rL help-install/*.hlp bootlogo.dir + cp src/main.bin bootlogo.dir/init +ifdef DEFAULT_LANG + @echo $(DEFAULT_LANG) >bootlogo.dir/lang +endif + @sh -c 'cd bootlogo.dir; chmod +t * ; chmod -t init languages' + @sh -c 'cd bootlogo.dir; echo * | sed -e "s/ /\n/g" | cpio --quiet -o >../bootlogo' + +message: src/main.bin help-boot/.ready po/.ready fonts/.ready + @rm -rf message.dir + @mkdir message.dir + cp -rL data-boot/* fonts/*.fnt message.dir + cp -rL po/en.tr help-boot/en.hlp message.dir + cp src/main.bin message.dir/init +ifdef DEFAULT_LANG + cp -rL po/$(DEFAULT_LANG).tr help-boot/$(DEFAULT_LANG).hlp message.dir + @echo $(DEFAULT_LANG) >message.dir/lang + @echo $(DEFAULT_LANG) >>message.dir/languages +endif + @sh -c 'cd message.dir; echo * | sed -e "s/ /\n/g" | cpio --quiet -o >../message' clean: - [ ! -f po/Makefile ] || make -C po clean - rm -f `find -type l` - rmdir po 2>/dev/null || true - rm -f *~ *.log - rm -rf boot inst $(NAME).tar $(NAME)-$(VERSION) - -prep: - [ -e boot.config ] || { mkdir po ; ../../bin/adddir ../Mandriva . ; } - [ ! -f po/Makefile ] || make -C po clean - rm -f boot install *~ *.log - rm -rf boot inst - -changelog: ../common/username.xml - svn2cl --accum --authors ../common/username.xml - svn -m '' commit ChangeLog - -dist: localdist - -cleandist: - rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE).tar -dir: - mkdir $(PACKAGE)-$(VERSION) -localcopy: - tar c --exclude=.svn $(FILES) | tar x -C $(PACKAGE)-$(VERSION) - -tar: clean dir localcopy - tar cf $(PACKAGE).tar $(PACKAGE)-$(VERSION) - rm -rf $(PACKAGE)-$(VERSION) - -localdist: cleandist tar + @for i in $(SUBDIRS) ; do [ ! -f $$i/Makefile ] || make -C $$i clean || break ; done + rm -rf bootlogo bootlogo.dir message message.dir *~ + +distclean: clean +ifneq ($(BASED_ON),) + rm -f .prepared + rm -f `find -type l \! -wholename ./Makefile` + rmdir `find -depth -type d \! -name . \! -name .svn \! -wholename './.svn/*' \! -wholename './*/.svn/*'` 2>/dev/null || true +endif + + \ No newline at end of file -- cgit v1.2.1