commit b3666b0cd16f15964e89bf4e1c5aaf03fdfcdfd3 from: Benjamin Stürz date: Thu Aug 15 21:24:00 2024 UTC autoconfiscate destruct commit - 159ecb97c7787c21d28467dfee69c0022098498e commit + b3666b0cd16f15964e89bf4e1c5aaf03fdfcdfd3 blob - d96f14a6ff0a107b45e7c5882d0eb7f045396c4c (mode 644) blob + /dev/null --- Makefile +++ /dev/null @@ -1,26 +0,0 @@ -YFLAGS += -d -CFLAGS += -Wall -Wextra -PREFIX = /usr/local -OBJ = parse.o lex.o gen.o main.o - -all: destruct - -run: destruct - ./destruct -H test.h -o test.c test.txt - cat test.h test.c - cc -c -o /dev/null test.c - -clean: - rm -f destruct destruct.inc y.tab.h test.[ch] *.o *.core - -install: destruct - mkdir -p ${DESTDIR}${PREFIX}/bin - cp -f destruct ${DESTDIR}${PREFIX}/bin/ - -destruct: destruct.inc ${OBJ} - ${CC} -o $@ ${OBJ} - -destruct.inc: destruct.h - sed "s/\$$/\\\\n/; s/$$(printf '\t')/\\\\t/g" < destruct.h | tr -d '\r\n' | sed 's/^/"/; s/$$/"/' > $@ - -lex.o: parse.o blob - /dev/null blob + 1510c801e721c840d08e90d9e8b68a37d83782e2 (mode 644) --- /dev/null +++ Makefile.am @@ -0,0 +1,13 @@ +BUILT_SOURCES = lex.c parse.h parse.c destruct.inc +AM_CFLAGS = -Wall -Wextra +AM_YFLAGS = -d +bin_PROGRAMS = destruct +destruct_SOURCES = lex.l parse.y gen.c main.c + +full-clean: distclean + rm -rf .deps autom4te.cache build-aux + rm -f Makefile.in aclocal.m4 config.h.in configure + rm -f lex.c parse.c parse.h + +destruct.inc: destruct.h + ${SED} "s/\$$/\\\\n/; s/$$(printf '\t')/\\\\t/g" < destruct.h | tr -d '\r\n' | ${SED} 's/^/"/; s/$$/"/' > $@ blob - /dev/null blob + 68f4a174b46edae62109464fab50034272627121 (mode 755) --- /dev/null +++ autogen.sh @@ -0,0 +1,2 @@ +#!/bin/sh +autoreconf -i blob - /dev/null blob + e62e7487ba1c7308967eda31daf3a0e557e542a5 (mode 644) --- /dev/null +++ configure.ac @@ -0,0 +1,32 @@ +AC_PREREQ([2.72]) +AC_INIT([destruct], [0.5], [benni@stuerz.xyz]) + +AC_CONFIG_AUX_DIR([build-aux]) +AM_INIT_AUTOMAKE([1.16 foreign -Wall]) +AC_CONFIG_SRCDIR([main.c]) +AC_CONFIG_HEADERS([config.h]) + +# Checks for programs. +AC_PROG_CC +AC_PROG_LEX([noyywrap]) +AC_PROG_YACC +AC_PROG_SED + +# Checks for libraries. + +# Checks for header files. +AC_CHECK_INCLUDES_DEFAULT +AC_CHECK_HEADERS([ctype.h err.h fcntl.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_TYPE_SIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T + +# Checks for library functions. +AC_CHECK_FUNCS([err errx getopt strchr strdup strrchr strtol]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT blob - 4628ff93e7f7753e161d942776e0131e286338e3 blob + 4d9b3b282543264fc1123a595749a5673ebad0d0 --- lex.l +++ lex.l @@ -2,7 +2,7 @@ #include #include #include -#include "y.tab.h" +#include "parse.h" void yyerror (const char *, ...); %}