* depfix.sed: Remove /foo/../ sequences, looping til no more.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13730
dc483132-0cff-0310-8789-
dd5450dbe970
+2001-09-06 Ken Raeburn <raeburn@mit.edu>
+
+ * depgen.sed: New file.
+ * depfix.sed: Remove /foo/../ sequences, looping til no more.
+
2001-09-01 Ken Raeburn <raeburn@mit.edu>
* depfix.sed: Temporarily add trailing whitespace to make
s;/usr/include/[^ ]* ;;g
s;/usr/lib/[^ ]* ;;g
s;/mit/cygnus[^ ]* ;;g
+
+# remove foo/../ sequences
+:dotdot
+/\/[a-z][a-z0-9_.\-]*\/\.\.\// {
+s;/[a-z][a-z0-9_.\-]*/\.\./;/;g
+bdotdot
+}
+
# rely on VPATH for $(srcdir) files
s;\$(srcdir)/\([^ /]* \);\1;g
# now delete trailing whitespace
--- /dev/null
+# input srctop something like ../../../../asrc/lib/krb5/asn.1/../../../
+# output a sequence of sed commands for recognizing and replacing srctop,
+# something like:
+# s; ../../../../asrc/lib/krb5/asn.1/../../../; $(SRCTOP)/;g
+# s; ../../../../asrc/lib/krb5/../../; $(SRCTOP)/;g
+# s; ../../../../asrc/lib/../; $(SRCTOP)/;g
+# s; ../../../../asrc/; $(SRCTOP)/;g
+
+s,\.,\\.,g
+s,^,s; ,
+s,$,/; $(SRCTOP)/;g,
+:loop
+/\/[a-z][a-z0-9_.\-]*\/\\\.\\\.\// {
+p
+s;/[a-z][a-z0-9_.\-]*/\\\.\\\./;/;
+bloop
+}
+# implicit print at end