diff options
author | Jakob Kaivo <jkk@ung.org> | 2019-01-28 20:43:42 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2019-01-28 20:43:42 -0500 |
commit | 2ca3405ef41541040c45c6cf8338dfa8ce0ce9ee (patch) | |
tree | 3be4bd13499d1014d906c85e26bad16349cef8c7 | |
parent | e38d9cd6d1f8beafa1e42001f24fcfb7d2fa448a (diff) |
correctly identify the difference between structs, unions, and functions
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | mk.sh | 10 |
2 files changed, 5 insertions, 15 deletions
@@ -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 $@ @@ -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 |