File tree 3 files changed +17
-4
lines changed
3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ LIB_TOP_SRC = $(VPATH)/src/html5.rs
9
9
LIB_ALL_SRC = $(GEN_LIB_SRC ) $(shell find $(VPATH ) /src -type f -name '* .rs')
10
10
LIB = $(shell $(RUSTC ) --crate-file-name "$(LIB_TOP_SRC ) ")
11
11
12
+ MACROS_TOP_SRC = $(VPATH ) /macros/mod.rs
13
+ MACROS_ALL_SRC = $(shell find $(VPATH ) /macros -type f -name '* .rs')
14
+ MACROS = $(shell $(RUSTC ) --crate-file-name "$(MACROS_TOP_SRC ) ")
15
+
12
16
EXT_TEST_TOP_SRC = $(VPATH ) /test/mod.rs
13
17
EXT_TEST_ALL_SRC = $(shell find $(VPATH ) /test -type f -name '* .rs')
14
18
@@ -21,7 +25,10 @@ $(VPATH)/generated/char_ref_data.rs: $(VPATH)/codegen/gen-char-ref-data.py
21
25
mkdir -p $(dir $@ )
22
26
$< $(VPATH ) > $@
23
27
24
- $(LIB ) : $(LIB_ALL_SRC )
28
+ $(MACROS ) : $(MACROS_ALL_SRC )
29
+ $(RUSTC ) $(RUSTFLAGS ) $(MACROS_TOP_SRC )
30
+
31
+ $(LIB ) : $(MACROS ) $(LIB_ALL_SRC )
25
32
$(RUSTC ) $(RUSTFLAGS ) $(LIB_TOP_SRC )
26
33
27
34
tokenize-example : $(VPATH ) /examples/tokenize-example.rs $(LIB )
Original file line number Diff line number Diff line change 2
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
4
5
- #[ macro_escape] ;
5
+ #[ crate_id="html5-macros" ] ;
6
+ #[ crate_type="dylib" ] ;
6
7
8
+ #[ feature( macro_rules) ] ;
9
+
10
+ #[ macro_export]
7
11
macro_rules! unwrap_or_return( ( $opt: expr, $retval: expr) => (
8
12
match $opt {
9
13
None => return $retval,
10
14
Some ( x) => x,
11
15
}
12
16
) )
13
17
18
+ #[ macro_export]
14
19
macro_rules! test_eq( ( $name: ident, $left: expr, $right: expr) => (
15
20
#[ test]
16
21
fn $name( ) {
Original file line number Diff line number Diff line change 10
10
#[ phase( syntax) ]
11
11
extern crate phf_mac;
12
12
13
+ #[ phase( syntax) ]
14
+ extern crate macros = "html5-macros" ;
15
+
13
16
extern crate phf;
14
17
extern crate collections;
15
18
16
- mod macros;
17
-
18
19
mod util {
19
20
pub mod ascii;
20
21
pub mod buffer_queue;
You can’t perform that action at this time.
0 commit comments