melisanahtar / ea-utils

Automatically exported from code.google.com/p/ea-utils
0 stars 0 forks source link

Add "make clean" target to Makefile #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be nice to have a "make clean" target to remove all compiled files,
so you can really start compiling from scratch.

$ svn diff
Index: Makefile
===================================================================
--- Makefile    (revision 662)
+++ Makefile    (working copy)
@@ -100,3 +100,6 @@
 bam-filter:  bam-filter.cpp 
        $(CC) $(CFLAGS) fastq-lib.cpp -o $@  $< -lbamtools 

+clean:
+       rm -f fastq-clipper fastq-join fastq-mcf fastq-multx fastq-stats 
sam-stats varcall
+       cd samtools && make clean

I first compiled ea-utils with the default settings:
  $ make

Later I decided to compile it with -march=native but make complained:
  $ CFLAGS='-march=native -I.' CPPFLAGS='-march=native -I.' make
  grep: ea-utils.spec: No such file or directory
  make: Nothing to be done for `all'.

Adding a make clean target allows me to recompile it:
  $ make clean
  grep: ea-utils.spec: No such file or directory
  rm -f fastq-clipper fastq-join fastq-mcf fastq-multx fastq-stats sam-stats varcall
  cd samtools && make clean
  make[1]: Entering directory `/software/ea-utils/ea-utils-svn/clipper-test/samtools'
  make[2]: Entering directory `/software/ea-utils/ea-utils-svn/clipper-test/samtools'
  rm -fr gmon.out *.o a.out *.exe *.dSYM razip bgzip samtools *~ *.a *.so.* *.so *.dylib
  make[2]: Leaving directory `/software/ea-utils/ea-utils-svn/clipper-test/samtools'
  make[1]: Leaving directory `/software/ea-utils/ea-utils-svn/clipper-test/samtools'
  $ CFLAGS='-march=native -I.' CPPFLAGS='-march=native -I.' make

Original issue reported on code.google.com by hulselma...@gmail.com on 9 Oct 2013 at 12:47

GoogleCodeExporter commented 8 years ago

Original comment by earone...@gmail.com on 13 Nov 2013 at 10:13

GoogleCodeExporter commented 8 years ago
OK, I added this:

clean:
    rm -f *.o $(BIN)
    cd samtools && make clean

Original comment by earone...@gmail.com on 13 Dec 2013 at 4:45

GoogleCodeExporter commented 8 years ago

Original comment by earone...@gmail.com on 13 Dec 2013 at 4:45