makefile feature request: make clean-except-for-external

2014-07-05 Thread Noel Grandin
Hi

I'm doing a lot of work with clang plugins, so I often need to build
from scratch, which takes a really long time.

It would be awesome if I could do a
  make clean-except-for-externals
which would delete all of the build output except for the stuff we
generate from the externals directory,
for which we do not run the clang plugins.

Thanks, Noel Grandin
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: makefile feature request: make clean-except-for-external

2014-07-05 Thread Norbert Thiebaud
On Sat, Jul 5, 2014 at 1:10 PM, Noel Grandin noelgran...@gmail.com wrote:
 Hi

 I'm doing a lot of work with clang plugins, so I often need to build
 from scratch, which takes a really long time.

 It would be awesome if I could do a
   make clean-except-for-externals
 which would delete all of the build output except for the stuff we
 generate from the externals directory,
 for which we do not run the clang plugins.

 Thanks, Noel Grandin

diff --git a/Makefile.in b/Makefile.in
index 79ee758..ae88777 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -7,7 +7,7 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #

-.PHONY : all bootstrap gbuild build build-non-l10n-only
build-l10n-only check clean clean-build clean-host test-install
distclean distro-pack-install docs download fetch findunusedcode
get-submodules id install install-strip subsequentcheck tags debugrun
help slowcheck translations unitcheck packageinfo
+.PHONY : all bootstrap gbuild build build-non-l10n-only
build-l10n-only check clean clean-build clean-host test-install
distclean distro-pack-install docs download fetch findunusedcode
get-submodules id install install-strip subsequentcheck tags debugrun
help slowcheck translations unitcheck packageinfo internal.clean

 MAKECMDGOALS?=all
 build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
@@ -80,6 +80,11 @@ endef

 gbuild_modules := $(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard
$(SRCDIR)/*/Module_*.mk $(SRCDIR)/external/*/Module_*.mk)))

+gbuild_internal_modules := $(filter-out odk external \
+,$(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk
+
+internal.clean: $(addsuffix .clean,$(gbuild_internal_modules))
+
 $(eval $(call gb_Top_GbuildModulesRules,$(gbuild_modules)))

 gbuild_TARGETS := AllLangHelp \
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: makefile feature request: make clean-except-for-external

2014-07-05 Thread Noel Grandin
Way cool! Thanks!
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice