Skip to content

Commit

Permalink
use "export" to expose TOPDIR to all child make instead of passing it…
Browse files Browse the repository at this point in the history
… around every time
  • Loading branch information
protobits authored and xiaoxiang781216 committed Sep 16, 2020
1 parent 0eae2a1 commit 166242c
Show file tree
Hide file tree
Showing 31 changed files with 245 additions and 245 deletions.
4 changes: 2 additions & 2 deletions Documentation/components/nxgraphics/appendix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,10 @@ CONFIG_NXFONT_SANS23X27 for examaples:
genfontsources:
ifeq ($(CONFIG_NXFONT_SANS23X27),y)
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=1 EXTRAFLAGS=$(EXTRAFLAGS)
@$(MAKE) -C nxfonts -f Makefile.sources NXFONTS_FONTID=1 EXTRAFLAGS=$(EXTRAFLAGS)
endif
ifeq ($(CONFIG_NXFONT_MYFONT),y)
@$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=2 EXTRAFLAGS=$(EXTRAFLAGS)
@$(MAKE) -C nxfonts -f Makefile.sources NXFONTS_FONTID=2 EXTRAFLAGS=$(EXTRAFLAGS)
endif
6. ``nuttx/graphics/nxfonts/Make.defs``. Set the make variable
Expand Down
8 changes: 4 additions & 4 deletions arch/arm/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ $(KBIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board$(DELIM)libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT)
$(Q) echo "LD: nuttx"
Expand Down Expand Up @@ -196,7 +196,7 @@ endif

.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) $(patsubst %,--dep-path %,$(subst :, ,$(VPATH))) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
Expand All @@ -206,15 +206,15 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, $(KBIN))
$(call DELFILE, $(BIN))
$(call CLEAN)

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/avr/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx"
Expand All @@ -142,7 +142,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)

.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
Expand All @@ -152,14 +152,14 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, libarch$(LIBEXT))
$(call CLEAN)

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/hc/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
$(Q) echo "LD: nuttx"
Expand All @@ -157,7 +157,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)

.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
Expand All @@ -167,14 +167,14 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, libarch$(LIBEXT))
$(call CLEAN)

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/mips/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx"
Expand All @@ -140,7 +140,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)

.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
Expand All @@ -150,14 +150,14 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, libarch$(LIBEXT))
$(call CLEAN)

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/misoc/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
$(Q) $(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) $(EXTRA_LIBPATHS) \
Expand All @@ -143,7 +143,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)

.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
Expand All @@ -153,14 +153,14 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, libarch$(LIBEXT))
$(call CLEAN)

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/or1k/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ $(KBIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board$(DELIM)libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board$(DELIM)libboard$(LIBEXT)
$(Q) echo "LD: nuttx"
Expand Down Expand Up @@ -183,7 +183,7 @@ endif

.depend: Makefile chip$(DELIM)Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) $(patsubst %,--dep-path %,$(subst :, ,$(VPATH))) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
Expand All @@ -193,15 +193,15 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, $(KBIN))
$(call DELFILE, $(BIN))
$(call CLEAN)

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/renesas/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx"
Expand All @@ -151,7 +151,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)

.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@
Expand All @@ -160,14 +160,14 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, libarch$(LIBEXT))
$(call CLEAN)

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/risc-v/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ $(KBIN): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
$(Q) echo "LD: nuttx"
Expand Down Expand Up @@ -186,7 +186,7 @@ endif

.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) $(patsubst %,--dep-path %,$(subst :, ,$(VPATH))) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) > Make.dep
Expand All @@ -196,7 +196,7 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, $(KBIN))
$(call DELFILE, $(BIN))
Expand All @@ -205,7 +205,7 @@ endif

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/sim/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ libarch$(LIBEXT): $(NUTTXOBJS)
# that are not hardware-related.

board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

# A partially linked object containing only NuttX code (no interface to host OS)
# Change the names of most symbols that conflict with libc symbols.
Expand Down Expand Up @@ -318,7 +318,7 @@ export_startup: board/libboard$(LIBEXT) up_head.o $(HOSTOBJS)

.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config
$(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" depend ; \
$(MAKE) -C board depend ; \
fi
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(CFLAGS) -- $(ASRCS) $(CSRCS) >Make.dep
$(Q) $(MKDEP) $(DEPPATH) "$(CC)" -- $(HOSTCFLAGS) -- $(HOSTSRCS) >>Make.dep
Expand All @@ -328,7 +328,7 @@ depend: .depend

clean:
$(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \
$(MAKE) -C board clean ; \
fi
$(call DELFILE, nuttx.ld)
$(call DELFILE, nuttx.rel)
Expand All @@ -338,7 +338,7 @@ clean:

distclean: clean
$(Q) if [ -e board/Makefile ]; then \
$(MAKE) -C board TOPDIR="$(TOPDIR)" distclean ; \
$(MAKE) -C board distclean ; \
fi
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
8 changes: 4 additions & 4 deletions arch/x86/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ libarch$(LIBEXT): $(OBJS)
$(call ARCHIVE, $@, $(OBJS))

board/libboard$(LIBEXT):
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"
$(Q) $(MAKE) -C board libboard$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)"

nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT)
@echo "LD: nuttx$(EXEEXT)"
Expand All @@ -155,7 +155,7 @@ export_startup: board/libboard$(LIBEXT) $(STARTUP_OBJS)

.depend: Makefile chip/Make.defs $(SRCS) $(TOPDIR)$(DELIM).config
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" depend
$(Q) $(MAKE) -C board depend
endif
$(Q) $(MKDEP) --dep-path chip --dep-path common --dep-path $(ARCH_SUBDIR) \
"$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
Expand All @@ -165,14 +165,14 @@ depend: .depend

clean:
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" clean
$(Q) $(MAKE) -C board clean
endif
$(call DELFILE, libarch$(LIBEXT))
$(call CLEAN)

distclean: clean
ifeq ($(BOARDMAKE),y)
$(Q) $(MAKE) -C board TOPDIR="$(TOPDIR)" distclean
$(Q) $(MAKE) -C board distclean
endif
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
Expand Down
Loading

0 comments on commit 166242c

Please sign in to comment.