From 2eeeed0f2a334af2fb2847e098ef9efcab875bf2 Mon Sep 17 00:00:00 2001 From: ObserverOfTime Date: Thu, 13 Jun 2024 12:26:05 +0300 Subject: [PATCH] fix(make): fail properly on Windows --- Makefile | 8 +++++--- cli/src/generate/templates/makefile | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e021e877..18073048 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +ifeq ($(OS),Windows_NT) +$(error Windows is not supported) +endif + VERSION := 0.22.6 # install directory layout @@ -28,9 +32,7 @@ SONAME_MAJOR := $(word 1,$(subst ., ,$(VERSION))) SONAME_MINOR := $(word 2,$(subst ., ,$(VERSION))) # OS-specific bits -ifeq ($(OS),Windows_NT) - $(error "Windows is not supported") -else ifeq ($(shell uname),Darwin) +ifeq ($(shell uname),Darwin) SOEXT = dylib SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib diff --git a/cli/src/generate/templates/makefile b/cli/src/generate/templates/makefile index 0492ec02..467bd2eb 100644 --- a/cli/src/generate/templates/makefile +++ b/cli/src/generate/templates/makefile @@ -1,3 +1,7 @@ +ifeq ($(OS),Windows_NT) +$(error Windows is not supported) +endif + VERSION := 0.0.1 LANGUAGE_NAME := tree-sitter-PARSER_NAME @@ -37,9 +41,7 @@ ARFLAGS ?= rcs override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC # OS-specific bits -ifeq ($(OS),Windows_NT) - $(error "Windows is not supported") -else ifeq ($(shell uname),Darwin) +ifeq ($(shell uname),Darwin) SOEXT = dylib SOEXTVER_MAJOR = $(SONAME_MAJOR).dylib SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).dylib