distclean apps fix

38 views
Skip to first unread message

Matias N.

unread,
Oct 13, 2019, 9:40:35 AM10/13/19
to NuttX
Hi,
I realized that if you go into nuttx/ and do a "distclean" when a distclean is already made, the distclean target on the apps/ repo gives errors about missing nuttx/Make.defs. I'm sending a patch so that this does not produce an error, which I think should be the expected behavior. What do you think?

PS: I realized I always sent patches with "git diff" and thus the commit author was listed as "Matias v01d". I'm sending now with git format-patch which I expect will correct this.

Best,
Matias
0001-Fix-apps-distclean-behaviour-on-an-already-distclean.patch

Nathan Hartman

unread,
Oct 14, 2019, 4:15:17 PM10/14/19
to NuttX
The change is to make include of Make.defs optional everywhere, across all makefiles.

However, what happens if you forget to run tools/configure.sh and then attempt to run make?

I ask because my system is not in a state where I can try for myself at the moment...

Thanks!

Matias N.

unread,
Oct 14, 2019, 4:20:26 PM10/14/19
to NuttX
NuttX already gives an indicative error for this:

v01d@kanji-i5:/tmp/test/nuttx$ make
Create .version

Nuttx has not been configured:
  tools/configure.sh <target>

make: *** [tools/Makefile.unix:416: check_context] Error 1

I simply applied the same strategy for including Make.defs as it is used inside nuttx/, but I'm not sure if there's a good reason no to do it in apps/ as well.

Best,
Matias
--
You received this message because you are subscribed to the Google Groups "NuttX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nuttx+un...@googlegroups.com.

Gregory Nutt

unread,
Oct 14, 2019, 4:29:35 PM10/14/19
to nu...@googlegroups.com

There was a patch submitted recently that made all of the Make.defs inclusions unconditional.  This is probably a side-effect of that patch.  You might want to look at reverting part of that.

Gregory Nutt

unread,
Oct 14, 2019, 9:26:21 PM10/14/19
to nu...@googlegroups.com

Is this sufficient?

 

commit 3a23523147b3d0e574453d1bbc336e9492f6836f (HEAD -> master)

Author: Gregory Nutt <gn...@nuttx.org>

Date:   Tue Oct 15 09:25:48 2019 +0800

 

    Makefiles:  This reverts part of commit cf0365ea9.  It restores 'conditional' inclusion of TOPDIR/Make.defs.  Otherwise all make targets fail if the board has not been configured.  That is okay most of the time, but not for things like clean and distclean which should not depend on being configured.

 

 

Sent from Mail for Windows 10

--

Matias N.

unread,
Oct 14, 2019, 9:32:21 PM10/14/19
to NuttX
Can't see the commit upstream to check the diff. But If it is equivalent to my patch I guess it is OK.

Thanks,
Matias

Gregory Nutt

unread,
Oct 14, 2019, 9:37:24 PM10/14/19
to nu...@googlegroups.com

I am traveling so don’t have the best tools available to me.  I did not see your patch so I just wasted a couple of hours duplicating it (by reverting portions of the original change).

 

Sorry.  It would be good if you could do a diff and make sure that your version is the same as mine.

 

Greg

 

Sent from Mail for Windows 10

 

--

You received this message because you are subscribed to the Google Groups "NuttX" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nuttx+un...@googlegroups.com.

Matias N.

unread,
Oct 15, 2019, 9:46:27 PM10/15/19
to NuttX
I think I just lost the local repo where I generated the patch (I cloned in /tmp). However, I looked at the diff from your commit and looks OK.

Best,
Matias
Reply all
Reply to author
Forward
0 new messages