b42-fosters / b42_piscine_helpers

1 stars 0 forks source link

Clean object files after compile #3

Open fedordikarev opened 8 months ago

fedordikarev commented 8 months ago

Right now we compile c files to check for warnings. That produce object files, and it's good to cleanup them.

nit: it could happen that user has extra .o files in the folder, so if we take that into account and not just delete all *.o files, it will be good.

fedordikarev commented 8 months ago

Unfortunately -o flag doesn't accept folder, so we can't just put in temp folder. 2 ways of doing that, as I see:

  1. Use -o /dev/null and cc files by one (either with find or xargs)
  2. Create temp folder with mktemp, cd there with pushd and from there compile all the files using full path specification.

@dmitrijslasko wdyt?