2009-07-17 17:20:55 +02:00
|
|
|
#
|
|
|
|
# Neo/Compose/Makefile
|
|
|
|
# Autor: hcw@gmx.de
|
2009-07-14 15:35:59 +02:00
|
|
|
|
2009-07-17 17:20:55 +02:00
|
|
|
# Ort der Modul-Dateien
|
|
|
|
#
|
|
|
|
SRC = ./src
|
|
|
|
MODULES_FILES = $(wildcard $(SRC)/*.module)
|
|
|
|
MODULES = $(notdir $(basename $(MODULES_FILES)))
|
2009-07-14 15:35:59 +02:00
|
|
|
|
2009-07-17 17:20:55 +02:00
|
|
|
# Liste von Demofiles, werden bei 'make all' erzeugt.
|
|
|
|
# Im Grunde ist dies seit 'make config' überflüssig.
|
|
|
|
#
|
|
|
|
DEMOFILES = \
|
|
|
|
XCompose_base \
|
|
|
|
XCompose_base_math \
|
|
|
|
XCompose_base_math_greek_lang \
|
|
|
|
XCompose_base_greek_lang \
|
|
|
|
XCompose_base_roman
|
2009-07-14 15:35:59 +02:00
|
|
|
|
2009-07-17 17:20:55 +02:00
|
|
|
# Hilfsprogramme
|
|
|
|
#
|
2009-07-14 15:35:59 +02:00
|
|
|
CHECKCOMPOSE = ./check-compose.pl
|
2009-07-17 17:20:55 +02:00
|
|
|
CONFIGURE = /bin/bash ./configure.sh
|
|
|
|
|
|
|
|
# Nutzerkonfiguration für Zusammenstellung der Datei XCompose.
|
|
|
|
# Datei .config wird von 'make config' interaktiv geschrieben.
|
|
|
|
# Defaultwert, falls .config noch nicht existiert.
|
|
|
|
#
|
|
|
|
-include ./.config
|
|
|
|
USER_XCOMPOSE ?= XCompose_base_math
|
|
|
|
|
|
|
|
#
|
|
|
|
# 'make' bzw. 'make all' erzeugt die Datei XCompose ohne Installation
|
|
|
|
#
|
|
|
|
|
|
|
|
all : XCompose $(DEMOFILES)
|
|
|
|
|
|
|
|
#
|
|
|
|
# 'make config' führt interaktive Abfrage der Konfiguration durch
|
|
|
|
# und legt Ergebnis in .config ab
|
|
|
|
#
|
|
|
|
|
|
|
|
config :
|
|
|
|
$(CONFIGURE) $(MODULES)
|
2009-07-14 15:35:59 +02:00
|
|
|
|
2009-07-17 17:20:55 +02:00
|
|
|
#
|
|
|
|
# 'make XCompose_foo_bar_baz' erzeugt Datei aus Modulen foo bar baz
|
|
|
|
#
|
|
|
|
|
|
|
|
XCompose_% : $(MODULES_FILES)
|
|
|
|
@echo "Erzeuge $@."
|
|
|
|
@echo "#" >$@
|
|
|
|
@echo "# Automatically generated file $@. Do not edit." >>$@
|
|
|
|
@echo "#" >>$@
|
|
|
|
@for i in \
|
|
|
|
`echo $@ | sed -e 's/XCompose//;s/_/ /g'` ;\
|
2009-07-14 15:35:59 +02:00
|
|
|
do \
|
2009-07-17 17:20:55 +02:00
|
|
|
fn=$(SRC)/$$i.module ;\
|
2009-07-14 15:35:59 +02:00
|
|
|
if [ -e $$fn ]; then \
|
2009-07-15 16:33:59 +02:00
|
|
|
echo "# begin include module $$i" >>$@ ;\
|
2009-07-14 15:35:59 +02:00
|
|
|
cat $$fn >>$@ ;\
|
2009-07-15 16:33:59 +02:00
|
|
|
echo "# end include module $$i" >>$@ ;\
|
2009-07-14 15:35:59 +02:00
|
|
|
else \
|
2009-07-17 17:20:55 +02:00
|
|
|
echo "*** Warnung: Datei $$fn kann nicht eingebunden werden" ;\
|
2009-07-14 15:35:59 +02:00
|
|
|
fi \
|
|
|
|
done
|
|
|
|
|
2009-07-17 17:20:55 +02:00
|
|
|
XCompose : $(USER_XCOMPOSE) $(wildcard .config)
|
2009-07-15 11:44:44 +02:00
|
|
|
cp $< $@
|
|
|
|
|
2009-07-17 17:20:55 +02:00
|
|
|
#
|
|
|
|
# Installiere ins Homeverzeichnis
|
|
|
|
#
|
|
|
|
|
|
|
|
install : XCompose
|
2009-07-18 14:07:53 +02:00
|
|
|
cat $(SRC)/en_US.UTF-8 XCompose > $${HOME}/.XCompose
|
2009-07-17 17:20:55 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# Test der XCompose-Dateien auf Korrektheit
|
|
|
|
#
|
|
|
|
|
|
|
|
check :
|
|
|
|
@for i in $(wildcard XCompose*) ; do \
|
2009-07-14 15:35:59 +02:00
|
|
|
$(CHECKCOMPOSE) -q $$i || (\
|
2009-07-17 17:20:55 +02:00
|
|
|
echo Problem in Datei $$i. ;\
|
|
|
|
echo Mehr Informationen mit \`$(CHECKCOMPOSE) $$i\'. ); done
|
|
|
|
|
|
|
|
#
|
|
|
|
# weitere Standard-Targets
|
|
|
|
#
|
2009-07-14 15:35:59 +02:00
|
|
|
|
|
|
|
clean :
|
|
|
|
-rm -f XCompose_*
|
2009-07-16 09:19:32 +02:00
|
|
|
-rm -f XCompose
|
2009-07-14 15:35:59 +02:00
|
|
|
|
2009-07-17 17:20:55 +02:00
|
|
|
distclean : clean
|
|
|
|
-rm -f .config
|
2009-07-14 15:35:59 +02:00
|
|
|
|
2009-07-17 17:20:55 +02:00
|
|
|
.PHONY : all config check clean distclean install
|
2009-07-16 09:19:32 +02:00
|
|
|
|