hid4java icon indicating copy to clipboard operation
hid4java copied to clipboard

build-hidapi.sh: Remove calls to "make clean"

Open tresf opened this issue 4 years ago • 0 comments

Some targets in build-hidapi.sh will fail when make clean is called with the error:

- make: *** No rule to make target `clean'.  Stop.

I propose we abolish all calls to make clean in build-hidapi.sh in favor of reseting the hidapi git repository between builds.

Example:

function git-clean {
  echo -e "Resetting Cpp/hidapi"
  git clean -ffdx > /dev/null 2>&1 || exit   # remove all untracked files
  git reset --hard > /dev/null 2>&1 || exit  # reset all tracked files
}
- echo -e "${green}Building Windows 64-bit${plain}"
+ echo -e "${green}Building Windows 64-bit${plain}" && git-clean
   dockcross-windows-shared-x64 bash -c 'sudo apt-get update && sudo apt-get --yes install libudev-dev libusb-1.0-0-dev && sudo ./bootstrap && sudo ./configure --host=x86_64-w64-mingw32 && sudo make'
// ...

tresf avatar Aug 11 '21 17:08 tresf