Commit 3abfab19 authored by Marek Vavruša's avatar Marek Vavruša

scripts: update project file

parent 4f16bc08
Makefile.am
README
configure.ac
daemon/Makefile.am
daemon/layer/query.c
daemon/layer/query.h
daemon/main.c
daemon/worker.c
daemon/worker.h
include/kgetdns.h
lib/Makefile.am
lib/cache.c
lib/cache.h
lib/context.c
lib/context.h
lib/defines.h
lib/layer.h
lib/layer/iterate.c
lib/layer/iterate.h
lib/layer/itercache.c
lib/layer/itercache.h
lib/layer/static.c
lib/layer/static.h
lib/context.c
lib/context.h
lib/layer.h
lib/layer/stats.c
lib/layer/stats.h
lib/resolve.c
lib/resolve.h
tests/context.c
tests/resolve.c
lib/zonecut.h
lib/zonecut.c
lib/rplan.h
lib/rplan.c
lib/layer/stats.h
lib/layer/stats.c
lib/defines.h
lib/layer/itercache.h
lib/layer/itercache.c
lib/cache.h
lib/cache.c
lib/rplan.h
lib/zonecut.c
lib/zonecut.h
tests/Makefile.am
tests/test_context.c
tests/test_resolve.c
lib/utils.h
#!/usr/bin/python -Es
# vim: et:sw=4:ts=4:sts=4
#
# Script regenerates project file list from the list of files tracked by Git.
#
SOURCES = [
# documentation
"README", "KNOWN_ISSUES",
"Doxyfile*", "Doxy.file.h", "doc/*.rst",
# build-system
"*.ac", "*.am",
# sources
"lib/*.c", "lib/*.h", "lib/layer/*.h", "lib/layer/*.c",
"tests/*.c", "tests/*.h",
"daemon/*.c", "daemon/*.h", "daemon/layer/*.c", "daemon/layer/*.h"
]
OUTPUT_FILE = "knot-resolver.files"
# ----------------------------------------------------------------------------
from subprocess import Popen, PIPE
import os
import sys
def run(command):
p = Popen(command, stdout=PIPE, stderr=PIPE)
(out, errout) = p.communicate()
if p.returncode != 0:
raise Exception("Command %s failed.", command)
return out
print >>sys.stderr, "Updating %s." % OUTPUT_FILE
git_root = run(["git", "rev-parse", "--show-toplevel"]).strip()
os.chdir(git_root)
command = ["git", "ls-files"] + SOURCES
files = run(command).splitlines()
with open(OUTPUT_FILE, "w") as output:
output.write("\n".join(sorted(files)))
output.write("\n")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment