Skip to content

Commit

Permalink
MinGW Makefileにbregonigとctagsのzip展開を組み込む
Browse files Browse the repository at this point in the history
  • Loading branch information
berryzplus committed May 9, 2021
1 parent b670708 commit 6b9d77b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ci/azure-pipelines/template.steps.install-mingw-w64-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
# なし
#############################################################################################################
steps:
- script: C:\msys64\usr\bin\bash --login -c "pacman -S --noconfirm p7zip"
displayName: install 7zip

- script: C:\msys64\usr\bin\bash --login -c "pacman -S --noconfirm mingw-w64-x86_64-gtest"
displayName: install MinGW-w64-gtest
14 changes: 13 additions & 1 deletion sakura_core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ DIRSEP = $(strip \ )
DEVNULL = NUL
ICONV = C:\msys64\usr\bin\iconv.exe
SED = C:\msys64\usr\bin\sed.exe
P7Z = "C:\Program Files\7-Zip\7z.exe"
else
# If unix-like shell is used.
MKDIR = mkdir -p
Expand All @@ -39,6 +40,7 @@ DIRSEP = /
DEVNULL = /dev/null
ICONV = iconv
SED = sed
P7Z = 7z
endif

ifndef PREFIX
Expand Down Expand Up @@ -100,6 +102,8 @@ LIBS= \
$(MYLIBS)

exe= $(or $(OUTDIR),.)/sakura.exe
bregonig= $(or $(OUTDIR),.)/bregonig.dll
ctags= $(or $(OUTDIR),.)/ctags.exe

SRCS = $(wildcard $(SRCDIR)/*.cpp) \
$(wildcard $(SRCDIR)/*/*.cpp) \
Expand All @@ -120,11 +124,19 @@ GENERATED_FILES= \
HEADERMAKETOOLDIR= $(SRCDIR)/../HeaderMake
HEADERMAKE= $(or $(OUTDIR),$(HEADERMAKETOOLDIR))/HeaderMake.exe

all: $(exe)
all: $(exe) \
$(bregonig) \
$(ctags)

$(exe): $(OBJS) sakura_rc.o
$(CXX) -o $@ $(OBJS) sakura_rc.o $(LIBS)

$(bregonig): ../installer/externals/bregonig/bron420.zip
$(P7Z) e $< -o$(@D) x64/$(@F)

$(ctags): ../installer/externals/universal-ctags/ctags-2020-01-12_feffe43a-x64.zip
$(P7Z) e $< -o$(@D) $(@F)

Funccode_define.h: Funccode_x.hsrc $(HEADERMAKE)
$(HEADERMAKE) -in=$< -out=$@ -mode=define

Expand Down

0 comments on commit 6b9d77b

Please sign in to comment.