File: Makefile.in

package info (click to toggle)
openttd-openmsx 0.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 984 kB
  • ctags: 49
  • sloc: python: 124; makefile: 73
file content (49 lines) | stat: -rw-r--r-- 1,996 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
#
# This file is part of the OpenMSX music set for OpenTTD.
# OpenMSX is free content; you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundation, version 2.
# OpenMSX 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 Swedish RailSet. If not, see 
# <http://www.gnu.org/licenses/>.
#

$(MAIN_TARGET): $(MAIN_FILENAME_SRC) $(MIDI_FILES) $(DESC_FILENAME) $(README_FILENAME) $(CHANGELOG_FILENAME) $(LICENSE_FILENAME) $(REV_FILENAME)
	$(_E) "[Generating] $@"
	@echo "[metadata]" > $@
	@echo "name        = $(REPO_NAME)" >> $@
	@echo "shortname   = $(REPO_SHORTNAME)" >> $@
	@echo "version     = $(REPO_REVISION)" >> $@

	$(_V) cat $(DESC_FILENAME_SRC) | grep -a -E '^description' | sed 's/$$/ [$(REPO_TITLE)]/' >> $@

	@echo "" >> $@
	@echo "[files]" >> $@
	$(_V) cat $(MAIN_FILENAME_SRC) | scripts/playlist.py >> $@

	@echo "" >> $@
	@echo "[md5s]" >> $@
	$(_V) cat $(MAIN_FILENAME_SRC) | scripts/sanitize_list.py | scripts/md5list.py >> $@

	@echo "" >> $@
	@echo "[names]" >> $@
	$(_V) cat $(MAIN_FILENAME_SRC) | scripts/sanitize_list.py | scripts/namelist.py >> $@
	
	@echo "" >> $@
	@echo "[origin]" >> $@
	@echo "$(REPO_ORIGIN)" >> $@
	$(_E) "[Done] Basesound successfully generated."
	$(_E) ""
	
docs/readme.txt: readme.ptxt $(REV_FILENAME)
	$(_E) "[Generating] $@"
	$(_V) cat $< \
		| sed -e "s/$(REPO_TITLE_DUMMY)/$(REPO_TITLE)/" \
		| sed -e "s/$(GRF_ID_DUMMY)/$(GRF_ID)/" \
		| sed -e "s/$(REPO_REVISION_DUMMY)/$(REPO_REVISION)/" \
		| sed -e "s/$(OUTPUT_FILENAME_DUMMY)/$(OUTPUT_FILENAME)/" \
		> $@
	$(_V) cat $(MAIN_FILENAME_SRC) | scripts/sanitize_list.py | scripts/authorlist.py >> $@
		
	$(_V) [ -z "$(UNIX2DOS)" ] || $(UNIX2DOS) $(UNIX2DOS_FLAGS) $@