Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove: [Makefile] documentation is now supplied, no longer generated #28

Merged
merged 2 commits into from Feb 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 1 addition & 35 deletions Makefile
Expand Up @@ -60,7 +60,7 @@ all: bundle_tar
# general definitions (no rules!)
-include Makefile.dist
.PHONY: all clean distclean
.PHONY: bananas doc gfx grf lng nml obg
.PHONY: bananas gfx grf lng nml obg
.PHONY: bundle bundle_tar bundle_bzip bundle_gzip bundle_xz bundle_zip
.PHONY: bundle_src check bundle_bsrc bundle_gsrc bundle_xsrc bundle_zsrc

Expand Down Expand Up @@ -94,8 +94,6 @@ DEFAULT_BRANCH_NAME ?= master
AWK ?= awk
GREP ?= grep
PYTHON ?= python
UNIX2DOS ?= $(shell which unix2dos)
UNIX2DOS_FLAGS ?= $(shell [ -n $(UNIX2DOS) ] && $(UNIX2DOS) -q --version >/dev/null 2>&1 && echo "-q" || echo "")

# Graphics processing
GIMP ?= $(shell which gimp)
Expand Down Expand Up @@ -332,34 +330,6 @@ maintainer-clean::
$(_V) -rm -rf $(MD5_SRC_FILENAME)


################################################################
#
# Target doc
#
# Generate documentation files.
#
################################################################

doc: $(DOC_FILES)

%.txt: %.ptxt Makefile.vcs
$(_E) "[DOC] $@"
$(_V) cat $< \
| sed -e "s/$(REPLACE_TITLE)/$(REPO_TITLE)/" \
| sed -e "s/$(REPLACE_GRFID)/$(GRF_ID)/" \
| sed -e "s/$(REPLACE_FILENAME)/$(OUTPUT_FILENAME)/" \
> $@
ifeq ($(UNIX2DOS),)
$(_E) Warning: unix2dos not available. $@ keeps current eol style.
else
$(_V) $(UNIX2DOS) $(UNIX2DOS_FLAGS) $@
endif

clean::
$(_E) "[CLEAN DOC]"
$(_V) -for i in $(patsubst %.txt,%,$(DOC_FILES)); do [ -f $$i.ptxt ] && [ -f $$i.txt ] && rm -rf $$i.txt || true; done


################################################################
#
# Target obg
Expand Down Expand Up @@ -663,9 +633,6 @@ endif
help:
$(_E) "all: Build the entire NewGRF and its documentation"
$(_E) "install: Install into the default NewGRF directory ($(INSTALL_DIR))"
ifdef DOC_FILES
$(_E) "doc: Build the documentation ($(DOC_FILES))"
endif
ifdef GFX_SCRIPT_LIST_FILES
$(_E) "gfx: Build the graphics dependencies"
endif
Expand Down Expand Up @@ -709,7 +676,6 @@ endif
$(_E) "AWK defaults: $(AWK)"
$(_E) "GREP defaults: $(GREP)"
$(_E) "GRFID GRFID_FLAGS. defaults: $(GRFID) $(GRFID_FLAGS)"
$(_E) "UNIX2DOS UNIX2DOS_FLAGS defaults: $(UNIX2DOS) $(UNIX2DOS_FLAGS)"
ifdef GFX_SCRIPT_LIST_FILES
$(_E) "GIMP GIMP_FLAGS defaults: $(GIMP) $(GIMP_FLAGS)"
endif
Expand Down