From: Bart Van Assche Date: Mon, 6 Jan 2020 02:16:20 +0000 (-0800) Subject: Makefile: Avoid duplicating code X-Git-Tag: fio-3.18~18^2~11 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e142f231790f6c14358f560fe385b07c66f8f201;p=fio.git Makefile: Avoid duplicating code Use the default compilation rule for building init.o instead of duplicating it. Signed-off-by: Bart Van Assche --- diff --git a/Makefile b/Makefile index dd26afca..271269f9 100644 --- a/Makefile +++ b/Makefile @@ -426,19 +426,6 @@ parse.o: lex.yy.o y.tab.o endif init.o: init.c FIO-VERSION-FILE - @mkdir -p $(dir $@) - $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $< - @$(CC) -MM $(CFLAGS) $(CPPFLAGS) $(SRCDIR)/$*.c > $*.d - @mv -f $*.d $*.d.tmp - @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d -ifeq ($(CONFIG_TARGET_OS), NetBSD) - @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | tr -cs "[:graph:]" "\n" | \ - sed -e 's/^ *//' -e '/^$$/ d' -e 's/$$/:/' >> $*.d -else - @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -w 1 | \ - sed -e 's/^ *//' -e 's/$$/:/' >> $*.d -endif - @rm -f $*.d.tmp gcompat.o: gcompat.c gcompat.h $(QUIET_CC)$(CC) $(CFLAGS) $(GTK_CFLAGS) $(CPPFLAGS) -c $<