diff --git a/wscript b/wscript index f33f46255..02682e459 100644 --- a/wscript +++ b/wscript @@ -49,9 +49,22 @@ REGRESSION_TRACES_DIR_NAME = "ns-3-dev-ref-traces" def dist_hook(): + import tarfile shutil.rmtree("doc/html", True) shutil.rmtree("doc/latex", True) + ## Create a tar.bz2 file with the traces + traces_dir = os.path.join("regression", "ns-3-dev-ref-traces") + if not os.path.isdir(traces_dir): + Params.warning("Not creating traces archive: the %s directory does not exist" % traces_dir) + else: + tar = tarfile.open(os.path.join("..", "ns-%s-ref-traces.tar.bz2" % VERSION), 'w:bz2') + tar.add(traces_dir, "ns-3-dev-ref-traces") + tar.close() + ## Now remove it; we do not ship the traces with the main tarball... + shutil.rmtree(traces_dir, True) + + def set_options(opt): def debug_option_callback(option, opt, value, parser):