From 6fded1a8e19ef32ed7a427e2bd7b2f133c76aa07 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Thu, 12 May 2016 14:17:40 -0400 Subject: [PATCH] Simplify some Makefiles --- Application.mk | 4 ++-- canutils/uavcan/Makefile | 34 +++++++++++++++---------------- interpreters/micropython/Makefile | 12 +++++------ 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Application.mk b/Application.mk index cd9d247c2..5b7a4e5ad 100644 --- a/Application.mk +++ b/Application.mk @@ -90,13 +90,13 @@ endif .built: $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) - $(Q) touch .built + $(Q) touch $@ ifeq ($(CONFIG_BUILD_KERNEL),y) $(BIN_DIR)$(DELIM)$(PROGNAME): $(OBJS) $(MAINOBJ) @echo "LD: $(PROGNAME)" $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) - $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) install: $(BIN_DIR)$(DELIM)$(PROGNAME) else diff --git a/canutils/uavcan/Makefile b/canutils/uavcan/Makefile index 9ad5f4216..f561c5e0d 100644 --- a/canutils/uavcan/Makefile +++ b/canutils/uavcan/Makefile @@ -1,7 +1,7 @@ ############################################################################ # apps/canutils/uavcan/Makefile # -# Copyright (C) 2015 Omni Hoverboards Inc. All rights reserved. +# Copyright (C) 2015-2016 Omni Hoverboards Inc. All rights reserved. # Author: Paul Alexander Patience # # Redistribution and use in source and binary forms, with or without @@ -177,31 +177,31 @@ all: .built .PHONY: clean depend distclean $(LIBUAVCAN_PACKNAME): - @echo "Downloading: $(LIBUAVCAN_PACKNAME)" - $(Q) $(WGET) -O $(LIBUAVCAN_PACKNAME) $(LIBUAVCAN_URL)$(DELIM)$(LIBUAVCAN_VERSION)$(PACKEXT) + @echo "Downloading: $@" + $(Q) $(WGET) -O $@ $(LIBUAVCAN_URL)$(DELIM)$(LIBUAVCAN_VERSION)$(PACKEXT) $(LIBUAVCAN_UNPACKNAME): $(LIBUAVCAN_PACKNAME) - @echo "Unpacking: $(LIBUAVCAN_PACKNAME) -> $(LIBUAVCAN_UNPACKNAME)" - $(Q) $(UNPACK) $(LIBUAVCAN_PACKNAME) - $(Q) touch $(LIBUAVCAN_UNPACKNAME) + @echo "Unpacking: $< -> $@" + $(Q) $(UNPACK) $< + $(Q) touch $@ $(DSDL_PACKNAME): - @echo "Downloading: $(DSDL_PACKNAME)" - $(Q) $(WGET) -O $(DSDL_PACKNAME) $(DSDL_URL)$(DELIM)$(DSDL_VERSION)$(PACKEXT) + @echo "Downloading: $@" + $(Q) $(WGET) -O $@ $(DSDL_URL)$(DELIM)$(DSDL_VERSION)$(PACKEXT) $(DSDL_UNPACKNAME): $(DSDL_PACKNAME) - @echo "Unpacking: $(DSDL_PACKNAME) -> $(DSDL_UNPACKNAME)" - $(Q) $(UNPACK) $(DSDL_PACKNAME) - $(Q) touch $(DSDL_UNPACKNAME) + @echo "Unpacking: $< -> $@" + $(Q) $(UNPACK) $< + $(Q) touch $@ $(PYUAVCAN_PACKNAME): - @echo "Downloading: $(PYUAVCAN_PACKNAME)" - $(Q) $(WGET) -O $(PYUAVCAN_PACKNAME) $(PYUAVCAN_URL)$(DELIM)$(PYUAVCAN_VERSION)$(PACKEXT) + @echo "Downloading: $@" + $(Q) $(WGET) -O $@ $(PYUAVCAN_URL)$(DELIM)$(PYUAVCAN_VERSION)$(PACKEXT) $(PYUAVCAN_UNPACKNAME): $(PYUAVCAN_PACKNAME) - @echo "Unpacking: $(PYUAVCAN_PACKNAME) -> $(PYUAVCAN_UNPACKNAME)" - $(Q) $(UNPACK) $(PYUAVCAN_PACKNAME) - $(Q) touch $(PYUAVCAN_UNPACKNAME) + @echo "Unpacking: $< -> $@" + $(Q) $(UNPACK) $< + $(Q) touch $@ libuavcan: $(LIBUAVCAN_UNPACKNAME) $(DSDL_UNPACKNAME) $(PYUAVCAN_UNPACKNAME) $(Q) cp -R $(LIBUAVCAN_UNPACKNAME) libuavcan @@ -226,7 +226,7 @@ $(CXXOBJS): %$(OBJEXT): %$(CXXEXT) .built: $(CXXOBJS) $(call ARCHIVE, $(BIN), $(CXXOBJS)) - $(Q) touch .built + $(Q) touch $@ install: diff --git a/interpreters/micropython/Makefile b/interpreters/micropython/Makefile index fec76d913..61c5d010d 100644 --- a/interpreters/micropython/Makefile +++ b/interpreters/micropython/Makefile @@ -55,7 +55,7 @@ MICROPYTHON_UNPACKNAME = micropython-$(MICROPYTHON_VERSION) UNPACK ?= tar -zxf MICROPYTHON_UNPACKDIR = $(WD)/$(MICROPYTHON_UNPACKNAME) -MICROPTHYON_SRCDIR = $(MICROPYTHON_UNPACKDIR)/py +MICROPYTHON_SRCDIR = $(MICROPYTHON_UNPACKDIR)/py # Get the Micro Python build environment. mkenv.mk has these dependencies # @@ -63,7 +63,7 @@ MICROPTHYON_SRCDIR = $(MICROPYTHON_UNPACKDIR)/py # CROSS_COMPILE - Tool prefix (same as CROSSDEV in NuttX) CROSS_COMPILE ?= $(CROSSDEV) --include $(MICROPTHYON_SRCDIR)/mkenv.mk +-include $(MICROPYTHON_SRCDIR)/mkenv.mk # qstr definitions (must come before including py.mk) @@ -71,7 +71,7 @@ QSTR_DEFS = qstrdefsport.h # Include py core make definitions --include $(MICROPTHYON_SRCDIR)/py.mk +-include $(MICROPYTHON_SRCDIR)/py.mk # c99 is needed for Micro Python @@ -139,13 +139,13 @@ $(MICROPYTHON_UNPACKNAME): $(MICROPYTHON_TARBALL) .built: $(MICROPYTHON_UNPACKNAME) $(OBJ) $(call ARCHIVE, $(BIN), $(OBJ)) - @touch .built + @touch $@ ifeq ($(CONFIG_BUILD_KERNEL),y) $(BIN_DIR)$(DELIM)$(PROGNAME): $(MICROPYTHON_UNPACKNAME) $(OBJ) $(MAINOBJ) @echo "LD: $(PROGNAME)" $(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $(INSTALL_DIR)$(DELIM)$(PROGNAME) $(ARCHCRT0OBJ) $(MAINOBJ) $(LDLIBS) - $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) + $(Q) $(NM) -u $(INSTALL_DIR)$(DELIM)$(PROGNAME) install: $(BIN_DIR)$(DELIM)$(PROGNAME) else @@ -179,5 +179,5 @@ distclean: clean $(call DELFILE, .downloaded) $(call DELFILE, $(MICROPYTHON_TARBALL)) --include $(MICROPTHYON_SRCDIR)/mkrules.mk +-include $(MICROPYTHON_SRCDIR)/mkrules.mk -include Make.dep