diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-16 08:00:46 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-16 08:00:46 +0000 |
commit | 31f9524f7ee3f744654ed9dcd8b11a257e6dfcd9 (patch) | |
tree | a00a03912818731dd87d34e2ef78b7e7835a8715 /Makefile.rules | |
parent | f2ac189e52a1e56236f2bbac684c3c6bfeabbd21 (diff) |
Add a "make spotless" rule for environments with BUILD_OBJ_ROOT not equal
to BUILD_OBJ_SRC. This will save the config.status and mklib files, then
wipe out the BUILD_OBJ_ROOT, copy back config.status and mklib, and then
run config.status to regenerate the makefiles. This target gives you a
completely clean/fresh BUILD_OBJ_ROOT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules index 4908d4543fe..e4b620b1ad5 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -81,6 +81,21 @@ ifneq ($(strip $(BUILT_SOURCES)),) -$(Verb) $(RM) -f $(BUILT_SOURCES) endif +ifneq ($(BUILD_OBJ_ROOT),$(BUILD_SRC_ROOT)) +spotless: + $(Echo) Wiping out $(BUILD_OBJ_ROOT) and rebuilding configuration. + $(Verb) if test -x config.status ; then \ + $(MV) config.status .. ; \ + $(MV) mklib .. ; \ + $(RM) -rf * ; \ + $(MV) ../config.status . ; \ + $(MV) ../mklib . ; \ + ./config.status ; \ + else \ + $(EchoCmd) "make spotless" can only be run from $(BUILD_OBJ_ROOT); \ + fi +endif + $(BUILT_SOURCES) : $(ObjMakefiles) #------------------------------------------------------------------------ |