diff --git a/Makefile b/Makefile index ecfd410..5aa703f 100644 --- a/Makefile +++ b/Makefile @@ -12,17 +12,18 @@ INCLUDE = \ SRC = tab.cc help.cc CXX ?= g++ +STATIC_LIBS ?= tab: $(SRC) $(INCLUDE) $(FUNCS) $(CXX) -std=c++11 -O3 -Wall -Iaxe -pthread -lm $(SRC) -o tab + strip tab -dist: $(SRC) $(INCLUDE) $(FUNCS) - $(CXX) -std=c++11 -O3 -Wall -Iaxe -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lm -pthread $(SRC) -static -o tab-linux-x86_64 - strip tab-linux-x86_64 +tab-static: $(SRC) $(INCLUDE) $(FUNCS) + $(CXX) $(STATIC_LIBS) -std=c++11 -O3 -Wall -Iaxe -Wl,--whole-archive -lpthread -Wl,--no-whole-archive -lm -pthread $(SRC) -static -o tab-static + strip tab-static -install: tab - strip tab - cp tab /usr/local/bin/ +install: tab tab-static + cp tab tab-static /usr/local/bin/ clean: rm tab diff --git a/README.md b/README.md index a14a11a..639969b 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ If you want to use a compiler other than gcc, e.g., clang, then type this: $ CXX=clang++ make ``` +A default.nix for reproducible builds is provided. + ## Usage ## The default is to read from standard input: @@ -512,6 +514,8 @@ chars := ("\t" | "\n" | "\r" | "\e" | "\\" | any)* string_interpolation = "${" expr "}" ``` +Comments start with the `#` symbol and continue until the end of line. Comments are parsed as whitespace. + ### Semantics ### ##### Expressions diff --git a/default.nix b/default.nix index 3a72caa..cce62e8 100644 --- a/default.nix +++ b/default.nix @@ -1,8 +1,22 @@ { - pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/22.11.tar.gz") {} + pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/23.05.tar.gz") {} } : with pkgs; -mkShell.override { stdenv = gcc12Stdenv; } { - buildInputs = [ python3 ]; +gcc12Stdenv.mkDerivation { + name = "tab"; + version = "9.2"; + src = ./.; + nativeBuildInputs = [ python3 ]; + buildPhase = '' + make + STATIC_LIBS=-L${glibc.static}/lib make tab-static + ''; + installPhase = '' + mkdir -p $out/bin + cp tab tab-static $out/bin + ''; + doCheck = true; + checkPhase = '' + make test + ''; } - diff --git a/docs/README.html b/docs/README.html index 9393420..10eb179 100644 --- a/docs/README.html +++ b/docs/README.html @@ -148,6 +148,7 @@

Compiling and installing

The official git repository is found here.

+

A default.nix for reproducible builds is provided.

Usage

The default is to read from standard input:

$ cat mydata | tab <expression>...
@@ -494,6 +495,7 @@ 

Grammar

string_interpolation = "${" expr "}"
+

Comments start with the # symbol and continue until the end of line. Comments are parsed as whitespace.

Semantics

Expressions

An expression is either an atomic value, an assignment or definition. Assignments and definitions do not produce a value and return nothing.

diff --git a/docs/README.html.md b/docs/README.html.md index 054718b..d17dd1f 100644 --- a/docs/README.html.md +++ b/docs/README.html.md @@ -30,6 +30,8 @@ If you want to use a compiler other than gcc, e.g., clang, then type this: The official git repository is found [here](https://github.com/ivan-tkatchev/tab). +A default.nix for reproducible builds is provided. + # Usage # The default is to read from standard input: @@ -482,6 +484,9 @@ chars := ("\t" | "\n" | "\r" | "\e" | "\\" | any)* string_interpolation = "${" expr "}" ``` +Comments start with the `#` symbol and continue until the end of line. Comments are parsed as whitespace. + + ## Semantics ## ### Expressions diff --git a/docs/website/docs.html b/docs/website/docs.html index 1eecde1..10eb179 100644 --- a/docs/website/docs.html +++ b/docs/website/docs.html @@ -147,7 +147,8 @@

Compiling and installing

$ CXX=clang++ make
 
-

The official git repository is found here.

+

The official git repository is found here.

+

A default.nix for reproducible builds is provided.

Usage

The default is to read from standard input:

$ cat mydata | tab <expression>...
@@ -494,6 +495,7 @@ 

Grammar

string_interpolation = "${" expr "}"
+

Comments start with the # symbol and continue until the end of line. Comments are parsed as whitespace.

Semantics

Expressions

An expression is either an atomic value, an assignment or definition. Assignments and definitions do not produce a value and return nothing.

diff --git a/docs/website/index.html b/docs/website/index.html index ad924ef..1a172d5 100644 --- a/docs/website/index.html +++ b/docs/website/index.html @@ -120,6 +120,14 @@

History

+
2023-08-25
+
Version 9.2 released. Changes: + +
+
2022-03-22
Version 9.1 released. Changes: