Skip to content

Commit

Permalink
[make] Clean up haxelib build output
Browse files Browse the repository at this point in the history
  • Loading branch information
tobil4sk committed Sep 4, 2024
1 parent 2df5372 commit a502318
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,26 +105,26 @@ copy_haxetoolkit: /cygdrive/c/HaxeToolkit/haxe/haxe.exe
endif

HAXE_STD_PATH=$(CURDIR)/std
HAXELIB_SRC_PATH=$(CURDIR)/extra/haxelib_src
HAXELIB_SRC_PATH=extra/haxelib_src

$(HAXELIB_SRC_PATH)/haxelib_hxb.zip:
HAXE_STD_PATH=$(HAXE_STD_PATH) $(CURDIR)/$(HAXE_OUTPUT) --cwd $(HAXELIB_SRC_PATH) \
HAXE_STD_PATH=$(HAXE_STD_PATH) ./$(HAXE_OUTPUT) --cwd $(HAXELIB_SRC_PATH) \
each.hxml --interp haxelib.client.Main --hxb haxelib_hxb.zip

HAXELIB_INTERP=HAXE_STD_PATH=$(HAXE_STD_PATH) $(CURDIR)/$(HAXE_OUTPUT) \
HAXELIB_INTERP=HAXE_STD_PATH=./std ./$(HAXE_OUTPUT) \
--hxb-lib $(HAXELIB_SRC_PATH)/haxelib_hxb.zip --run haxelib.client.Main

haxelib_hxcpp: $(HAXELIB_SRC_PATH)/haxelib_hxb.zip
$(HAXELIB_INTERP) config > /dev/null || $(HAXELIB_INTERP) newrepo
$(HAXELIB_INTERP) path hxcpp > /dev/null || \
($(HAXELIB_INTERP) git hxcpp https://github.com/HaxeFoundation/hxcpp.git && \
hxcpp_path=`$(HAXELIB_INTERP) libpath hxcpp | tr -d '\r'` && \
$(CURDIR)/$(HAXE_OUTPUT) --cwd $$hxcpp_path/tools/hxcpp compile.hxml)
./$(HAXE_OUTPUT) --cwd $$hxcpp_path/tools/hxcpp compile.hxml)

# haxelib should depends on haxe, but we don't want to do that...
# since haxelib isn't available in PATH yet, we have to pass -D no-compilation and build manually
haxelib: $(HAXELIB_SRC_PATH)/haxelib_hxb.zip haxelib_hxcpp
HAXE_STD_PATH=$(HAXE_STD_PATH) $(CURDIR)/$(HAXE_OUTPUT) --cwd $(HAXELIB_SRC_PATH) \
HAXE_STD_PATH=$(HAXE_STD_PATH) ./$(HAXE_OUTPUT) --cwd $(HAXELIB_SRC_PATH) \
client_cpp.hxml -D destination=../../../../$(HAXELIB_OUTPUT) -D no-compilation
$(HAXELIB_INTERP) --cwd $(HAXELIB_SRC_PATH)/bin/cpp run hxcpp Build.xml haxe

Expand Down
1 change: 0 additions & 1 deletion Makefile.win
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ include Makefile
HAXE_OUTPUT=haxe.exe
HAXELIB_OUTPUT=haxelib.exe
HAXE_STD_PATH=$(shell cygpath -m "$(CURDIR)/std")
HAXELIB_SRC_PATH=$(shell cygpath -m "$(CURDIR)/extra/haxelib_src")
PREBUILD_OUTPUT=prebuild.exe
EXTENSION=.exe
PACKAGE_SRC_EXTENSION=.zip
Expand Down

0 comments on commit a502318

Please sign in to comment.