Something something build system
This commit is contained in:
parent
6fc917b7b7
commit
a245d25738
2
Makefile
2
Makefile
@ -19,7 +19,7 @@ ${TARGET}: ${HDR} | ${OBJ}
|
|||||||
${SRC} ${HDR}:
|
${SRC} ${HDR}:
|
||||||
|
|
||||||
install: ${PREFIX}
|
install: ${PREFIX}
|
||||||
install -v -g ${USER} -o ${USER} -m 744 ${TARGET} ${PREFIX}/bin/
|
install -v -g ${USER} -o ${USER} -m 744 ${TARGET} ${PREFIX}/
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
-rm ${PREFIX}/bin/${TARGET}
|
-rm ${PREFIX}/bin/${TARGET}
|
||||||
|
2
chad.mk
2
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
|
# Programs to check warnings for as defined by the chad standard
|
||||||
|
|
||||||
ARGS:=${TARGET} < source/main.c
|
ARGS:=${TARGET} < source/main.c
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
# Make script for Chad projects
|
|
||||||
# This script depends on the following variables
|
|
||||||
# - TARGET : output program name
|
# - TARGET : output program name
|
||||||
# - ARGS : default flags to fork ${OUT} with
|
|
||||||
|
|
||||||
PREFIX:=/usr/bin
|
TARGET:=hl
|
||||||
|
|
||||||
CFLAGS:=-std=c99
|
CFLAGS:=-std=c99
|
||||||
CPPFLAGS:=-Isyntax/ -D_GNU_SOURCE -D_FORTIFY_SOURCE=2
|
CPPFLAGS:=-Isyntax/ -D_GNU_SOURCE -D_FORTIFY_SOURCE=2
|
||||||
@ -16,4 +13,6 @@ else
|
|||||||
CFLAGS += -O2 -flto=auto
|
CFLAGS += -O2 -flto=auto
|
||||||
endif
|
endif
|
||||||
|
|
||||||
TARGET:=hl
|
PREFIX:=/usr/bin
|
||||||
|
|
||||||
|
USER=$(shell whoami)
|
||||||
|
@ -444,7 +444,6 @@ int regex_free(regex_t * const regex) {
|
|||||||
// -----------------
|
// -----------------
|
||||||
static bool catch_(const regex_t * const regex,
|
static bool catch_(const regex_t * const regex,
|
||||||
int * const state) {
|
int * const state) {
|
||||||
|
|
||||||
for (size_t i = 0; i < regex->catch_table.element_count; i++){
|
for (size_t i = 0; i < regex->catch_table.element_count; i++){
|
||||||
const offshoot_t * const offshoot = *(offshoot_t**)vector_get(®ex->catch_table, i);
|
const offshoot_t * const offshoot = *(offshoot_t**)vector_get(®ex->catch_table, i);
|
||||||
if (offshoot->in == *state) {
|
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,
|
static int regex_assert(const regex_t * const regex,
|
||||||
const char * const string,
|
const char * const string,
|
||||||
int state,
|
int state,
|
||||||
int * width) {
|
int * width) {
|
||||||
|
|
||||||
for (const char * s = string; *s != '\00'; s++) {
|
for (const char * s = string; *s != '\00'; s++) {
|
||||||
// delta
|
// delta
|
||||||
for (size_t i = 0; i < regex->delta_table.element_count; i++) {
|
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,
|
int regex_match( regex_t * regex,
|
||||||
const char * const string) {
|
const char * const string) {
|
||||||
|
|
||||||
if (regex == NULL) {
|
if (regex == NULL) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -498,7 +495,5 @@ int regex_match( regex_t * regex,
|
|||||||
|
|
||||||
bool regex_search( regex_t * regex,
|
bool regex_search( regex_t * regex,
|
||||||
const char * const string) {
|
const char * const string) {
|
||||||
|
|
||||||
return (bool)regex_match(regex, string, 0);
|
return (bool)regex_match(regex, string, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user