Skip to contentSkip to conversation

make clean not so clean

Buildroot jake sullivan 4 participants 7 messages Feb 1, 2008

lore
Share & tools
lore
#0 lore raw

I'm not sure how to go about fixing this, but I have been able to recreate an annoying little bug (that I think is the source of a number of other newb problems).

I started by building a basic system, got my cross compilers working, and got my embedded system working on a normal hard drive (ext2). When I went to add jffs2 as a target output, I got a lot of errors about missing things (e.g. the shadow directory). This was similar to earlier problems that I had solved by deleting the whole directory and re checking out buildroot from svn (make clean didn't solve any of the previous problems). This time I tried "make clean" again, didn't work, but "make distclean" did work. It was a little annoying that I had to redownload all the source, but I didn't lose the settings from the buildroot "make menuconfig" (but I did lose the "make menuconfig" settings for the kernel). I tried checking out another copy of buildroot, building it without jffs2 adding some features, building, adding jffs2 and build error. I then tried make clean, no luck, and then make distclean. After all the source was downloaded again, the
build worked great.

My gut says to update "make clean" to delete all the config files (and basically everything but the source files), but before I put work into making and testing a patch, I want to make sure that is the right approach...

Jake

      ____________________________________________________________________________________

Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping

#1 lore raw
Quoted 4 lines · jake sullivan

I'm not sure how to go about fixing this, but I have been able to recreate an annoying little bug (that I think is the source of a number of other newb problems).

...(snip)...

Quoted 5 lines

My gut says to update "make clean" to delete all the config files (and basically everything but the source files), but before I put work into making and testing a patch, I want to make sure that is the right approach...

Don't know about "Right Appraach", but I just locate my download directory outside the Buildroot tree.

Under: Build Options --->

	$(BASE_DIR)/../dl) Download dir

__
Ormund

#2 lore raw
Quoted 11 lines · Ormund Williams
Quoted 4 lines · jake sullivan

I'm not sure how to go about fixing this, but I have been able to recreate an annoying little bug (that I think is the source of a number of other newb problems).

...(snip)...

Quoted 5 lines

My gut says to update "make clean" to delete all the config files (and basically everything but the source files), but before I put work into making and testing a patch, I want to make sure that is the right approach...

Quoted 6 lines

Don't know about "Right Appraach", but I just locate my download directory outside the Buildroot tree.

Under: Build Options --->

	$(BASE_DIR)/../dl) Download dir

This historical behaviour is indeed annoying. Note that distclean only deletes the DL_DIR if it is set to the default ("$(BASE_DIR)/dl"). I usually set it to $(BASE_DIR)/down due to this slightly inconvenient behaviour.

Changing this behaviour is easy, but how should DL_DIR be cleaned-out? make dl-clean?
Suggestions for a better name for the target?

#3 lore raw
Quoted 19 lines · Bernhard Fischer
Quoted 11 lines · Ormund Williams
Quoted 4 lines · jake sullivan

I'm not sure how to go about fixing this, but I have been able to recreate an annoying little bug (that I think is the source of a number of other newb problems).

...(snip)...

Quoted 5 lines

My gut says to update "make clean" to delete all the config files (and basically everything but the source files), but before I put work into making and testing a patch, I want to make sure that is the right approach...

Quoted 6 lines

Don't know about "Right Appraach", but I just locate my download directory outside the Buildroot tree.

Under: Build Options --->

	$(BASE_DIR)/../dl) Download dir
Quoted 8 lines

This historical behaviour is indeed annoying. Note that distclean only deletes the DL_DIR if it is set to the default ("$(BASE_DIR)/dl"). I usually set it to $(BASE_DIR)/down due to this slightly inconvenient behaviour.

Changing this behaviour is easy, but how should DL_DIR be cleaned-out? make dl-clean? Suggestions for a better name for the target?

this drove me a bit nuts when i first started working with OpenWrt but, as much as it pains me to say it, i think the current behaviour is the correct one -- "make distclean" is historically understood to mean, "clean right down to the original distribution", and that absolutely involves getting rid of downloaded sources *if they've been placed in that directory*.

the only reasonable solution is to somehow emphatically recommend to users to keep their downloaded sources elsewhere (which is a good idea, anyway). i don't see the need for an extra target that covers the downloads directory.

p.s. one potentially hideous solution is to not specify a default location for the downloads directory and *force* the user to pick an initial location, at which point you can warn him/her. but that strikes me as overly annoying, so maybe forget that plan.

rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA

Home page:                                         http://crashcourse.ca
Fedora Cookbook:    http://crashcourse.ca/wiki/index.php/Fedora_Cookbook

========================================================================

#4 lore raw
In reply to Ormund Williams
Quoted 11 lines · Ormund Williams
Quoted 4 lines · jake sullivan

I'm not sure how to go about fixing this, but I have been able to recreate an annoying little bug (that I think is the source of a number of other newb problems).

...(snip)...

Quoted 5 lines

My gut says to update "make clean" to delete all the config files (and basically everything but the source files), but before I put work into making and testing a patch, I want to make sure that is the right approach...

Quoted 6 lines

Don't know about "Right Appraach", but I just locate my download directory outside the Buildroot tree.

Under: Build Options --->

	$(BASE_DIR)/../dl) Download dir

to save me the trouble of pawing through the source, if you override the default download directory (of "dl"?), does that mean a "make distclean" will leave all the downloads alone? thanks.

rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA

Home page:                                         http://crashcourse.ca
Fedora Cookbook:    http://crashcourse.ca/wiki/index.php/Fedora_Cookbook

========================================================================

#5 lore raw
Quoted 4 lines · Robert P. J. Day

to save me the trouble of pawing through the source, if you override the default download directory (of "dl"?), does that mean a "make distclean" will leave all the downloads alone? thanks.

Exactly

__
Ormund

#6 lore raw
Quoted 7 lines · Ormund Williams
Quoted 4 lines · Robert P. J. Day

to save me the trouble of pawing through the source, if you override the default download directory (of "dl"?), does that mean a "make distclean" will leave all the downloads alone? thanks.

Exactly

yes, i just saw bernhard's response, thanks.

rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry Waterloo, Ontario, CANADA

Home page:                                         http://crashcourse.ca
Fedora Cookbook:    http://crashcourse.ca/wiki/index.php/Fedora_Cookbook

========================================================================