From df2d62120dae0cceae1cc0fa59e9d26cd445e608 Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Mon, 12 Sep 2022 14:55:10 -0500 Subject: [PATCH] Makefile updates --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 2b7a49f..0c6fbc4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ +INSTALL_DIR?=/usr/local/bin URL_ICANN=https://data.iana.org/TLD/tlds-alpha-by-domain.txt +GO_FILES=$(shell find -name '*.go') build/top-level-domains.txt: curl -o build/top-level-domains.txt $(URL_ICANN) @@ -17,7 +19,13 @@ regexp.go: build/top-level-domains.txt clean: rm -f parcels regexp.go go.sum -.PHONY: build -build: regexp.go +parcels: $(GO_FILES) regexp.go go build +.PHONY: build +build: parcels + +.PHONY: install +install: parcels + install -m755 parcels $(INSTALL_DIR)/parcels + -- 2.45.2