aboutsummaryrefslogtreecommitdiff
path: root/buildtools/defstack.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-04-10 22:56:47 +0000
committerRob Austein <sra@hactrn.net>2014-04-10 22:56:47 +0000
commit45b95aaadc861b0e682373164fe18fa0c5ed2b2e (patch)
tree6e415c4dd6b78e84a58ae0038ab9847fb69feafc /buildtools/defstack.py
parent5e0d1807ca7b049bde262a529443924adfd903e6 (diff)
parentb7459d825cfadb9db265ed1b3bd0c10682464767 (diff)
Merge tk685 branch back to trunk. This completes the move of the rpki
libraries and rpki.POW module from the rpki-ca package to the rpki-rp package. Closes #685, closes #633. svn path=/trunk/; revision=5784
Diffstat (limited to 'buildtools/defstack.py')
-rw-r--r--buildtools/defstack.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/buildtools/defstack.py b/buildtools/defstack.py
index 4d93ce66..757516f3 100644
--- a/buildtools/defstack.py
+++ b/buildtools/defstack.py
@@ -22,6 +22,7 @@
# PERFORMANCE OF THIS SOFTWARE.
import fileinput
+import os.path
import sys
import re
@@ -76,7 +77,9 @@ token = None
for line in fileinput.input():
if token is None:
- token = "".join(c if c.isalnum() else "_" for c in fileinput.filename().upper())
+ path = fileinput.filename().split(os.path.sep)
+ path = os.path.join(path[-2], path[-1]) if len(path) > 1 else path[-1]
+ token = "".join(c if c.isalnum() else "_" for c in path.upper())
sys.stdout.write(header.replace("%", token))
if "DECLARE_STACK_OF" in line: