From: Peter Korsgaard <jacmet@uclibc.org>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC] *clean targets
Date: Wed, 07 Oct 2009 20:26:34 +0200 [thread overview]
Message-ID: <87ocojkqlh.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <20091007162422.GI10261@mx.loc> (Bernhard Reutner-Fischer's message of "Wed\, 7 Oct 2009 18\:24\:22 +0200")
>>>>> "Bernhard" == Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> writes:
Bernhard> Hi,
Bernhard> Currently the clean target (as well as dirclean) does nothing useful.
Bernhard> I propose the following change:
Bernhard> # wipe target
Bernhard> clean:
Bernhard> # remove generated files, retain configs
Bernhard> realclean:
Bernhard> # remove generated files, including configs (but not DL_DIR!)
Bernhard> distclean:
Bernhard> # roll a release tarball, in gz, bz2, xz format
Bernhard> release:
Sounds sensible. I would prefer to not touch the release target right
now, as I don't have xz installed, noone else needs it and I already
have my own release script signing the tarballs and uploading them.
Bernhard> hm, something like this as a base (probably incomplete, but better than
Bernhard> what we have now)
Bernhard> diff --git a/Makefile b/Makefile
Bernhard> index bbd49d4..ddd58ec 100644
Bernhard> --- a/Makefile
Bernhard> +++ b/Makefile
Bernhard> @@ -444,19 +444,20 @@ external-deps:
Bernhard> # Cleanup and misc junk
Bernhard> #
Bernhard> #############################################################
Bernhard> +# wipe target
Bernhard> clean: $(TARGETS_CLEAN)
Bernhard> - rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
Bernhard> + $(Q)rm -rf $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
Makes sense. Why would we want to run the -clean targets of all the
individual packages first? That just tends to take ages (and fails on
buggy packages), and we're nuking the TARGET_DIR afterwards anyway.
Bernhard> -dirclean: $(TARGETS_DIRCLEAN)
Bernhard> - rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
Bernhard> +# remove generated files, retain configs
Bernhard> +dirclean: clean $(TARGETS_DIRCLEAN)
Bernhard> + $(Q)rm -rf $(STAGING_DIR) $(HOST_DIR) $(TOOLCHAIN_DIR)
Same comment about TARGETS_DIRCLEAN.
Bernhard> -distclean:
Bernhard> -ifeq ($(DL_DIR),$(TOPDIR)/dl)
Bernhard> - rm -rf $(DL_DIR)
Bernhard> -endif
Bernhard> - rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR) $(BINARIES_DIR) \
Bernhard> - .config.cmd
Bernhard> - $(MAKE) -C $(CONFIG) clean
Bernhard> +# remove generated files, including configs (but not DL_DIR!)
Bernhard> +distclean: clean dirclean
Bernhard> + $(Q)$(MAKE) -C $(CONFIG) clean
Bernhard> + $(Q)rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR) $(BINARIES_DIR) \
dirclean already gets rid of those dirs.
Bernhard> + .config .config.cmd .config.old .auto.deps \
Bernhard> + $(BR2_DEPENDS_DIR)
Bernhard> release: distclean
Bernhard> - OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
Bernhard> - rm -rf ../$$OUT*; cp -al . ../$$OUT; cd ..; \
Bernhard> - tar cfz $$OUT.tar.gz --exclude .svn --exclude .git --exclude \*~ $$OUT; \
Bernhard> - rm -rf $$OUT
Bernhard> + $(Q)BR2_VERSION=$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
Bernhard> + git archive HEAD --format=tar --prefix="buildroot-$$BR2_VERSION/" > ../buildroot-$$BR2_VERSION.tar; \
The git archive part is fine by me, but my script just expects the
.tar.gz, so I would like to keep it like that (for now atleast).
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2009-10-07 18:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 16:24 [Buildroot] [RFC] *clean targets Bernhard Reutner-Fischer
2009-10-07 16:32 ` Sven Neumann
2009-10-07 18:12 ` Peter Korsgaard
2009-10-07 18:25 ` Bernhard Reutner-Fischer
2009-10-07 18:26 ` Peter Korsgaard [this message]
2009-10-07 18:31 ` Bernhard Reutner-Fischer
2009-10-07 19:31 ` Peter Korsgaard
2009-10-09 8:01 ` Thomas Petazzoni
2009-10-07 18:27 ` Peter Korsgaard
2009-10-09 7:51 ` Thomas Petazzoni
2009-10-09 8:00 ` Thomas Petazzoni
2009-10-09 9:48 ` Bernhard Reutner-Fischer
2009-10-09 11:28 ` Peter Korsgaard
2009-11-20 13:04 ` Peter Korsgaard
2009-11-20 15:28 ` Bernhard Reutner-Fischer
2009-11-20 15:55 ` Peter Korsgaard
2009-11-20 16:19 ` Bernhard Reutner-Fischer
2009-11-20 16:20 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ocojkqlh.fsf@macbook.be.48ers.dk \
--to=jacmet@uclibc.org \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox