Fix some broken invocations in the data/tools makefile.

This commit is contained in:
Eric S. Raymond 2007-11-26 00:18:58 +00:00
parent 5ab65d59a6
commit 5273f5f689

View file

@ -1,31 +1,35 @@
# Recipes for various sanity checks.
#
# Hack this if our location in the Wesnoth source tree changes.
# It needs to point to the top-level directory, e.g. with data/images/sounds
# directly beneath it.
TOPDIR = ../../data/core ../../data/{multiplayer,themes} ../../data/campaigns/*
# Define this to point to a local copy of UMC to run checks on.
# Hack DATA if our location in the Wesnoth source tree changes.
# It needs to point to the top-level data directory.
DATA = ../../data
#
# The MAINLINE definition should expand to all directories considered
# to be part of the mainline distribution.
MAINLINE = $(DATA)/core $(DATA)/{multiplayer,themes} $(DATA)/campaigns/*
#
# Define UMC to point to a local copy of user-made content to run checks on.
# Note, this needs to expand to a list with one subdirectory per UMC campaign,
# otherwise the visibility checks aren't going to work right.
# UMC = ../../../umc/*
# UMC = ../../../umc*/*
sanity-check: unresolved check-obsolete
check-obsolete:
# Check for obsolete WML
./wmllint --dryrun $(TOPDIR) $(UMC)
./wmllint --dryrun $(MAINLINE) $(UMC)
unresolved:
@echo "# Report on unresolved macro calls and resource references"
@./wmlscope --unresolved $(TOPDIR) $(UMC)
@./wmlscope --unresolved $(MAINLINE) $(UMC)
all:
@echo "# Report on usage of all macros and resources"
@./wmlscope --crossreference $(TOPDIR) $(UMC)
@./wmlscope --crossreference $(MAINLINE) $(UMC)
utils-unused:
@echo "# Report on unused utility macros"
@./wmlscope --crossreference --from $(TOPDIR)data/utils --refcount 0 $(FAKE) $(TOPDIR) $(UMC)
@./wmlscope --crossreference --from $(DATA)/core/utils --refcount 0 $(MAINLINE) $(UMC)
# References to terrain graphics go through so many layers of nasty
# opaque macros that trying to reference-check them is hopeless.
@ -33,23 +37,23 @@ utils-unused:
# no references.
all-unused:
@echo "# Report on unused resource files"
@./wmlscope --crossreference --refcount 0 --force-used "terrain/" $(TOPDIR) $(UMC)
@./wmlscope --crossreference --refcount 0 --force-used "terrain/" $(MAINLINE) $(UMC)
utils-macros:
@echo "# Report on usage of utility macros"
@./wmlscope --crossreference --from $(TOPDIR)data/utils $(TOPDIR) $(UMC)
@./wmlscope --crossreference --from $(DATA)/core/utils $(MAINLINE) $(UMC)
collisions:
@echo "# Report on duplicate resource files."
@./wmlscope --collisions $(TOPDIR) $(UMC)
@./wmlscope --collisions $(MAINLINE) $(UMC)
# Report a list of symbols and resources defined in mainline.
definitions:
@./wmlscope --definitions --exclude data/scenarios --exclude data/campaigns $(TOPDIR)
@./wmlscope --definitions --exclude data/scenarios --exclude data/campaigns $(MAINLINE)
# Generate a reference page for the utility macros.
macro-reference.xhtml:
@cat helpheader.xhtml >macro-reference.xhtml
@./wmlscope --extracthelp --exclude data/scenarios --exclude data/tutorial --exclude data/campaigns $(TOPDIR) >>macro-reference.xhtml
@./wmlscope --extracthelp --exclude data/scenarios --exclude data/tutorial --exclude data/campaigns $(MAINLINE) >>macro-reference.xhtml
@cat helptrailer.xhtml >>macro-reference.xhtml