From ecd4e81a7c0772411879906d6684abcef9247e24 Mon Sep 17 00:00:00 2001 From: Olaf Seibert Date: Mon, 9 Nov 2015 22:15:00 +0100 Subject: [PATCH] Fix Makefile and some unneeded #includes. make clean would first compile everything before cleaning. And building anything would make git-info.h too late. --- Makefile | 6 ++++++ mlb-rsx.c | 5 ----- object.c | 3 --- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 99e1b5b..a330a95 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,10 @@ $(DUMPOBJ_OBJS): Makefile git-info.h: ./make-git-info +# Bootstrap dependency on the git header file, which otherwise +# gets generated too late. +macro11.o: git-info.h + clean: -rm -f $(MACRO11_OBJS) $(DUMPOBJ_OBJS) macro11 dumpobj -rm -f *.d @@ -65,7 +69,9 @@ tests: macro11 argtests # Automatic dependency generation +ifneq ($(MAKECMDGOALS),clean) -include $(ALL_SRCS:.c=.d) +endif # Make .d files as side effect of compiling .c to .o %.d %.o: %.c diff --git a/mlb-rsx.c b/mlb-rsx.c index a6812b6..9e3545a 100644 --- a/mlb-rsx.c +++ b/mlb-rsx.c @@ -152,13 +152,8 @@ DAMAGE. #include #include "rad50.h" - #include "stream2.h" - #include "mlb.h" - -#include "macro11.h" - #include "util.h" #define BLOCKSIZE 512 diff --git a/object.c b/object.c index 0f6aafc..997cf26 100644 --- a/object.c +++ b/object.c @@ -45,11 +45,8 @@ DAMAGE. #include #include "rad50.h" - #include "object.h" -#include "macro11.h" - /* writerec writes "formatted binary records." Each is preceeded by any number of 0 bytes, begins with a 1,0 pair,