[Lldb-commits] [lldb] r203253 - Fix test 'make clean' target for empty $(DSYM) on FreeBSD

Todd Fiala tfiala at google.com
Fri Mar 7 10:01:11 PST 2014


Ah I see, ok.

It might be worth taking a pass at the makefiles at some point and
converting the direct rm usage to $(RM), but I wouldn't worry about it now.
 Only if it it would have fixed the issue on FreeBSD.


On Fri, Mar 7, 2014 at 9:59 AM, Ed Maste <emaste at freebsd.org> wrote:

> It still wouldn't solve the underlying problem though; on FreeBSD this
> would fail to do anything:
> rm -f file1 "" file2
> (it's now fixed in SVN).
>
> Although now that you mention it we should drop the -r from the
> invocations that aren't explicitly intended to handle directories - perhaps:
>
> clean::
>
>         $(RM) "$(EXE)" $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME)
> $(ARCHIVE_OBJECTS)
>         $(RM) -r *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9]
> *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
> ifneq "$(DYLIB_NAME)"
> ""
>         $(RM) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_FILENAME)
> $(DYLIB_FILENAME).dSYM $(DYLIB_FILENAME).debug
> endif
>
> ifneq "$(DSYM)"
> ""
>         $(RM)
> "$(DSYM)"
> endif
>
>
>
>
>
> On 7 March 2014 12:34, Todd Fiala <tfiala at google.com> wrote:
>
>> Isn't there a $(RM) rule that would have done effectively the rm -rf?
>>
>>
>> On Fri, Mar 7, 2014 at 9:20 AM, Ed Maste <emaste at freebsd.org> wrote:
>>
>>> Author: emaste
>>> Date: Fri Mar  7 11:20:50 2014
>>> New Revision: 203253
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=203253&view=rev
>>> Log:
>>> Fix test 'make clean' target for empty $(DSYM) on FreeBSD
>>>
>>> A freebsd issue with rm prevents '[g]make clean' from working if $(DSYM)
>>> is empty (fts_open(3) fails if passed an empty argument).
>>>
>>> To work around this, simplify the clean target by using three separate
>>> rm invocations: one for the common files, one for the case of non-empty
>>> $(DYLIB_NAME), and one for non-empty $(DSYM).
>>>
>>> Issue diagnosed (and reported to FreeBSD) by John Wolfe.
>>>
>>> llvm.org/pr17933
>>>
>>> Modified:
>>>
>>> lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
>>>     lldb/trunk/test/make/Makefile.rules
>>>
>>> Modified:
>>> lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py?rev=203253&r1=203252&r2=203253&view=diff
>>>
>>> ==============================================================================
>>> ---
>>> lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
>>> (original)
>>> +++
>>> lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py Fri
>>> Mar  7 11:20:50 2014
>>> @@ -21,7 +21,6 @@ class ChangedInferiorTestCase(TestBase):
>>>          self.setTearDownCleanup(dictionary=d)
>>>          self.inferior_not_crashing()
>>>
>>> -    @expectedFailureFreeBSD('llvm.org/pr17933')
>>>      def test_inferior_crashing_dwarf(self):
>>>          """Test lldb reloads the inferior after it was changed during
>>> the session."""
>>>          self.buildDwarf()
>>>
>>> Modified: lldb/trunk/test/make/Makefile.rules
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=203253&r1=203252&r2=203253&view=diff
>>>
>>> ==============================================================================
>>> --- lldb/trunk/test/make/Makefile.rules (original)
>>> +++ lldb/trunk/test/make/Makefile.rules Fri Mar  7 11:20:50 2014
>>> @@ -363,11 +363,14 @@ endif
>>>  dsym:  $(DSYM)
>>>  all:   $(EXE) $(DSYM)
>>>  clean::
>>> -ifeq "$(DYLIB_NAME)" ""
>>> -       rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME)
>>> $(ARCHIVE_OBJECTS) *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9]
>>> *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
>>> -else
>>> -       rm -rf "$(EXE)" "$(DSYM)" $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME)
>>> $(ARCHIVE_OBJECTS) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_FILENAME)
>>> $(DYLIB_FILENAME).dSYM $(DYLIB_FILENAME).debug *.d.[0-9] *.d.[0-9][0-9]
>>> *.d.[0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
>>> +       rm -rf "$(EXE)" $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME)
>>> $(ARCHIVE_OBJECTS) *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9]
>>> *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
>>> +ifneq "$(DYLIB_NAME)" ""
>>> +       rm -rf $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_FILENAME)
>>> $(DYLIB_FILENAME).dSYM $(DYLIB_FILENAME).debug
>>>  endif
>>> +ifneq "$(DSYM)" ""
>>> +       rm -rf "$(DSYM)"
>>> +endif
>>> +
>>>
>>>  #----------------------------------------------------------------------
>>>  # From http://blog.melski.net/tag/debugging-makefiles/
>>>
>>>
>>> _______________________________________________
>>> lldb-commits mailing list
>>> lldb-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>>>
>>
>>
>>
>> --
>>  Todd Fiala | Software Engineer |  tfiala at google.com |  650-943-3180
>>
>
>


-- 
Todd Fiala | Software Engineer | tfiala at google.com | 650-943-3180
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140307/f76597aa/attachment.html>


More information about the lldb-commits mailing list