Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#12037 closed defect (fixed)

"make clean" fails on OSX

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 0.12.7
Component: general Version:
Severity: normal Keywords: macosx, makefile
Cc: Branch:
Release Notes:

Fixed failure of make clean on some platforms due to use of find that didn't meet POSIX compliance.

API Changes:
Internal Changes:

Description

$ make clean
find -name \*.py[co] -exec rm {} \;
find: illegal option -- n
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]
make: *** [clean-bytecode] Error 1

I've only tested on the trunk so far, and I haven't tested the following proposed change on other platforms:

  • Makefile

    diff --git a/Makefile b/Makefile
    index 8081f4b..7a25fe9 100644
    a b Trac.egg-info: status  
    165165clean: clean-bytecode clean-figleaf clean-coverage clean-doc
    166166
    167167clean-bytecode:
    168        find -name \*.py[co] -exec rm {} \;
     168       find . -name \*.py[co] -exec rm {} \;
    169169
    170170Makefile: ;
    171171
    diff-%:  
    329329# *conflicts* for line change only.
    330330
    331331clean-mo:
    332        find trac/locale -name \*.mo -exec rm {} \;
    333        find trac/htdocs/js/messages -name \*.js -exec rm {} \;
     332       find . trac/locale -name \*.mo -exec rm {} \;
     333       find . trac/htdocs/js/messages -name \*.js -exec rm {} \;
    334334
    335335
    336336# ----------------------------------------------------------------------------

Attachments (0)

Change History (4)

comment:1 by Jun Omae, 10 years ago

The changes clean-bytecode task look good to me. I think no need to change clean-mo task because trac/locale and trac/htdocs/js/message are given.

According to http://pubs.opengroup.org/onlinepubs/007904975/utilities/find.html, find utility in POSIX requires a directory for search at least.

find [-H | -L] path ... [operand_expression ...]

According to find(1) in GNU findutils, it uses the current directory if no paths are given.

find [-H] [-L] [-P] [-D debugopts] [-Olevel] [path...] [expression]

comment:2 by Ryan J Ollos, 10 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Thanks for checking. I had been careless in creating the patch.

Committed to 0.12-stable in [14006], merged to 1.0-stable in [14007], merged to trunk in [14008].

comment:3 by Ryan J Ollos, 10 years ago

Owner: set to Ryan J Ollos

comment:4 by Ryan J Ollos, 9 years ago

Keywords: makefile added; make removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.