mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-21 23:01:55 +00:00
[svn r6625] Makefile fiddlings
This commit is contained in:
parent
2daacb58a7
commit
3faa35f765
11
Makefile
11
Makefile
@ -4,7 +4,7 @@ dataset_path = dataset/loser
|
||||
surveydir_path = surveys
|
||||
cavern_flags = -qq -s
|
||||
tar_flags = -cz --exclude "*/CVS" --ignore-case -f
|
||||
svxtrace_cmd = /home/cucc/bin/svxtrace.py
|
||||
svxtrace_cmd = svxtrace.py
|
||||
|
||||
###########
|
||||
|
||||
@ -29,11 +29,12 @@ folk/index.htm: noinfo/folk.csv noinfo/make-folklist.py
|
||||
|
||||
###########
|
||||
|
||||
surveytable:
|
||||
surveytable: $(surveydir_path)/surveytable.html
|
||||
|
||||
$(surveydir_path)/surveytable.html: $(shell find $(surveydir_path -printf "\"%p\"\n"))
|
||||
cd $(surveydir_path); perl tablize-csv.pl Surveys.csv
|
||||
|
||||
# Output depends on entire contents of the survey tree; the script is
|
||||
# quite quick anyway so we might as well run it every time.
|
||||
# Output depends on entire contents of the survey tree.
|
||||
|
||||
###########
|
||||
|
||||
@ -79,7 +80,7 @@ clean:
|
||||
rm -f indxal.htm folk/index.htm noinfo/all.pos
|
||||
rm -f noinfo/all.3d smkridge/204/204.3d smkridge/234/234.3d plateau/76/76.3d
|
||||
rm -f smkridge/204/surveydata.tgz smkridge/234/surveydata.tgz plateau/76/surveydata.tgz noinfo/all.tgz
|
||||
rm -f surveys/surveytable.html
|
||||
rm -f $(surveydir_path)/surveytable.html
|
||||
rm -f report.html
|
||||
|
||||
###########
|
||||
|
29
svxtrace.py
Executable file
29
svxtrace.py
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/python
|
||||
import sys, os.path, re
|
||||
|
||||
reg = re.compile(r'^\*include ([^;\s]*?)\s*$', re.MULTILINE)
|
||||
|
||||
|
||||
|
||||
def printdeps(filename):
|
||||
"""Expects a filename relative to script's working directory."""
|
||||
if(filename[-4:]!='.svx'): filename += ".svx"
|
||||
print filename
|
||||
t = file(filename).read()
|
||||
for m in re.findall(reg, t):
|
||||
newfname = m
|
||||
if(newfname[-4:]!='.svx'): newfname += '.svx'
|
||||
newfname = os.path.normpath(os.path.dirname(filename) + '/' + newfname)
|
||||
if(os.path.exists(newfname)):
|
||||
printdeps(newfname)
|
||||
else: # imitate cavern case-sensitivity workaround
|
||||
newfname = m.lower()
|
||||
newfname = os.path.normpath(os.path.dirname(filename) + '/' + newfname)
|
||||
printdeps(newfname)
|
||||
|
||||
|
||||
if(len(sys.argv) != 2):
|
||||
print >>sys.stderr, "Usage: %s SVXFILE" % sys.argv[0]
|
||||
sys.exit(1)
|
||||
|
||||
printdeps(sys.argv[1])
|
Loading…
Reference in New Issue
Block a user