From: Siraaj Khandkar Date: Wed, 14 Nov 2018 16:16:32 +0000 (-0500) Subject: Make a clean executable name X-Git-Url: https://git.xandkar.net/?p=dups.git;a=commitdiff_plain;h=0a1c6f40315940659978d3d576cc7c6415c27d81 Make a clean executable name --- diff --git a/.gitignore b/.gitignore index 47ad301..7d19a9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ _build/ +dupfiles *.native *.native *.swp diff --git a/Makefile b/Makefile index 89c5816..3e9627e 100644 --- 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)