From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC] *clean targets
Date: Wed, 7 Oct 2009 18:24:22 +0200 [thread overview]
Message-ID: <20091007162422.GI10261@mx.loc> (raw)
Hi,
Currently the clean target (as well as dirclean) does nothing useful.
I propose the following change:
# wipe target
clean:
# remove generated files, retain configs
realclean:
# remove generated files, including configs (but not DL_DIR!)
distclean:
# roll a release tarball, in gz, bz2, xz format
release:
hm, something like this as a base (probably incomplete, but better than
what we have now)
-------------- next part --------------
diff --git a/Makefile b/Makefile
index bbd49d4..ddd58ec 100644
--- a/Makefile
+++ b/Makefile
@@ -444,19 +444,20 @@ external-deps:
# Cleanup and misc junk
#
#############################################################
+# wipe target
clean: $(TARGETS_CLEAN)
- rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
+ $(Q)rm -rf $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
-dirclean: $(TARGETS_DIRCLEAN)
- rm -rf $(STAGING_DIR) $(TARGET_DIR) $(IMAGE) $(BUILD_DIR)/.root $(STAMP_DIR)
+# remove generated files, retain configs
+dirclean: clean $(TARGETS_DIRCLEAN)
+ $(Q)rm -rf $(STAGING_DIR) $(HOST_DIR) $(TOOLCHAIN_DIR)
-distclean:
-ifeq ($(DL_DIR),$(TOPDIR)/dl)
- rm -rf $(DL_DIR)
-endif
- rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR) $(BINARIES_DIR) \
- .config.cmd
- $(MAKE) -C $(CONFIG) clean
+# remove generated files, including configs (but not DL_DIR!)
+distclean: clean dirclean
+ $(Q)$(MAKE) -C $(CONFIG) clean
+ $(Q)rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR) $(BINARIES_DIR) \
+ .config .config.cmd .config.old .auto.deps \
+ $(BR2_DEPENDS_DIR)
else # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
@@ -573,18 +574,7 @@ defconfig: $(CONFIG)/conf
source-check: allyesconfig
$(MAKE) _source-check
-#############################################################
-#
-# Cleanup and misc junk
-#
-#############################################################
-clean:
- rm -f .config .config.old .config.cmd .tmpconfig.h .lognr.*
- -$(MAKE) -C $(CONFIG) clean
-
-distclean: clean
- rm -rf sources/*
-
+clean dirclean distclean:
endif # ifeq ($(BR2_HAVE_DOT_CONFIG),y)
@@ -635,10 +625,11 @@ help:
@echo
release: distclean
- OUT=buildroot-$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
- rm -rf ../$$OUT*; cp -al . ../$$OUT; cd ..; \
- tar cfz $$OUT.tar.gz --exclude .svn --exclude .git --exclude \*~ $$OUT; \
- rm -rf $$OUT
+ $(Q)BR2_VERSION=$$(grep -A2 BR2_VERSION $(CONFIG_CONFIG_IN)|grep default|cut -f2 -d\"); \
+ git archive HEAD --format=tar --prefix="buildroot-$$BR2_VERSION/" > ../buildroot-$$BR2_VERSION.tar; \
+ cat ../buildroot-$$BR2_VERSION.tar | bzip2 -9 > ../buildroot-$$BR2_VERSION.tar.bz2 || rm -f ../buildroot-$$BR2_VERSION.tar.bz2; \
+ cat ../buildroot-$$BR2_VERSION.tar | gzip -9 > ../buildroot-$$BR2_VERSION.tar.gz || rm -f ../buildroot-$$BR2_VERSION.tar.gz; \
+ cat ../buildroot-$$BR2_VERSION.tar | xz -9 > ../buildroot-$$BR2_VERSION.tar.xz || rm -f ../buildroot-$$BR2_VERSION.tar.xz
.PHONY: $(noconfig_targets)
next reply other threads:[~2009-10-07 16:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-07 16:24 Bernhard Reutner-Fischer [this message]
2009-10-07 16:32 ` [Buildroot] [RFC] *clean targets Sven Neumann
2009-10-07 18:12 ` Peter Korsgaard
2009-10-07 18:25 ` Bernhard Reutner-Fischer
2009-10-07 18:26 ` Peter Korsgaard
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=20091007162422.GI10261@mx.loc \
--to=rep.dot.nop@gmail.com \
--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