From b6c7e4b143d96ff9f84ccb22d83b1e15ab084250 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 31 Mar 2017 22:29:39 +1100 Subject: [PATCH] all: Use full path name when including mp-readline/timeutils/netutils. This follows the pattern of how all other headers are now included, and makes it explicit where the header file comes from. This patch also removes -I options from Makefile's that specify the mp-readline/timeutils/ netutils directories, which are no longer needed. --- cc3200/application.mk | 3 --- cc3200/ftp/ftp.c | 2 +- cc3200/mods/moduos.c | 2 +- cc3200/mods/modusocket.c | 2 +- cc3200/mods/modutime.c | 2 +- cc3200/mods/pybrtc.c | 2 +- cc3200/mptask.c | 2 +- esp8266/Makefile | 3 --- esp8266/fatfs_port.c | 2 +- esp8266/machine_rtc.c | 2 +- esp8266/modnetwork.c | 2 +- esp8266/modutime.c | 2 +- examples/embedding/Makefile.upylib | 1 - extmod/modlwip.c | 2 +- lib/mp-readline/readline.c | 2 +- lib/netutils/netutils.c | 2 +- lib/timeutils/timeutils.c | 2 +- minimal/Makefile | 1 - pic16bit/Makefile | 1 - pic16bit/main.c | 2 +- py/py.mk | 3 --- stmhal/Makefile | 3 --- stmhal/input.c | 2 +- stmhal/main.c | 2 +- stmhal/modnwcc3k.c | 2 +- stmhal/modnwwiznet5k.c | 2 +- stmhal/moduos.c | 2 +- stmhal/modusocket.c | 2 +- stmhal/modutime.c | 2 +- teensy/Makefile | 1 - teensy/main.c | 2 +- unix/Makefile | 1 - 32 files changed, 23 insertions(+), 40 deletions(-) diff --git a/cc3200/application.mk b/cc3200/application.mk index b15dbde7f6..5d25424e15 100644 --- a/cc3200/application.mk +++ b/cc3200/application.mk @@ -18,9 +18,6 @@ APP_INC += -Iutil APP_INC += -Ibootmgr APP_INC += -I$(BUILD) APP_INC += -I$(BUILD)/genhdr -APP_INC += -I../lib/mp-readline -APP_INC += -I../lib/netutils -APP_INC += -I../lib/timeutils APP_INC += -I../stmhal APP_CPPDEFINES = -Dgcc -DTARGET_IS_CC3200 -DSL_FULL -DUSE_FREERTOS diff --git a/cc3200/ftp/ftp.c b/cc3200/ftp/ftp.c index 22035d6b3b..1febe291f9 100644 --- a/cc3200/ftp/ftp.c +++ b/cc3200/ftp/ftp.c @@ -29,6 +29,7 @@ #include "py/mpstate.h" #include "py/obj.h" +#include "lib/timeutils/timeutils.h" #include "lib/oofatfs/ff.h" #include "extmod/vfs.h" #include "extmod/vfs_fat.h" @@ -48,7 +49,6 @@ #include "fifo.h" #include "socketfifo.h" #include "updater.h" -#include "timeutils.h" #include "moduos.h" /****************************************************************************** diff --git a/cc3200/mods/moduos.c b/cc3200/mods/moduos.c index 5523c887f2..add10ec6c8 100644 --- a/cc3200/mods/moduos.c +++ b/cc3200/mods/moduos.c @@ -33,6 +33,7 @@ #include "py/objtuple.h" #include "py/objstr.h" #include "py/runtime.h" +#include "lib/timeutils/timeutils.h" #include "lib/oofatfs/ff.h" #include "lib/oofatfs/diskio.h" #include "genhdr/mpversion.h" @@ -43,7 +44,6 @@ #include "random.h" #include "mpexception.h" #include "version.h" -#include "timeutils.h" #include "pybsd.h" #include "pybuart.h" diff --git a/cc3200/mods/modusocket.c b/cc3200/mods/modusocket.c index 4e2da67372..ca28bf7ba9 100644 --- a/cc3200/mods/modusocket.c +++ b/cc3200/mods/modusocket.c @@ -34,7 +34,7 @@ #include "py/objstr.h" #include "py/runtime.h" #include "py/stream.h" -#include "netutils.h" +#include "lib/netutils/netutils.h" #include "modnetwork.h" #include "modusocket.h" #include "mpexception.h" diff --git a/cc3200/mods/modutime.c b/cc3200/mods/modutime.c index 8e3c71402a..48fde67e7e 100644 --- a/cc3200/mods/modutime.c +++ b/cc3200/mods/modutime.c @@ -33,8 +33,8 @@ #include "py/obj.h" #include "py/smallint.h" #include "py/mphal.h" +#include "lib/timeutils/timeutils.h" #include "extmod/utime_mphal.h" -#include "timeutils.h" #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "inc/hw_memmap.h" diff --git a/cc3200/mods/pybrtc.c b/cc3200/mods/pybrtc.c index 13d7a49cba..134bd440e7 100644 --- a/cc3200/mods/pybrtc.c +++ b/cc3200/mods/pybrtc.c @@ -29,6 +29,7 @@ #include "py/obj.h" #include "py/runtime.h" #include "py/mperrno.h" +#include "lib/timeutils/timeutils.h" #include "inc/hw_types.h" #include "inc/hw_ints.h" #include "inc/hw_memmap.h" @@ -37,7 +38,6 @@ #include "pybrtc.h" #include "mpirq.h" #include "pybsleep.h" -#include "timeutils.h" #include "simplelink.h" #include "modnetwork.h" #include "modwlan.h" diff --git a/cc3200/mptask.c b/cc3200/mptask.c index 3c49a56035..d446711a29 100644 --- a/cc3200/mptask.c +++ b/cc3200/mptask.c @@ -33,6 +33,7 @@ #include "py/runtime.h" #include "py/gc.h" #include "py/mphal.h" +#include "lib/mp-readline/readline.h" #include "lib/oofatfs/ff.h" #include "lib/oofatfs/diskio.h" #include "extmod/vfs.h" @@ -51,7 +52,6 @@ #include "lib/utils/pyexec.h" #include "gccollect.h" #include "gchelper.h" -#include "readline.h" #include "mperror.h" #include "simplelink.h" #include "modnetwork.h" diff --git a/esp8266/Makefile b/esp8266/Makefile index 28dbf08a64..a3da9d3986 100644 --- a/esp8266/Makefile +++ b/esp8266/Makefile @@ -25,9 +25,6 @@ ESP_SDK = $(shell $(CC) -print-sysroot)/usr INC += -I. INC += -I.. INC += -I../stmhal -INC += -I../lib/mp-readline -INC += -I../lib/netutils -INC += -I../lib/timeutils INC += -I$(BUILD) INC += -I$(ESP_SDK)/include diff --git a/esp8266/fatfs_port.c b/esp8266/fatfs_port.c index 20c3235d4d..02384f6055 100644 --- a/esp8266/fatfs_port.c +++ b/esp8266/fatfs_port.c @@ -25,8 +25,8 @@ */ #include "py/obj.h" +#include "lib/timeutils/timeutils.h" #include "lib/oofatfs/ff.h" -#include "timeutils.h" #include "modmachine.h" DWORD get_fattime(void) { diff --git a/esp8266/machine_rtc.c b/esp8266/machine_rtc.c index 8c1fe0779c..019b705ba2 100644 --- a/esp8266/machine_rtc.c +++ b/esp8266/machine_rtc.c @@ -30,7 +30,7 @@ #include "py/nlr.h" #include "py/obj.h" #include "py/runtime.h" -#include "timeutils.h" +#include "lib/timeutils/timeutils.h" #include "user_interface.h" #include "modmachine.h" diff --git a/esp8266/modnetwork.c b/esp8266/modnetwork.c index 762717b354..627655b369 100644 --- a/esp8266/modnetwork.c +++ b/esp8266/modnetwork.c @@ -32,7 +32,7 @@ #include "py/objlist.h" #include "py/runtime.h" #include "py/mphal.h" -#include "netutils.h" +#include "lib/netutils/netutils.h" #include "queue.h" #include "user_interface.h" #include "espconn.h" diff --git a/esp8266/modutime.c b/esp8266/modutime.c index 117720e6f6..bdeb3bb453 100644 --- a/esp8266/modutime.c +++ b/esp8266/modutime.c @@ -34,8 +34,8 @@ #include "py/runtime.h" #include "py/mphal.h" #include "py/smallint.h" +#include "lib/timeutils/timeutils.h" #include "modmachine.h" -#include "timeutils.h" #include "user_interface.h" #include "extmod/utime_mphal.h" diff --git a/examples/embedding/Makefile.upylib b/examples/embedding/Makefile.upylib index 8b506e95e7..873c0fd344 100644 --- a/examples/embedding/Makefile.upylib +++ b/examples/embedding/Makefile.upylib @@ -14,7 +14,6 @@ INC += -I. INC += -I.. INC += -I$(MPTOP) INC += -I$(MPTOP)/unix -#INC += -I../lib/timeutils INC += -I$(BUILD) # compiler settings diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 5709413de8..fffabb98ae 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -36,7 +36,7 @@ #include "py/mperrno.h" #include "py/mphal.h" -#include "netutils.h" +#include "lib/netutils/netutils.h" #include "lwip/init.h" #include "lwip/timers.h" diff --git a/lib/mp-readline/readline.c b/lib/mp-readline/readline.c index cbb99cc94c..4b98751367 100644 --- a/lib/mp-readline/readline.c +++ b/lib/mp-readline/readline.c @@ -31,7 +31,7 @@ #include "py/mpstate.h" #include "py/repl.h" #include "py/mphal.h" -#include "readline.h" +#include "lib/mp-readline/readline.h" #if 0 // print debugging info #define DEBUG_PRINT (1) diff --git a/lib/netutils/netutils.c b/lib/netutils/netutils.c index 3a4c600dca..a2ea31cf38 100644 --- a/lib/netutils/netutils.c +++ b/lib/netutils/netutils.c @@ -31,7 +31,7 @@ #include "py/obj.h" #include "py/nlr.h" -#include "netutils.h" +#include "lib/netutils/netutils.h" // Takes an array with a raw IPv4 address and returns something like '192.168.0.1'. mp_obj_t netutils_format_ipv4_addr(uint8_t *ip, netutils_endian_t endian) { diff --git a/lib/timeutils/timeutils.c b/lib/timeutils/timeutils.c index 19d3ddbdd3..0af39a2958 100644 --- a/lib/timeutils/timeutils.c +++ b/lib/timeutils/timeutils.c @@ -27,7 +27,7 @@ #include "py/obj.h" -#include "timeutils.h" +#include "lib/timeutils/timeutils.h" // LEAPOCH corresponds to 2000-03-01, which is a mod-400 year, immediately // after Feb 29. We calculate seconds as a signed integer relative to that. diff --git a/minimal/Makefile b/minimal/Makefile index 3b446beae7..d615157970 100644 --- a/minimal/Makefile +++ b/minimal/Makefile @@ -14,7 +14,6 @@ endif INC += -I. INC += -I.. -INC += -I../lib/mp-readline INC += -I../stmhal INC += -I$(BUILD) diff --git a/pic16bit/Makefile b/pic16bit/Makefile index add9a8495c..8c0c1c999e 100644 --- a/pic16bit/Makefile +++ b/pic16bit/Makefile @@ -14,7 +14,6 @@ PART = 33FJ256GP506 INC += -I. INC += -I.. -INC += -I../lib/mp-readline INC += -I../stmhal INC += -I$(BUILD) INC += -I$(XC16)/include diff --git a/pic16bit/main.c b/pic16bit/main.c index f2a9debab1..7de790069b 100644 --- a/pic16bit/main.c +++ b/pic16bit/main.c @@ -35,7 +35,7 @@ #include "py/mphal.h" #include "py/mperrno.h" #include "lib/utils/pyexec.h" -#include "readline.h" +#include "lib/mp-readline/readline.h" #include "board.h" #include "modpyb.h" diff --git a/py/py.mk b/py/py.mk index 37bb5d023e..5ff1fd6a6c 100644 --- a/py/py.mk +++ b/py/py.mk @@ -16,9 +16,6 @@ endif # some code is performance bottleneck and compiled with other optimization options CSUPEROPT = -O3 -INC += -I../lib -INC += -I../lib/netutils - # this sets the config file for FatFs CFLAGS_MOD += -DFFCONF_H=\"lib/oofatfs/ffconf.h\" diff --git a/stmhal/Makefile b/stmhal/Makefile index 51aa07f3c9..09643be94a 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -47,9 +47,6 @@ INC += -I$(CMSIS_DIR)/ INC += -I$(HAL_DIR)/inc INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/inc #INC += -I$(USBHOST_DIR) -INC += -I../lib/mp-readline -INC += -I../lib/netutils -INC += -I../lib/timeutils CFLAGS_CORTEX_M = -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion CFLAGS_MCU_f4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_F4 diff --git a/stmhal/input.c b/stmhal/input.c index 07e7ba35ca..c78525cc91 100644 --- a/stmhal/input.c +++ b/stmhal/input.c @@ -26,7 +26,7 @@ #include "py/nlr.h" #include "py/obj.h" -#include "readline.h" +#include "lib/mp-readline/readline.h" STATIC mp_obj_t mp_builtin_input(uint n_args, const mp_obj_t *args) { if (n_args == 1) { diff --git a/stmhal/main.c b/stmhal/main.c index 8d076a08b1..566c2db07f 100644 --- a/stmhal/main.c +++ b/stmhal/main.c @@ -31,6 +31,7 @@ #include "py/stackctrl.h" #include "py/gc.h" #include "py/mphal.h" +#include "lib/mp-readline/readline.h" #include "lib/utils/pyexec.h" #include "lib/oofatfs/ff.h" #include "extmod/vfs.h" @@ -40,7 +41,6 @@ #include "pendsv.h" #include "pybthread.h" #include "gccollect.h" -#include "readline.h" #include "modmachine.h" #include "i2c.h" #include "spi.h" diff --git a/stmhal/modnwcc3k.c b/stmhal/modnwcc3k.c index ae403cacd6..26c6cd48c6 100644 --- a/stmhal/modnwcc3k.c +++ b/stmhal/modnwcc3k.c @@ -37,7 +37,7 @@ #include "py/runtime.h" #include "py/mperrno.h" #include "py/mphal.h" -#include "netutils.h" +#include "lib/netutils/netutils.h" #include "modnetwork.h" #include "pin.h" #include "genhdr/pins.h" diff --git a/stmhal/modnwwiznet5k.c b/stmhal/modnwwiznet5k.c index e3d5c6370c..b32f169138 100644 --- a/stmhal/modnwwiznet5k.c +++ b/stmhal/modnwwiznet5k.c @@ -33,7 +33,7 @@ #include "py/runtime.h" #include "py/mperrno.h" #include "py/mphal.h" -#include "netutils.h" +#include "lib/netutils/netutils.h" #include "modnetwork.h" #include "pin.h" #include "genhdr/pins.h" diff --git a/stmhal/moduos.c b/stmhal/moduos.c index 0af682612e..745c0d5d7a 100644 --- a/stmhal/moduos.c +++ b/stmhal/moduos.c @@ -31,12 +31,12 @@ #include "py/runtime.h" #include "py/objtuple.h" #include "py/objstr.h" +#include "lib/timeutils/timeutils.h" #include "lib/oofatfs/ff.h" #include "lib/oofatfs/diskio.h" #include "extmod/vfs.h" #include "extmod/vfs_fat.h" #include "genhdr/mpversion.h" -#include "timeutils.h" #include "rng.h" #include "uart.h" #include "portmodules.h" diff --git a/stmhal/modusocket.c b/stmhal/modusocket.c index d066501d02..fd60c5ad43 100644 --- a/stmhal/modusocket.c +++ b/stmhal/modusocket.c @@ -32,7 +32,7 @@ #include "py/objlist.h" #include "py/runtime.h" #include "py/mperrno.h" -#include "netutils.h" +#include "lib/netutils/netutils.h" #include "modnetwork.h" #if MICROPY_PY_USOCKET diff --git a/stmhal/modutime.c b/stmhal/modutime.c index 2c72450803..97af35c491 100644 --- a/stmhal/modutime.c +++ b/stmhal/modutime.c @@ -31,9 +31,9 @@ #include "py/nlr.h" #include "py/smallint.h" #include "py/obj.h" +#include "lib/timeutils/timeutils.h" #include "extmod/utime_mphal.h" #include "systick.h" -#include "timeutils.h" #include "portmodules.h" #include "rtc.h" diff --git a/teensy/Makefile b/teensy/Makefile index e613b8f271..9f52cc3c76 100644 --- a/teensy/Makefile +++ b/teensy/Makefile @@ -32,7 +32,6 @@ CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mcpu=cortex-m4 -msoft-float -mfloat INC += -I. INC += -I.. INC += -I../stmhal -INC += -I../lib/mp-readline INC += -I$(BUILD) INC += -Icore diff --git a/teensy/main.c b/teensy/main.c index d62ae3bdb7..41bbeb5d93 100644 --- a/teensy/main.c +++ b/teensy/main.c @@ -10,7 +10,7 @@ #include "py/mphal.h" #include "gccollect.h" #include "lib/utils/pyexec.h" -#include "readline.h" +#include "lib/mp-readline/readline.h" #include "lexermemzip.h" #include "Arduino.h" diff --git a/unix/Makefile b/unix/Makefile index f28a4bcae9..5469853065 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -17,7 +17,6 @@ include ../py/py.mk INC += -I. INC += -I.. -INC += -I../lib/timeutils INC += -I$(BUILD) # compiler settings