From 3a4c22e931470fb1280ad0777e3a524b68314846 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sun, 18 Jun 2023 16:26:46 +0800 Subject: adjust autotools settings Add more directories under control of autotools. --- AUTHORS | 2 +- Makefile.am | 2 +- chain/Makefile.am | 19 +++++++++++++++++++ configure.ac | 2 +- grammar/Makefile.am | 19 +++++++++++++++++++ graph_macro/Makefile.am | 19 +++++++++++++++++++ src/lib.rs | 2 ++ 7 files changed, 62 insertions(+), 3 deletions(-) create mode 100644 chain/Makefile.am create mode 100644 grammar/Makefile.am create mode 100644 graph_macro/Makefile.am diff --git a/AUTHORS b/AUTHORS index 9ce63ba..1b9c701 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1 @@ -Jean Sévère Durand \ No newline at end of file +Jean Sévère Durand \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index 168da9d..026824d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1 +1 @@ -SUBDIRS=graph +SUBDIRS=graph nfa grammar graph_macro chain diff --git a/chain/Makefile.am b/chain/Makefile.am new file mode 100644 index 0000000..623572a --- /dev/null +++ b/chain/Makefile.am @@ -0,0 +1,19 @@ +.PHONY: dev rel clean check + +all: dev + +dev: + @echo "cargo build" + @@CARGO@ build + +rel: + @echo "cargo build --release" + @@CARGO@ build --release + +clean: + @echo "cargo clean" + @@CARGO@ clean + +check: + @echo "cargo clippy" + @@CARGO@ clippy diff --git a/configure.ac b/configure.ac index fe765e6..4f629ce 100644 --- a/configure.ac +++ b/configure.ac @@ -19,7 +19,7 @@ AS_IF([test "$CARGO" = "notfound"], [AC_MSG_ERROR([cargo is required])]) AC_PATH_PROG([RUSTC], [rustc], [notfound]) AS_IF([test "$RUSTC" = "notfound"], [AC_MSG_ERROR([rustc is required])]) -AC_CONFIG_FILES([Makefile graph/Makefile nfa/Makefile]) +AC_CONFIG_FILES([Makefile graph/Makefile nfa/Makefile chain/Makefile grammar/Makefile graph_macro/Makefile]) AC_OUTPUT diff --git a/grammar/Makefile.am b/grammar/Makefile.am new file mode 100644 index 0000000..623572a --- /dev/null +++ b/grammar/Makefile.am @@ -0,0 +1,19 @@ +.PHONY: dev rel clean check + +all: dev + +dev: + @echo "cargo build" + @@CARGO@ build + +rel: + @echo "cargo build --release" + @@CARGO@ build --release + +clean: + @echo "cargo clean" + @@CARGO@ clean + +check: + @echo "cargo clippy" + @@CARGO@ clippy diff --git a/graph_macro/Makefile.am b/graph_macro/Makefile.am new file mode 100644 index 0000000..623572a --- /dev/null +++ b/graph_macro/Makefile.am @@ -0,0 +1,19 @@ +.PHONY: dev rel clean check + +all: dev + +dev: + @echo "cargo build" + @@CARGO@ build + +rel: + @echo "cargo build --release" + @@CARGO@ build --release + +clean: + @echo "cargo clean" + @@CARGO@ clean + +check: + @echo "cargo clippy" + @@CARGO@ clippy diff --git a/src/lib.rs b/src/lib.rs index 7d12d9a..f5457c3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,5 @@ +// TODO: Add Emacs bindings + pub fn add(left: usize, right: usize) -> usize { left + right } -- cgit v1.2.3-18-g5258