From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EEzMGOA18GYUFAAA62LTzQ:P1 (envelope-from ) for ; Sun, 22 Sep 2024 17:21:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id EEzMGOA18GYUFAAA62LTzQ (envelope-from ) for ; Sun, 22 Sep 2024 17:21:04 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; none Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 55B2A80444 for ; Sun, 22 Sep 2024 17:21:04 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=xWZeiEh52BHLcI1kHY7FwjpAqJr7gb5yZwxclUP8H7U=; c=simple/simple; d=lists.sr.ht; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1727018464; v=1; b=E/LVJKDdx3Qz+cOD4QhTutRR8BpcqFmKEuyxXtIm2vuvHcI6ZPATatw57mGWf4K7VFE1o/YL i01JTMAhRnZxvIkuC793XR5j3Gd/b4Y2CcbuEVDpyd3onHJaJkQWnpcujWNRmjUgOIQvK+w3qcu pkNQNl8pSPaBNwPlaejUEDznmhzhtwqP4J5A9YU2zk3CrqZJ93zjFnjT7P5Efce9kwMKc2V/RI3 oy+oBkO3h9JvFk3O4iwpZArHeed/n9BhIG5M33mt8lvlgZ6M4/Ud7tMLdPzffQBtcZu6BDLigqj SrU5RWkHbwEZRK8m/wp2gfij7LkI04xqjjknDwFgKa1Dg== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id 138A320291 for ; Sun, 22 Sep 2024 15:21:04 +0000 (UTC) Received: from out-184.mta1.migadu.com (out-184.mta1.migadu.com [95.215.58.184]) by mail-a.sr.ht (Postfix) with ESMTPS id 045A820186 for <~johnnyrichard/olang-devel@lists.sr.ht>; Sun, 22 Sep 2024 15:21:03 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1727018462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+Y6gop1IYNm2evMNE9dlKZs7u/6l4QzpS5YUhKrr6wg=; b=ZlFAhKm+IePvWXpavBb6QsSc8Af1TVxAL0thdAPodzRi82X20OmpqPq594zNJfomqJnSRb CZ8BxNLtWQ/mFZMN6IKVnrZfKJzH1x4UXo2UZTbc/BxHaHC2YmccNojBB+P3mWvwXQ4grR gwYtVwjhIo7osCz9dVcA2pbDKFdhOkWRFS8k8IDjVzQ+WZ7aA0bJTzuthaTAl/PsRk2aAR Waj9jTx4PBm9b3ajBAxdQ69uh3Om0yzM/6lzhMFuAlQmgLYLZKiHw/KmIM4/UOc010fT0g qGY5zGaP4wPqa2hbt+k6J1Hb4GPddfsVT6+FF3/2KXQReC0GxADwVlLGNULU1g== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang v2 1/3] olc: rename 'olang' binary to 'olc' Date: Sun, 22 Sep 2024 17:15:54 +0200 Message-ID: <20240922152119.1214443-2-johnny@johnnyrichard.com> In-Reply-To: <20240922152119.1214443-1-johnny@johnnyrichard.com> References: <20240922152119.1214443-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Sourcehut-Patchset-Status: UNKNOWN List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Flow: FLOW_IN X-Migadu-Country: NL X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -4.00 X-Migadu-Queue-Id: 55B2A80444 X-Spam-Score: -4.00 X-TUID: vdMG5wQi+Zt4 In the future we might need more binaries to our toolchain, by now we want to delimit the scope of this binary to only handle compilation related jobs. Fun fact, the name 'olc' can be interpreted as an abbreviation for ".ol compiler". Signed-off-by: Johnny Richard --- .gitignore | 2 +- Makefile | 14 +++++++------- docs/info/contribution-guide.texi | 5 ++--- docs/info/installation.texi | 4 ++-- docs/man/man1/{olang.1 => olc.1} | 10 +++++----- tests/integration/test.sh | 2 +- 6 files changed, 18 insertions(+), 19 deletions(-) rename docs/man/man1/{olang.1 => olc.1} (87%) diff --git a/.gitignore b/.gitignore index 0fe0790..f18560c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -olang +/olc build *.o *.info diff --git a/Makefile b/Makefile index 12b09a4..0603526 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ CFLAGS := ${CFLAGS} CFLAGS += -Werror -Wall -Wextra -Wmissing-declarations CFLAGS += -pedantic -std=c11 -ggdb -TARGET := olang +TARGET := olc PREFIX ?= /usr/local @@ -41,9 +41,9 @@ install-bin: $(TARGET) install-man: install-man1 .PHONY: install-man1 -install-man1: docs/man/man1/olang.1 - install -Dm 644 docs/man/man1/olang.1 ${DESTDIR}${MAN1DIR}/olang.1 - gzip -f ${DESTDIR}${MAN1DIR}/olang.1 +install-man1: docs/man/man1/olc.1 + install -Dm 644 docs/man/man1/olc.1 ${DESTDIR}${MAN1DIR}/olc.1 + gzip -f ${DESTDIR}${MAN1DIR}/olc.1 .PHONY: install-info install-info: olang.info @@ -56,15 +56,15 @@ install-info: olang.info uninstall: uninstall-bin uninstall-man uninstall-info .PHONY: uninstall-bin -uninstall-bin: ${DESTDIR}${BINDIR}/olang - @rm -f ${DESTDIR}${BINDIR}/olang +uninstall-bin: ${DESTDIR}${BINDIR}/$(TARGET) + @rm -f ${DESTDIR}${BINDIR}/$(TARGET) .PHONY: uninstall-man uninstall-man: uninstall-man1 .PHONY: uninstall-man1 uninstall-man1: - @rm -f ${DESTDIR}${MAN1DIR}/olang.1.gz + @rm -f ${DESTDIR}${MAN1DIR}/olc.1.gz .PHONY: uninstall-info uninstall-info: diff --git a/docs/info/contribution-guide.texi b/docs/info/contribution-guide.texi index 856d0f6..3d12048 100644 --- a/docs/info/contribution-guide.texi +++ b/docs/info/contribution-guide.texi @@ -22,7 +22,7 @@ merely three dependencies: @code{make}, @code{gcc} (version 11 or higher), and $ make @end example -If everything went well with the compilation, you should find a @code{olang} +If everything went well with the compilation, you should find a @code{olc} binary on the project root folder. As an optional step, you can install @code{texinfo}, @code{pandoc} and @@ -32,7 +32,7 @@ read @ref{Writing Documentation}. @subsection Testing There are two layers of tests @strong{integration} and @strong{unit}. The -integration test is going to execute the @code{olang} compiler and check if the +integration test is going to execute the @code{olc} compiler and check if the generated binary acts as expected. Unit tests will test C functions. To run all tests you can execute: @@ -53,7 +53,6 @@ the format section below for guidance on its application. @subsection Code Formatting Checking for format issues: - @example $ make format @end example diff --git a/docs/info/installation.texi b/docs/info/installation.texi index d61b0e9..6ee4a4d 100644 --- a/docs/info/installation.texi +++ b/docs/info/installation.texi @@ -4,8 +4,8 @@ This installation assumes you are running an unix like operation system and requires @code{make}, @code{makeinfo} and a @strong{c compiler} installed. -The following commands will compile the the code and install @code{olang} -binary, @code{man} pages and @code{info} docs into your system. +The following commands will compile the the code and install @code{olc} binary +(olang compiler), @code{man} pages and @code{info} docs into your system. @verbatim $ make diff --git a/docs/man/man1/olang.1 b/docs/man/man1/olc.1 similarity index 87% rename from docs/man/man1/olang.1 rename to docs/man/man1/olc.1 index fa6544f..5b35f05 100644 --- a/docs/man/man1/olang.1 +++ b/docs/man/man1/olc.1 @@ -1,21 +1,21 @@ -.\" Man page for olang +.\" Man page for olc .\" Contact ~johnnyrichard/olang-devel@lists.sr.ht to report issues -.TH man 1 "Feb 2024" "0.0" "olang man page" +.TH man 1 "Feb 2024" "0.0" "olc man page" .SH NAME -olang \- O programming language compiler +olc \- olang compiler .SH SYNOPSIS -olang source_file +olc source_file [ --dump-tokens ] [ --dump-ast ] [ [ -o output_file [ --save-temps ] [ --arch arch ] [ --sysroot dir] ] .SH DESCRIPTION -.B olang +.B olc is the official O programming language compiler, it is also a tool that contains utilities to help the language development. diff --git a/tests/integration/test.sh b/tests/integration/test.sh index 69cbeda..529f0f5 100755 --- a/tests/integration/test.sh +++ b/tests/integration/test.sh @@ -16,7 +16,7 @@ # Ignores variables been modified in a subshell # shellcheck disable=SC2030,SC2031 -OLANG_PATH="../../olang" +OLANG_PATH="../../olc" TEST_FILE="$1" TEST_TMP_FILES="$TEST_FILE.test" -- 2.46.0