]> git.xolatile.top Git - public-libhl.git/commitdiff
Something something build system
authorEmil <emilwilliams@tuta.io>
Sun, 27 Aug 2023 07:31:36 +0000 (01:31 -0600)
committerEmil <emilwilliams@tuta.io>
Sun, 27 Aug 2023 07:31:36 +0000 (01:31 -0600)
Makefile
chad.mk
config.mk
source/regex.c

index 72dd5b61f6eb0cad6e4104d7ee72ca69ad25ca46..c698c9548d3ed59540f5b5c8e34e5f3539a30bca 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ ${TARGET}: ${HDR} | ${OBJ}
 ${SRC} ${HDR}:
 
 install: ${PREFIX}
-       install -v -g ${USER} -o ${USER} -m 744 ${TARGET} ${PREFIX}/bin/
+       install -v -g ${USER} -o ${USER} -m 744 ${TARGET} ${PREFIX}/
 
 uninstall:
        -rm ${PREFIX}/bin/${TARGET}
diff --git a/chad.mk b/chad.mk
index fc51c38a5221c4b72c8b98a400c8b6d1f09ef4ed..c4ce45ab381731c906b62093a97bc26338983956 100644 (file)
--- a/chad.mk
+++ b/chad.mk
@@ -1,3 +1,5 @@
+#  - ARGS      : default flags to test the program with
+
 # Programs to check warnings for as defined by the chad standard
 
 ARGS:=${TARGET} < source/main.c
index 517dfe6d7a5750102dc0d9d9f0acc01f4217f103..0a3f5c1c79f7705b9d98f1ead81c35e1ce8d751e 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -1,9 +1,6 @@
-# Make script for Chad projects
-# This script depends on the following variables
 #  - TARGET    : output program name
-#  - ARGS      : default flags to fork ${OUT} with
 
-PREFIX:=/usr/bin
+TARGET:=hl
 
 CFLAGS:=-std=c99
 CPPFLAGS:=-Isyntax/ -D_GNU_SOURCE -D_FORTIFY_SOURCE=2
@@ -16,4 +13,6 @@ else
        CFLAGS += -O2 -flto=auto
 endif
 
-TARGET:=hl
+PREFIX:=/usr/bin
+
+USER=$(shell whoami)
index 6dea9eb93795f3330ca8eed763cfe3e4cfdd492c..2911af7a219db07d5e03e8a6ac975091791763ec 100644 (file)
@@ -444,7 +444,6 @@ int regex_free(regex_t * const regex) {
 // -----------------
 static bool catch_(const regex_t * const regex,
                          int     * const state) {
-
        for (size_t i = 0; i < regex->catch_table.element_count; i++){
                const offshoot_t * const offshoot = *(offshoot_t**)vector_get(&regex->catch_table, i);
                if (offshoot->in == *state) {
@@ -458,8 +457,7 @@ static bool catch_(const regex_t * const regex,
 static int regex_assert(const regex_t * const  regex,
                          const char    * const string,
                                int              state,
-                                                          int     *        width) {
-
+                               int     *        width) {
        for (const char * s = string; *s != '\00'; s++) {
                // delta
                for (size_t i = 0; i < regex->delta_table.element_count; i++) {
@@ -484,7 +482,6 @@ static int regex_assert(const regex_t * const  regex,
 
 int regex_match(      regex_t *        regex,
                 const char    * const string) {
-
        if (regex == NULL) {
                return false;
        }
@@ -498,7 +495,5 @@ int regex_match(      regex_t *        regex,
 
 bool regex_search(      regex_t *        regex,
                   const char    * const string) {
-
        return (bool)regex_match(regex, string, 0);
 }
-