From 2ca3405ef41541040c45c6cf8338dfa8ce0ce9ee Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 28 Jan 2019 20:43:42 -0500 Subject: correctly identify the difference between structs, unions, and functions --- Makefile | 10 ---------- mk.sh | 10 +++++----- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 6da31dff..324c88a3 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,6 @@ libc_OBJS = $(OBJDIR)/libc.o $(OBJDIR)/x86-64.o \ $(OBJDIR)/toupper.o \ $(OBJDIR)/localeconv.o \ $(OBJDIR)/setlocale.o \ - $(OBJDIR)/struct_lconv.o \ $(OBJDIR)/longjmp.o \ $(OBJDIR)/setjmp.o \ $(OBJDIR)/raise.o \ @@ -127,7 +126,6 @@ libc_OBJS = $(OBJDIR)/libc.o $(OBJDIR)/x86-64.o \ $(OBJDIR)/localtime.o \ $(OBJDIR)/mktime.o \ $(OBJDIR)/strftime.o \ - $(OBJDIR)/struct_tm.o \ $(OBJDIR)/time.o libc.a: $(libc_OBJS) @@ -664,14 +662,6 @@ $(OBJDIR)/strtoul.o: std/9899-1990/stdlib/strtoul.c $(INCDIR)/stdlib.h -@mkdir -p $(OBJDIR) $(CC) $(CFLAGS) -c std/9899-1990/stdlib/strtoul.c -o $@ -$(OBJDIR)/struct_lconv.o: std/9899-1990/locale/struct_lconv.c $(INCDIR)/locale.h - -@mkdir -p $(OBJDIR) - $(CC) $(CFLAGS) -c std/9899-1990/locale/struct_lconv.c -o $@ - -$(OBJDIR)/struct_tm.o: std/9899-1990/time/struct_tm.c $(INCDIR)/time.h - -@mkdir -p $(OBJDIR) - $(CC) $(CFLAGS) -c std/9899-1990/time/struct_tm.c -o $@ - $(OBJDIR)/strxfrm.o: std/9899-1990/string/strxfrm.c $(INCDIR)/string.h -@mkdir -p $(OBJDIR) $(CC) $(CFLAGS) -c std/9899-1990/string/strxfrm.c -o $@ diff --git a/mk.sh b/mk.sh index c30ad16f..04c2e2ce 100644 --- a/mk.sh +++ b/mk.sh @@ -5,15 +5,15 @@ classify_source () { if grep -q "^REFERENCE(" $1; then echo REFERENCE - elif grep -q "define ${NAME}[ (]" $1; then + elif grep -q "^#define ${NAME}[ (]" $1; then echo MACRO - elif grep -q "typedef.* ${NAME}.*;" $1; then + elif grep -q "^typedef.* ${NAME}.*;" $1; then echo TYPE - elif grep -q "typedef.*{$" $1; then + elif grep -q "^typedef.*{$" $1; then echo TYPE_LONG - elif grep -q "struct.*{" $1; then + elif grep -q "^struct.*{" $1; then echo STRUCT - elif grep -q "union.*{" $1; then + elif grep -q "^union.*{" $1; then echo UNION elif grep -q "^[A-Za-z_].* ${NAME};" $1; then echo EXTERN -- cgit v1.2.1