Commit Graph

825 Commits

Author SHA1 Message Date
Xiang Xiao b5a2c7a304 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-04-17 10:09:52 -06:00
Xiang Xiao 89ff9eb046 tools/cfgdefine.c: Remove some string config variable from the dequote list
since source code use these config as string constant not as variable name

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Iaee3d32b100beb8b77d68711728a1e874b45ae3a
2020-04-17 10:09:52 -06:00
YAMAMOTO Takashi e67062fd88 Config.mk: Provide the default MODULESTRIP
Similarly to MODULECC/MODULELD.
2020-04-16 16:04:11 -06:00
liuhaitao 773f540d74 tools/checkpatch.sh: enhance added files judgement with +++ at the line beginning
In https://github.com/apache/incubator-nuttx-apps/pull/179, there is a
removed graphics/littlevgl/lv_symbol_def.patch file whose content would be
treated abnormally and results in errors.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-16 17:12:57 +08:00
YAMAMOTO Takashi ac18fc0216
Merge pull request #792 from liuguo09/testbuild
tools/testbuild.sh: update makefunc to hardcode make/extra flags opti…
2020-04-15 15:50:06 +09:00
Nakamura, Yuuichi d9472bb625 Fix nxstyle to mksyscall.c 2020-04-15 14:43:05 +08:00
liuhaitao ed7d1dc611 tools/testbuild.sh: update makefunc to hardcode make/extra flags options and redirection
Aim to let makefunc caller just pass in the target. So update makefunc to hardcode make/extra
flags options and redirection, meanwhile avoid the case in which makefunc would remove the quotes
for EXTRAFLAGS. Note that JOPTIONS should also hardcode once parallel build break finally fixed.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-15 11:10:55 +08:00
liuhaitao 032a04f4d6 checkpatch: Update checkpatch readme and remove addition blank line
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-14 12:31:48 +08:00
Ouss4 e174f73010 tools/zipme.sh: Create the hashes unconditionally. 2020-04-12 07:54:32 -06:00
liuhaitao 2427febba9 tools/testbuild.sh: add -e option to append extra c/c++ flags build support
Call 'tools/testbuild.sh -e -Wno-cpp testlist' would pass "EXTRAFLAGS=-Wno-cpp"
to make command line. Then it could suppress the warnings with pre-processor
directive #warning in GCC.

Change-Id: I61e5f9b3774149f64bdd625677cc9aabaa2fea90
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-11 08:31:08 -06:00
liuhaitao 459ad99373 Use EXTRAFLAGS instead of EXTRADEFINES to be used by make via command line
So call 'make EXTRAFLAGS=-Wno-cpp' could suppress the warnings with pre-processor
directive #warning in GCC.

Change-Id: Iaa618238924c9969bf91db22117b39e6d2fc9bb6
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-04-11 08:31:08 -06:00
Abdelatif Guettouche 398175b2ae
tools/zipme.sh: Add the possibility to PGP sign the final tarballs. (#756)
* tools/zipme.sh: Add the possibility to PGP sign the final tarballs.
* tools/README.txt: Update the file to add zipme.sh's new commands.
2020-04-08 17:31:22 -06:00
hartmannathan bfc153ca27
Fix typos in comments and documentation (#750)
* Fix typos in comments and documentation
2020-04-08 06:45:35 -06:00
Ouss4 13f0442b63 tools/zipme.sh: Improve the tool to make it usuable from a development repo
and for future Apache releases.

 - Rename the final tarball to add incubating and apache to their names

 - Make the tool usuable from a development repo.

 - Add a list of patterns(files and folders) to exclude and
a command line argument to pass aditional patterns.

 - Add a command to run silently.

 - If the build number was not provided let version.sh figure it out.
2020-04-07 11:14:18 -06:00
Gregory Nutt 58589db931 tools/nxstyle.c: Fix detection of long single line comments.
This resolves issue 718:  nxstyle line width check was ignoring the line width check for single line comments.

This turned out to be an artifact in parsing.  Usually when parsing character by character, the file character to be parsed was '/n'.  Howefver, in the case of parsing single line comments, the final character was the NUL terminator.  This means that the lenth check was not being performed in the case of single line comments.

NOTE:  Currently, I have suppressed error reports for single line right-hand comments.  My fear is that this will unmask more standard violations than we can cope with.  It is easy to re-enable and perhaps we should do that in the future:

          /* Check for long lines
           *
           * REVISIT:  Long line checks suppressed on right hand comments
           * for now.  This just prevents a large number of difficult-to-
           * fix complaints that we would have otherwise.
           */

          if (m > g_maxline && !rhcomment)  <-- remote the second condition
2020-04-06 19:47:57 +01:00
raiden00pl 15242a65b6 tools/nxstyle.c: handle scientific notation with a negative exponent (eg. 9e-10) 2020-04-03 10:47:32 -06:00
Ouss4 765833546c tools/: Fix trivial typos. 2020-04-03 10:42:09 -06:00
YAMAMOTO Takashi 8851d3a7d3 testbuild.sh: Make the use of "git clean" optional
Also, update the list of command line options in the help text.
2020-04-03 12:43:05 +08:00
Gregory Nutt 65739a38fb tools/nxstyle.c: Alloc MHz in pre-processor variable names.
The sub-string MHz is used frequently is pre-processor variable definitions.  The section "Lowercase Exceptions" permits reasonable use of lowercase characters in pre-processor variable names and, given the frequency of the use of MHz (no pun intended), it certainly should qualify.
2020-04-02 20:29:26 +01:00
YAMAMOTO Takashi 27142b2e3c testbuild.sh: Use git clean instead of make distclean
As the former is considerably faster.
2020-04-02 13:40:05 +08:00
Gregory Nutt a34e5fc043 tools/nxstyle.c: All Public Function Prototypes in C files
Allow "Public Function Prototypes" sections in .c files.  Per the coding standard, all public function prototypes belong in .c files.  However, there are some situations when the public function prototype is needed in a .c file and it shoudld, most correctly, be placed in a "Public Function Prototypes" section.
2020-04-01 22:57:51 +01:00
YAMAMOTO Takashi 03715743a3 testbuild.sh: Add an option to show the list of configs
This was useful for me when tweaking testlists.
2020-04-01 14:04:37 +08:00
Gregory Nutt 7f510a61b4 tools/nxstyle.c: Add fixedmath.h defines to white-listed prefixes
Checking for white-listed prefixes is also simpler now because the check is table driver.  New data structure:  g_white_prefix[] and new function white_prefix().
2020-03-31 19:26:26 +01:00
YAMAMOTO Takashi 4c0783353a tools/testbuild.sh: Make blacklist work on macOS
I couldn't find where "\b" was documented.
I guess it's a zero-width word boundary or something like that.
Anyway, it doesn't seem to work on macOS.
2020-03-29 09:39:11 +01:00
YAMAMOTO Takashi 35e1aa82cb tools/testbuild.sh: Allow spaces in comments 2020-03-28 11:23:42 -05:00
YAMAMOTO Takashi 18c574d66a Config.mk: Provide the default MODULECC/MODULELD
In some cases, a separate toolchain is necessary to
build modules.
E.g. the sim on macOS, where the native format is Mach-O.

By default, just use CC/LD, which is appropriate for
the most of platforms.
2020-03-27 00:04:36 -05:00
Gregory Nutt 5c0e8e88b1 Revert "Makefile: move INCDIROPT to common place (#625)"
This reverts commit b9ace36fcc.

This change was added by PR 625 but has a serious logic flaw.  It removes all occurrences of INCDIROPT and replaces it with a definition in tools/Config.mk:

    else ifeq ($(WINTOOL),y)
      DEFINE = "$(TOPDIR)/tools/define.sh"
      INCDIR = "$(TOPDIR)/tools/incdir.sh" -w

This logic flaw is the Config.mk is included in all Make.defs files BEFORE WINTOOL is defined.  As a result, the definition is wrong in many places when building under Cygwin with a Windows native toolchain.
2020-03-26 08:50:29 -07:00
Xiang Xiao b9ace36fcc
Makefile: move INCDIROPT to common place (#625) 2020-03-26 08:09:59 -06:00
liuhaitao 272a1460c5 Revert "tools/testbuild.sh: suppress lots of stdout log from configure.sh"
f6fc87bc36 commit silence configure.sh
make output defautly, so revert it.

This reverts commit f0267aff33.
2020-03-23 22:04:27 -05:00
Ouss4 f6fc87bc36 tools/sethost.sh & tools/configure.c: When no make argument is passed, silence the make output. 2020-03-23 19:56:11 -05:00
Xiang Xiao e1385b1074 tools/Config.mk: CATFILE clear the existing file
To simplify the caller usage
2020-03-23 12:23:05 -06:00
Xiang Xiao aaa32156df tools/Config.mk: implement a simple version of TESTANDREPLACEFILE for Windows 2020-03-23 12:22:50 -06:00
liuhaitao f0267aff33 tools/testbuild.sh: suppress lots of stdout log from configure.sh
Redirect configure.sh stdout to /dev/null to suppress lots of log
since configure.sh behaviour updated.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-03-21 22:45:02 -05:00
Miguel Herranz d410a29693 Support to run NuttX on ESP32 QEMU 2020-03-21 14:03:07 -06:00
Gregory Nutt 652e152d66 tools/nxstyle: Ignore stub names that begin with STUB_*
The names use for stub functions follows a non-standard convention:  They begin with STUB_
2020-03-21 19:06:32 +01:00
Xiang Xiao 0456b70cd5 tools: Remove ; after break for all shell script
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-03-21 09:48:57 -07:00
Xiang Xiao 580364362c tools/refresh.sh: Support passing the multiple configuration
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id3d4464e2d30871763b40067b3162b793e99c98f
2020-03-21 09:48:57 -07:00
Xiang Xiao 86e47534e6 tools: Remove -d option from configure.sh
since we can achieve the same effect by passing V=1 to make

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-03-21 09:48:57 -07:00
Xiang Xiao a54a492dd2 tools/configure.sh: Support passing options to make
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I6c928ac4574721aacb87be27c979ca8ae146a4ce
2020-03-21 09:48:57 -07:00
Xiang Xiao 024024f468 tools: Sync Makefile.win with Makefile.unix
and fix the typo error and remove if/else nesting

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ife0c80d396417e8eb37e43d0883f272d4b9247a0
2020-03-21 09:48:57 -07:00
Xiang Xiao 76bfaecca6 tools/configure.c: Fix nxstyle issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-03-21 09:48:57 -07:00
Xiang Xiao c4ea4e976d tools/configure.sh: Add -e option to invoke distclean if already configured
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I19eddc3d4e6650eace2482c3cce8fbb07aadc04b
2020-03-21 09:48:57 -07:00
Xiang Xiao 1653b29542 Revert "tools/configure.*: Add -s option to skip .config/Make.defs existence check."
This reverts commit bf3ffddf2f.

Change-Id: Ia858ca1aab79a6c599cf93d2701515951bdc7b80
2020-03-21 09:48:57 -07:00
Johannes Schock 898141300c Don't check position of comments right of code when separated by preprocessor line without comment. 2020-03-19 09:36:57 -06:00
Xiang Xiao 5d6d9eeb82 tools/refresh.sh: Invoke make with V=1 if receiving -d option 2020-03-19 07:55:25 -06:00
Xiang Xiao 6f3ef32feb tools/refresh.sh: Should detect Make.defs from config folder first 2020-03-19 07:55:10 -06:00
Xiang Xiao 6f9117eae2 tools/sethost.sh: Remove <config> argument
Since this argument generate the expanding(deprecated) defconfig
2020-03-19 07:54:57 -06:00
Xiang Xiao b574ea8b73 tools/sethost.sh: Don't make clean_context explicitly
Since olddefconfig will do this automatically
2020-03-19 07:54:43 -06:00
Xiang Xiao 8a6d67d138 tools: Make sethost.sh can be invoke from any directory 2020-03-19 07:54:30 -06:00
Johanne Schock cdf615855a Added assembly header detection. 2020-03-14 08:38:39 -06:00