File: Makefile.am

package info (click to toggle)
cuyo 2.1.0-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,752 kB
  • sloc: cpp: 12,451; ml: 6,341; sh: 1,228; pascal: 754; yacc: 558; makefile: 261; lex: 244; perl: 204; sed: 5
file content (106 lines) | stat: -rw-r--r-- 3,982 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#
#   Copyright 2001 by the cuyo developers
#   Modified 2002,2003,2006-2008,2014 by the cuyo developers
#   Maintenance modifications 2011 by the cuyo developers
#
#   This program is free software; you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation; either version 2 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program; if not, write to the Free Software
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#



# Nicht angeben, weil da kein Makefile.am drin ist. (Wird nicht bentigt, da
# die Bilder von hier aus installiert werden.)
# SUBDIRS = pics

MAINTAINERCLEANFILES = Makefile.in

# Alle .ld-Dateien, die in main.ld erwhnt werden (main.ld erwhnt sich
# selbst). Aus irgendeinem Grund wird das mehrfach ausgefhrt. Wenn es
# nur um make und nicht um automake ginge, knnte man hier ?= statt :=
# verwenden und wahrscheinlich wre alles gut. Das kann mal jemand
# beheben, der mehr von automake versteht.
leveldateien := $(shell ./used_levels.sh)
lddateien := $(leveldateien) summary.ld globals.ld example.ld

# levels gehren zur Distribution. Und die used-Skripte auch.
EXTRA_DIST = $(lddateien) used_images.sh used_sounds.sh used_levels.sh genSummary.pl summary.in

# levels in das pkgdata-Verzeichnis installieren
pkgdata_DATA = $(lddateien)



# Wenn keine Libz existiert, sollen die Bilder beim installieren entpackt
# werden:
if HASLIBZ
unzip =
else
unzip = gunzip $(DESTDIR)$(pkgdatadir)/pics/*.gz
endif


# Beim installieren (von prozessorunabhngem) auerdem die Bilder und sounds kopieren:
install-data-local:
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pics
	$(INSTALL_DATA) $(srcdir)/pics/*.png $(DESTDIR)$(pkgdatadir)/pics/ || true
	$(INSTALL_DATA) $(srcdir)/pics/*.xpm $(DESTDIR)$(pkgdatadir)/pics/ || true
	$(INSTALL_DATA) $(srcdir)/pics/*.xpm.gz $(DESTDIR)$(pkgdatadir)/pics/ || true
	$(unzip)
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/sounds
	$(INSTALL_DATA) $(srcdir)/sounds/*.wav $(DESTDIR)$(pkgdatadir)/sounds/ || true
	$(INSTALL_DATA) $(srcdir)/sounds/*.it $(DESTDIR)$(pkgdatadir)/sounds/ || true


# Ach, was soll's: Ich geh davon aus, dass jemand, der Cuyo installiert,
# eh nur Bilder hat, die installiert werden sollen. Also braucht nicht
# extra nochmal das langsame Bild-Test-Skript gestartet zu werden. (Ansonsten
# msste man obige Zeile durch die nachfolgende ersetzen.)
#	$(INSTALL_DATA) `cat used_images` $(DESTDIR)$(pkgdatadir)/pics/


# Die Bilder sollen auch in die Distribution: Und die Sounds auch
dist-hook: used_images used_sounds
	mkdir $(distdir)/pics
	cp -p `cat used_images` $(distdir)/pics/
	mkdir $(distdir)/sounds
	cp -p `cat used_sounds` $(distdir)/sounds/


# Ein paar spezielle Make-Regeln:

summary.ld: genSummary.pl $(leveldateien) summary.in
	perl -w genSummary.pl

used_levels: summary.ld
	echo $(leveldateien) > used_levels

# Die Bild-Dateien nicht alle einzeln aufzhlen, sondern automatisch
# diejenigen nehmen, die in den levels stehen.
# Das tut das Skript used_images.sh
# Es findet brigens auch die .xpm.gz-Bilder.
used_images: used_images.sh summary.in $(lddateien) pics
	./used_images.sh $(srcdir) '$(lddateien)' > used_images

# Entsprechend die Sounds
used_sounds: used_sounds.sh summary.in $(lddateien) sounds
	./used_sounds.sh $(srcdir) '$(lddateien)' > used_sounds

# Wenn beim Erzeugen einer Datei ein Fehler passiert, soll, falls
# trotzdem schon eine halbe Datei erzeugt wurde, diese halbe Datei
# geloescht werden. Ist fuer genSummary.pl notwendig (und sollte
# eigentlich sowieso der default sein.)	
.DELETE_ON_ERROR: