Makefile: dist target works again

For now, Make is dependent on being run inside of the git repository,
at least if something like `make VERSION=3.14` isn't used. Will be
nice in the future if it can read from the VERSION file as a fallback.
This commit is contained in:
Mike Swanson 2013-12-31 01:51:20 -08:00
parent b7b59b7ea1
commit 4619f5a4de
2 changed files with 39 additions and 44 deletions

View file

@ -26,6 +26,7 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION != git describe
WADS=wads
CPP=scripts/simplecpp
DEUTEX=deutex
@ -151,15 +152,13 @@ $(WADS)/freedoom_sounds.wad : wadinfo.txt force
rm -f $@
$(DEUTEX) $(DEUTEX_ARGS) -sounds -musics -build wadinfo.txt $@
dist : $(OBJS)
scripts/makepkgs $(OBJS)
doc:
doc: BUILD-SYSTEM.asc README.asc
asciidoc BUILD-SYSTEM.asc
asciidoc README.asc
dist: $(OBJS) doc
VERSION=$(VERSION) scripts/makepkgs $(OBJS)
clean:
rm -f *.html deutex.log $(OBJS) \
./wadinfo.txt ./wadinfo_sw.txt \

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2013
# Contributors to the Freedoom project. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -34,11 +34,9 @@ import sys
# Documentation files included with distributions.
DIST_DOCS = [
"NEWS",
"ChangeLog",
"COPYING",
"CREDITS",
"README"
"README.html"
]
# Most WADs are given a ZIP equal to their name, but some have different
@ -46,15 +44,14 @@ DIST_DOCS = [
DIR_NAMES = {
'doom2' : 'freedoom-iwad',
'doom1' : 'freedoom-demo',
'doom' : 'freedoom-episodes',
'doom' : 'freedoom-ultimate',
'freedoom' : 'freedoom-resource-wad',
}
# Run a command, displaying it before executing it.
def run_command(command):
print "> " + command
print("> " + command)
os.system(command)
# Find the version to build:
@ -106,4 +103,3 @@ for filename in sys.argv[1:]:
run_command("zip -r %s.zip %s" % (base_dir, base_dir))
run_command("rm -rf %s" % base_dir)
os.chdir(orig_dir)