]> granicus.if.org Git - re2c/commitdiff
Makefile.am: use inference rule '.re.cc' to avoid rule duplication.
authorUlya Trofimovich <skvadrik@gmail.com>
Mon, 20 Jul 2015 13:39:54 +0000 (14:39 +0100)
committerUlya Trofimovich <skvadrik@gmail.com>
Mon, 20 Jul 2015 13:39:54 +0000 (14:39 +0100)
Inference rules is a standard POSIX make feature.

re2c/Makefile.am
re2c/bootstrap/doc/manual.html [moved from re2c/bootstrap/manual.html with 96% similarity]
re2c/bootstrap/doc/re2c.1 [moved from re2c/bootstrap/re2c.1 with 99% similarity]
re2c/bootstrap/src/conf/parse_opts.cc [moved from re2c/bootstrap/parse_opts.cc with 100% similarity]
re2c/bootstrap/src/parse/parser.cc [moved from re2c/bootstrap/parser.cc with 100% similarity]
re2c/bootstrap/src/parse/scanner_lex.cc [moved from re2c/bootstrap/scanner_lex.cc with 99% similarity]
re2c/bootstrap/src/parse/y.tab.h [moved from re2c/bootstrap/y.tab.h with 100% similarity]

index 9df554af8fb2373a40eb2591068f70c5a4f4ceb3..dbcc308f235fe8739c5850775bb1006a8966dfc7 100644 (file)
@@ -114,10 +114,10 @@ re2c_SOURCES = \
        $(SRC)
 
 # autogenerated sources
-AUTOGEN_SCANNER = scanner_lex.cc
-AUTOGEN_PARSEOPT = parse_opts.cc
-AUTOGEN_PARSER = parser.cc
-AUTOGEN_PARSER_HDR = y.tab.h
+AUTOGEN_SCANNER = src/parse/scanner_lex.cc
+AUTOGEN_PARSEOPT = src/conf/parse_opts.cc
+AUTOGEN_PARSER = src/parse/parser.cc
+AUTOGEN_PARSER_HDR = src/parse/y.tab.h
 AUTOGEN = \
        $(AUTOGEN_PARSER) \
        $(AUTOGEN_PARSER_HDR) \
@@ -126,12 +126,12 @@ AUTOGEN = \
 nodist_re2c_SOURCES = $(AUTOGEN)
 
 # bootstrap sources
-BOOTSTRAP_SCANNER = bootstrap/scanner_lex.cc
-BOOTSTRAP_PARSEOPT = bootstrap/parse_opts.cc
-BOOTSTRAP_PARSER = bootstrap/parser.cc
-BOOTSTRAP_PARSER_HDR = bootstrap/y.tab.h
-BOOTSTRAP_DOC_MAN = bootstrap/re2c.1
-BOOTSTRAP_DOC_HTML = bootstrap/manual.html
+BOOTSTRAP_SCANNER = bootstrap/src/parse/scanner_lex.cc
+BOOTSTRAP_PARSEOPT = bootstrap/src/conf/parse_opts.cc
+BOOTSTRAP_PARSER = bootstrap/src/parse/parser.cc
+BOOTSTRAP_PARSER_HDR = bootstrap/src/parse/y.tab.h
+BOOTSTRAP_DOC_MAN = bootstrap/doc/re2c.1
+BOOTSTRAP_DOC_HTML = bootstrap/doc/manual.html
 BOOTSTRAP = \
        $(BOOTSTRAP_DOC_HTML) \
        $(BOOTSTRAP_DOC_MAN) \
@@ -194,27 +194,16 @@ $(AUTOGEN_PARSER): $(CUSTOM_PARSER)
 
 # rule has side effects:
 # - bootstrap file in source directory, must manually prepend $(top_srcdir)
-$(AUTOGEN_SCANNER): $(CUSTOM_SCANNER)
+.re.cc:
        @if test -x $(RE2C); \
        then \
                $(RE2C) $(RE2CFLAGS) -o $@ $< && \
-               cp $@ $(top_srcdir)/$(BOOTSTRAP_SCANNER); \
+               cp $@ $(top_srcdir)/bootstrap/$@; \
        else \
-               cp $(top_srcdir)/$(BOOTSTRAP_SCANNER) $@; \
+               cp $(top_srcdir)/bootstrap/$@ $@; \
        fi
 
-# rule has side effects:
-# - bootstrap file in source directory, must manually prepend $(top_srcdir)
-$(AUTOGEN_PARSEOPT): $(CUSTOM_PARSEOPT)
-       @if test -x $(RE2C); \
-       then \
-               $(RE2C) $(RE2CFLAGS) -o $@ $< && \
-               cp $@ $(top_srcdir)/$(BOOTSTRAP_PARSEOPT); \
-       else \
-               cp $(top_srcdir)/$(BOOTSTRAP_PARSEOPT) $@; \
-       fi
-
-# rebuild lexer (just in case it was bootstrapped) and rebuild re2c
+# rebuild all re2c sources using newly built re2c
 .PHONY: bootstrap
 bootstrap: all
        rm $(AUTOGEN_SCANNER) $(AUTOGEN_PARSEOPT)
similarity index 96%
rename from re2c/bootstrap/manual.html
rename to re2c/bootstrap/doc/manual.html
index d5bcb12bf6ebf89afadda7a183e98dbd06fca870..a0ed2380dd4ee381dab7961fae6d960c7aa4874c 100644 (file)
@@ -2309,14 +2309,14 @@ Ulya Trofimovich <a href="mailto:skvadrik@gmail.com">skvadrik@gmail.com</a>
 <div class="sect1">\r
 <h2 id="_version_information">VERSION INFORMATION</h2>\r
 <div class="sectionbody">\r
-<div class="paragraph"><p>This manpage describes <strong>re2c</strong>, version 0.14.1.dev, package date 16 Jun 2015.</p></div>\r
+<div class="paragraph"><p>This manpage describes <strong>re2c</strong>, version 0.14.1.dev, package date 20 Jul 2015.</p></div>\r
 </div>\r
 </div>\r
 </div>\r
 <div id="footnotes"><hr /></div>\r
 <div id="footer">\r
 <div id="footer-text">\r
-Last updated 2015-06-16 15:43:09 BST\r
+Last updated 2015-07-20 11:59:13 BST\r
 </div>\r
 </div>\r
 </body>\r
similarity index 99%
rename from re2c/bootstrap/re2c.1
rename to re2c/bootstrap/doc/re2c.1
index 4ecdc5fcabada3c4640507948bcdfb993279ae9a..952bc29b3e921b9242ea1dcc4c33c17a1356cf5f 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: re2c
 .\"    Author: [see the "AUTHORS" section]
 .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
-.\"      Date: 06/16/2015
+.\"      Date: 07/20/2015
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "RE2C" "1" "06/16/2015" "\ \&" "\ \&"
+.TH "RE2C" "1" "07/20/2015" "\ \&" "\ \&"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -1539,4 +1539,4 @@ skvadrik@gmail\&.com
 .RE
 .SH "VERSION INFORMATION"
 .sp
-This manpage describes \fBre2c\fR, version 0\&.14\&.1\&.dev, package date 16 Jun 2015\&.
+This manpage describes \fBre2c\fR, version 0\&.14\&.1\&.dev, package date 20 Jul 2015\&.
similarity index 99%
rename from re2c/bootstrap/scanner_lex.cc
rename to re2c/bootstrap/src/parse/scanner_lex.cc
index 48160f727628e909b46ec649cd21737fea39fddc..f771f7cb1010d53ee9fdf6f86e0e1a2d79312edb 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.14.2 on Wed Jun 10 17:27:57 2015 */
+/* Generated by re2c 0.14.3 on Sun Jul 19 18:08:49 2015 */
 #include <stdlib.h>
 #include <string.h>
 #include <iostream>