From bcc09aa2ba01eff458a00aff853d58ed8213a5da Mon Sep 17 00:00:00 2001 From: Matthew White Date: Sat, 16 Dec 2017 18:41:45 +0100 Subject: Fix: change 'CMakefiles' to 'CMakeFiles' (the 'F' is uppercase) * doc/arch.doc: Fix two typos. Change 'CMakefiles' to 'CMakeFiles' (the 'F' is uppercase). 'CMakefiles' prevented the verbatim perl script to run correctly, giving error due to an unexisting dir. --- doc/arch.doc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/arch.doc b/doc/arch.doc index 4b17d7c..7a7cd81 100644 --- a/doc/arch.doc +++ b/doc/arch.doc @@ -209,12 +209,12 @@ if (!-e "../src/${file}.l") exit 1; } system("touch ../src/${file}.l"); -unless (rename "src/CMakeFiles/_doxygen.dir/build.make","src/CMakefiles/_doxygen.dir/build.make.old") { +unless (rename "src/CMakeFiles/_doxygen.dir/build.make","src/CMakeFiles/_doxygen.dir/build.make.old") { print STDERR "Error: cannot rename src/CMakeFiles/_doxygen.dir/build.make!\n"; exit 1; } if (open(F,"src/CMakefiles/_doxygen.dir/build.make")) { + unless (open(G,">src/CMakeFiles/_doxygen.dir/build.make")) { print STDERR "Error: opening file build.make for writing\n"; exit 1; } -- cgit v0.12 From b11b19badf4ef7318512c28f448dbecd6a47a715 Mon Sep 17 00:00:00 2001 From: Matthew White Date: Sat, 16 Dec 2017 20:20:56 +0100 Subject: Fix: perl script regexp to toggle flex debug information --- doc/arch.doc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/arch.doc b/doc/arch.doc index 7a7cd81..618dcca 100644 --- a/doc/arch.doc +++ b/doc/arch.doc @@ -220,12 +220,12 @@ if (open(F,") { - if ( s/flex \$\(LEX_FLAGS\) -P${file}YY/flex \$(LEX_FLAGS) -d -P${file}YY/ ) { - print "Enabling debug info for $file.l\n"; - } - elsif ( s/flex \$\(LEX_FLAGS\) -d -P${file}YY/flex \$(LEX_FLAGS) -P${file}YY/ ) { + if ( s/flex \$\(LEX_FLAGS\) -d(.*) ${file}.l/flex \$(LEX_FLAGS)$1 ${file}.l/ ) { print "Disabling debug info for $file\n"; } + elsif ( s/flex \$\(LEX_FLAGS\)(.*) ${file}.l$/flex \$(LEX_FLAGS) -d$1 ${file}.l/ ) { + print "Enabling debug info for $file.l\n"; + } print G "$_"; } close F; -- cgit v0.12 From 856a43cfe08179ebbcebe656262b0229925547c8 Mon Sep 17 00:00:00 2001 From: Matthew White Date: Sat, 16 Dec 2017 20:05:50 +0100 Subject: Fix: add missing newline char '\n' --- doc/arch.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/arch.doc b/doc/arch.doc index 618dcca..fe86ca9 100644 --- a/doc/arch.doc +++ b/doc/arch.doc @@ -205,7 +205,7 @@ $file = shift @ARGV; print "Toggle debugging mode for $file\n"; if (!-e "../src/${file}.l") { - print STDERR "Error: file ../src/${file}.l does not exist!"; + print STDERR "Error: file ../src/${file}.l does not exist!\n"; exit 1; } system("touch ../src/${file}.l"); -- cgit v0.12 From 507880a0c7ed6029ce7ede2e85d23a9650a3f6bf Mon Sep 17 00:00:00 2001 From: Matthew White Date: Sat, 16 Dec 2017 20:39:05 +0100 Subject: Fix: add missing semicolon ';' at end of line --- doc/arch.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/arch.doc b/doc/arch.doc index fe86ca9..e5fbbdc 100644 --- a/doc/arch.doc +++ b/doc/arch.doc @@ -237,7 +237,7 @@ else { # touch the file $now = time; -utime $now, $now, $file +utime $now, $now, $file; \endverbatim Another way to get rules matching / debugging information from the \c flex code is setting LEX_FLAGS with \c make (`make LEX_FLAGS=-d`). -- cgit v0.12