Make a clean executable name
authorSiraaj Khandkar <siraaj@khandkar.net>
Wed, 14 Nov 2018 16:16:32 +0000 (11:16 -0500)
committerSiraaj Khandkar <siraaj@khandkar.net>
Wed, 14 Nov 2018 16:16:32 +0000 (11:16 -0500)
.gitignore
Makefile

index 47ad301..7d19a9d 100644 (file)
@@ -1,4 +1,5 @@
 _build/
+dupfiles
 *.native
 *.native
 *.swp
index 89c5816..3e9627e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,17 @@
-TARGET := dupfiles.native
+EXE_NAME := dupfiles
+EXE_TYPE := native
 
-.PHONY: all build clean run
+.PHONY: all build clean
 
 all:
        @$(MAKE) -s clean
        @$(MAKE) -s build
 
 build:
-       @ocamlbuild -cflags '-w A' -pkg 'unix' $(TARGET)
+       @ocamlbuild -cflags '-w A' -pkg 'unix' $(EXE_NAME).$(EXE_TYPE)
+       @cp _build/$(EXE_NAME).$(EXE_TYPE) $(EXE_NAME)
+       @rm -f $(EXE_NAME).$(EXE_TYPE)
 
 clean:
        @ocamlbuild -clean
-
-run:
-       @find ~ -type f | egrep -v '/.git/' | ./$(TARGET)
+       @rm -f $(EXE_NAME)
This page took 0.024965 seconds and 4 git commands to generate.