[dpdk-dev] [PATCHv4 4/5] Makefile: Do post processing on objects that register a driver
Neil Horman
nhorman at tuxdriver.com
Wed May 25 19:40:51 CEST 2016
On Wed, May 25, 2016 at 07:08:19PM +0200, Thomas Monjalon wrote:
> 2016-05-24 15:41, Neil Horman:
> > --- a/mk/internal/rte.compile-pre.mk
> > +++ b/mk/internal/rte.compile-pre.mk
> > @@ -80,7 +80,8 @@ C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
> > C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)"," HOSTCC $(@)")
> > else
> > C_TO_O = $(CC) -Wp,-MD,$(call obj2dep,$(@)).tmp $(CFLAGS) \
> > - $(CFLAGS_$(@)) $(EXTRA_CFLAGS) -o $@ -c $<
> > + $(CFLAGS_$(@)) $(EXTRA_CFLAGS) -o $@ -c $<
> > +
>
> whitespace change?
>
Looks like, I'll remove it
> > C_TO_O_STR = $(subst ','\'',$(C_TO_O)) #'# fix syntax highlight
> > C_TO_O_DISP = $(if $(V),"$(C_TO_O_STR)"," CC $(@)")
> > endif
> > @@ -88,10 +89,26 @@ C_TO_O_CMD = 'cmd_$@ = $(C_TO_O_STR)'
> > C_TO_O_DO = @set -e; \
> > echo $(C_TO_O_DISP); \
> > $(C_TO_O) && \
> > + sh -c "grep -q \"PMD_REGISTER_DRIVER(.*)\" $<; \
> > + if [ \$$? -eq 0 ]; \
> > + then \
>
> It is preferred to keep "then" at the end of the previous line.
Very well.
>
> > + echo MODGEN $@; \
> > + OBJF=`readlink -f $@`; \
> > + ${RTE_OUTPUT}/buildtools/pmdinfogen \$$OBJF \$$OBJF.mod.c; \
>
> Maybe .pmd.c would be more appropriate than .mod.c?
fine
> What means mod/MODGEN/MODBUILD?
GENerate Module information & BUILD module information.
>
> > + if [ \$$? -eq 0 ]; \
> > + then \
> > + echo MODBUILD $@; \
> > + $(CC) -c -o \$$OBJF.mod.o \$$OBJF.mod.c; \
> > + $(CROSS)ld -r -o \$$OBJF.o \$$OBJF.mod.o \$$OBJF; \
> > + mv -f \$$OBJF.o \$$OBJF; \
> > + fi; \
> > + fi; \
> > + true" && \
>
> Why "true"?
Debugging statement, I'll remove it.
>
> It deserves to be in a shell script, at least to ease testing.
What do you mean by "it" and why would it be easier to test in a shell script?
>
>
More information about the dev
mailing list