Changeset 1685:966520910602


Ignore:
Timestamp:
Oct 28, 2017, 11:26:52 PM (14 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Use `-exec` instead of `xargs`

Instead of piping the `find` output into `xargs`, use the `-exec`
option of `find` to remove files and directories. Using `xargs`
causes problems if nothing is found; in this case we get a message
like

  rm: missing operand

and the make target (`clean`) fails.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r1670 r1685  
    109109        # Use absolute path to ensure we delete the right directory.
    110110        rm -rf ${PROJECT_DIR}/build
    111         find ${PROJECT_DIR} -type f -name "*.pyc" | xargs rm
    112         find ${PROJECT_DIR} -type d -name "__pycache__" | xargs rmdir
     111        find ${PROJECT_DIR} -type f -name "*.pyc" -exec rm {} \;
     112        find ${PROJECT_DIR} -type d -name "__pycache__" -exec rm -r {} \;
    113113
    114114# Help testing test installations. Note that `pip uninstall`
Note: See TracChangeset for help on using the changeset viewer.