because make variables are expanded and functions are evaluated before they get to the shell. This results in the `install` target never working, even when given INSTALL=1. Solution: use make's ``$(if)``.
Second, copying only ``*.grf`` files in the ``data`` subdir didn't produce a working isntall because it missed things like ``sample.cat``. Solution: copy all files there.
Code: Select all
--- openttd-0.3.3/Makefile 2004-07-14 18:46:12.000000000 +0300
+++ openttd/Makefile 2004-08-12 17:17:33.000000000 +0300
@@ -537,15 +537,15 @@
ifndef OSX
ifndef MORPHOS
install:
- @if [ "$(INSTALL)" == "" ]; then $(error make install is highly experimental at his state and not\
- tested very much - use at your own risk - to use run \"make install INSTALL:=1\" - make sure makefile.config\
- is set correctly up - run \"make upgradeconf\")
- @if [ "$(DATA_DIR)" == "" ]; then $(error no install path set - check makefile.config)
+ @$(if $(INSTALL),,$(error make install is highly experimental at his state and not\
+ tested very much - use at your own risk - to use run \"make install INSTALL:=1\" - make sure makefile.config\
+ is set correctly up - run \"make upgradeconf\"))
+ @$(if $(DATA_DIR),,$(error no install path set - check makefile.config))
mkdir -p $(DATA_DIR)/lang
mkdir -p $(DATA_DIR)/data
cp $(TTD) $(BINARY_INSTALL)
cp lang/*.lng $(DATA_DIR)/lang
- cp data/*.grf $(DATA_DIR)/data
+ cp data/* $(DATA_DIR)/data
else #MorphOS
install:
$(error make install is not supported on MorphOS)