2222
2323VERSDIR := v` cut -d. -f1-2 < $( JULIAHOME) /VERSION `
2424
25+ .PHONY : default
2526default : $(JULIA_BUILD_MODE ) # contains either "debug" or "release"
27+
28+ .PHONY : all
2629all : debug release
2730
2831# sort is used to remove potential duplicates
@@ -65,6 +68,7 @@ julia_flisp.boot.inc.phony: julia-deps
6568$(BUILDROOT ) /doc/_build/html/en/index.html : $(shell find $(BUILDROOT ) /base $(BUILDROOT ) /doc \( -path $(BUILDROOT ) /doc/_build -o -path $(BUILDROOT ) /doc/deps -o -name * _constants.jl -o -name * _h.jl -o -name version_git.jl \) -prune -o -type f -print)
6669 @$(MAKE ) docs
6770
71+ .PHONY : julia-symlink
6872julia-symlink : julia-cli-$(JULIA_BUILD_MODE )
6973ifeq ($(OS ) ,WINNT)
7074 printf '@"%%~dp0/%s" %%*\n' "$$(printf "%s\n" '$(call rel_path,$(BUILDROOT),$(JULIA_EXECUTABLE))')" | tr / '\\' > $(BUILDROOT)/julia.bat
@@ -82,13 +86,16 @@ TOP_LEVEL_PKG_LINK_TARGETS := $(addprefix $(build_datarootdir)/julia/,$(TOP_LEVE
8286# Generate symlinks for top level pkgs in usr/share/julia/
8387$(foreach module, $(TOP_LEVEL_PKGS), $(eval $(call symlink_target,$$(JULIAHOME)/$(module),$$(build_datarootdir)/julia,$(module))))
8488
89+ .PHONY : julia-deps
8590julia-deps : | $(DIRS ) $(build_datarootdir ) /julia/base $(build_datarootdir ) /julia/test
8691 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /deps
8792
8893# `julia-stdlib` depends on `julia-deps` so that the fake JLL stdlibs can copy in their Artifacts.toml files.
94+ .PHONY : julia-stdlib
8995julia-stdlib : | $(DIRS ) julia-deps
9096 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /stdlib
9197
98+ .PHONY : julia-base
9299julia-base : julia-deps $(build_sysconfdir ) /julia/startup.jl $(build_man1dir ) /julia.1 $(build_datarootdir ) /julia/julia-config.jl $(build_datarootdir ) /julia/juliac/juliac.jl $(build_datarootdir ) /julia/juliac/abi_export.jl $(build_datarootdir ) /julia/juliac/juliac-buildscript.jl $(build_datarootdir ) /julia/juliac/juliac-trim-base.jl $(build_datarootdir ) /julia/juliac/juliac-trim-stdlib.jl $(build_datarootdir ) /julia/juliac/Artifacts.toml
93100 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /base
94101
@@ -104,33 +111,43 @@ julia-libccalllazybar: julia-deps julia-libccalllazyfoo
104111julia-libllvmcalltest : julia-deps
105112 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /src libllvmcalltest
106113
114+ .PHONY : julia-src-release julia-src-debug
107115julia-src-release julia-src-debug : julia-src-% : julia-deps julia_flisp.boot.inc.phony julia-cli-%
108116 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /src $*
109117
118+ .PHONY : julia-cli-release julia-cli-debug
110119julia-cli-release julia-cli-debug : julia-cli-% : julia-deps
111120 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /cli $*
112121
122+ .PHONY : julia-sysimg-release julia-sysimg-debug
113123julia-sysimg-release julia-sysimg-debug : julia-sysimg-% : julia-src-% $(TOP_LEVEL_PKG_LINK_TARGETS ) julia-stdlib julia-base julia-cli-% | $(build_private_libdir )
114124 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) -f sysimage.mk sysimg-$*
115125
116126# Useful for cross-bootstrapping
127+ .PHONY : julia-sysbase-release julia-sysbase-debug
117128julia-sysbase-release julia-sysbase-debug : julia-sysbase-% : julia-src-% $(TOP_LEVEL_PKG_LINK_TARGETS ) julia-stdlib julia-base julia-cli-% | $(build_private_libdir )
118129 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) -f sysimage.mk sysbase-$*
119130
131+ .PHONY : julia-debug julia-release
120132julia-debug julia-release : julia-% : julia-sysimg-% julia-src-% julia-symlink julia-libccalltest \
121133 julia-libccalllazyfoo julia-libccalllazybar julia-libllvmcalltest julia-base-cache
122134
135+ .PHONY : stdlibs-cache-release stdlibs-cache-debug
123136stdlibs-cache-release stdlibs-cache-debug : stdlibs-cache-% : julia-%
124137 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) -f pkgimage.mk $*
125138
139+ .PHONY : debug release
126140debug release : % : julia-% stdlibs-cache-%
127141
142+ .PHONY : docs
128143docs : julia-sysimg-$(JULIA_BUILD_MODE ) stdlibs-cache-$(JULIA_BUILD_MODE )
129144 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /doc JULIA_EXECUTABLE=' $(call spawn,$(JULIA_EXECUTABLE_$(JULIA_BUILD_MODE))) --startup-file=no'
130145
146+ .PHONY : docs-revise
131147docs-revise :
132148 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /doc JULIA_EXECUTABLE=' $(call spawn,$(JULIA_EXECUTABLE_$(JULIA_BUILD_MODE))) --startup-file=no' revise=true
133149
150+ .PHONY : check-whitespace
134151check-whitespace :
135152ifneq ($(NO_GIT ) , 1)
136153 @# Append the directory containing the julia we just built to the end of `PATH`,
140157 $(warn "Skipping whitespace check because git is unavailable")
141158endif
142159
160+ .PHONY : fix-whitespace
143161fix-whitespace :
144162ifneq ($(NO_GIT ) , 1)
145163 @# Append the directory containing the julia we just built to the end of `PATH`,
149167 $(warn "Skipping whitespace fix because git is unavailable")
150168endif
151169
170+ .PHONY : release-candidate
152171release-candidate : release testall
153172 @$(JULIA_EXECUTABLE ) $(JULIAHOME ) /contrib/add_license_to_files.jl # add license headers
154173 @# Check documentation
@@ -203,6 +222,7 @@ $(build_datarootdir)/julia/%: $(JULIAHOME)/contrib/% | $(build_datarootdir)/juli
203222$(build_depsbindir ) /stringreplace : $(JULIAHOME ) /contrib/stringreplace.c | $(build_depsbindir )
204223 @$(call PRINT_CC, $(HOSTCC ) -o $(build_depsbindir ) /stringreplace $(JULIAHOME ) /contrib/stringreplace.c)
205224
225+ .PHONY : julia-base-cache
206226julia-base-cache : julia-sysimg-$(JULIA_BUILD_MODE ) | $(DIRS ) $(build_datarootdir ) /julia
207227 @JULIA_BINDIR=$(call cygpath_w,$(build_bindir ) ) JULIA_FALLBACK_REPL=1 WINEPATH=" $( call cygpath_w,$( build_bindir) ) ;$$ WINEPATH" \
208228 $(call spawn, $(JULIA_EXECUTABLE ) --startup-file=no $(call cygpath_w,$(JULIAHOME ) /contrib/write_base_cache.jl) \
@@ -325,6 +345,7 @@ define stringreplace
325345endef
326346
327347
348+ .PHONY : install
328349install : $(build_depsbindir ) /stringreplace $(BUILDROOT ) /doc/_build/html/en/index.html
329350 @$(MAKE ) $(QUIET_MAKE ) $(JULIA_BUILD_MODE )
330351 @for subdir in $(bindir ) $(datarootdir ) /julia/stdlib/$(VERSDIR ) $(docdir ) $(man1dir ) $(includedir ) /julia $(libdir ) $(private_libdir ) $(sysconfdir ) $(private_libexecdir ) ; do \
@@ -571,6 +592,7 @@ endif
571592distclean :
572593 -rm -fr $(BUILDROOT ) /julia-* .tar.gz $(BUILDROOT ) /julia* .exe $(BUILDROOT ) /julia-$(JULIA_COMMIT )
573594
595+ .PHONY : binary-dist
574596binary-dist : distclean
575597ifeq ($(USE_SYSTEM_BLAS ) ,0)
576598ifeq ($(ISX86 ) ,1)
617639darwinframework :
618640 $(MAKE ) -C $(JULIAHOME ) /contrib/mac/framework
619641
642+ .PHONY : light-source-dist.tmp
620643light-source-dist.tmp : $(BUILDROOT ) /doc/_build/html/en/index.html
621644ifneq ($(BUILDROOT ) ,$(JULIAHOME ) )
622645 $(error make light-source-dist does not work in out-of-tree builds)
@@ -639,6 +662,7 @@ endif
639662 find doc/_build/html >> light-source-dist.tmp
640663
641664# Make tarball with only Julia code + stdlib tarballs
665+ .PHONY : light-source-dist
642666light-source-dist : light-source-dist.tmp
643667 # Prefix everything with "julia-$(commit-sha)/" or "julia-$(version)/" and then create tarball
644668 # To achieve prefixing, we temporarily create a symlink in the source directory that points back
@@ -648,10 +672,12 @@ light-source-dist: light-source-dist.tmp
648672 tar -cz --no-recursion -T light-source-dist.tmp1 -f julia-$(JULIA_VERSION ) _$(JULIA_COMMIT ) .tar.gz
649673 rm julia-${JULIA_COMMIT}
650674
675+ .PHONY : source-dist
651676source-dist :
652677 @echo \' source-dist\' target is deprecated: use \' full-source-dist\' instead.
653678
654679# Make tarball with Julia code plus all dependencies
680+ .PHONY : full-source-dist
655681full-source-dist : light-source-dist.tmp
656682 # Get all the dependencies downloaded
657683 @$(MAKE ) -C deps getall DEPS_GIT=0 USE_BINARYBUILDER=0
@@ -668,6 +694,7 @@ full-source-dist: light-source-dist.tmp
668694 tar -cz --no-recursion -T full-source-dist.tmp1 -f julia-$(JULIA_VERSION)_$(JULIA_COMMIT)-full.tar.gz
669695 rm julia-${JULIA_COMMIT}
670696
697+ .PHONY : clean
671698clean : | $(CLEAN_TARGETS )
672699 @-$(MAKE ) -C $(BUILDROOT ) /base clean
673700 @-$(MAKE ) -C $(BUILDROOT ) /doc clean
@@ -685,41 +712,40 @@ clean: | $(CLEAN_TARGETS)
685712# Teporarily add this line to the Makefile to remove extras
686713 -rm -fr $(build_datarootdir)/julia/extras
687714
715+ .PHONY : cleanall
688716cleanall : clean
689717 @-$(MAKE ) -C $(BUILDROOT ) /src clean-flisp clean-support
690718 @-$(MAKE ) -C $(BUILDROOT ) /deps clean-libuv
691719 -rm -fr $(build_prefix ) $(build_staging )
692720
721+ .PHONY : distcleanall
693722distcleanall : cleanall
694723 @-$(MAKE ) -C $(BUILDROOT ) /stdlib distclean
695724 @-$(MAKE ) -C $(BUILDROOT ) /deps distcleanall
696725 @-$(MAKE ) -C $(BUILDROOT ) /doc cleanall
697726
698727.FORCE :
699- .PHONY : .FORCE default debug release check-whitespace fix-whitespace release-candidate \
700- julia-debug julia-release julia-stdlib julia-deps julia-deps-libs \
701- julia-cli-release julia-cli-debug julia-src-release julia-src-debug \
702- julia-symlink julia-base julia-sysimg julia-sysimg-ji julia-sysimg-release julia-sysimg-debug \
703- test testall testall1 test \
704- clean distcleanall cleanall $(CLEAN_TARGETS ) \
705- run-julia run-julia-debug run-julia-release run \
706- install binary-dist light-source-dist.tmp light-source-dist \
707- dist full-source-dist source-dist \
708- compile-database
728+ .PHONY : .FORCE
729+
730+ .PHONY : $(CLEAN_TARGETS )
709731
710732# Generate compilation database (leverages existing clang tooling setup)
733+ .PHONY : compile-database
711734compile-database :
712735 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /src compile-database
713736
737+ .PHONY : test
714738test : check-whitespace $(JULIA_BUILD_MODE )
715739 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /test default JULIA_BUILD_MODE=$(JULIA_BUILD_MODE )
716740
741+ .PHONY : testall
717742testall : check-whitespace $(JULIA_BUILD_MODE )
718743 cp $(JULIA_SYSIMG ) $(BUILDROOT ) /local.$(SHLIB_EXT )
719744 $(call spawn,$(JULIA_EXECUTABLE ) -J $(call cygpath_w,$(BUILDROOT ) /local.$(SHLIB_EXT ) ) -e 'true')
720745 rm $(BUILDROOT ) /local.$(SHLIB_EXT )
721746 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /test all JULIA_BUILD_MODE=$(JULIA_BUILD_MODE )
722747
748+ .PHONY : testall1
723749testall1 : check-whitespace $(JULIA_BUILD_MODE )
724750 @env JULIA_CPU_THREADS=1 $(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /test all JULIA_BUILD_MODE=$(JULIA_BUILD_MODE )
725751
@@ -732,7 +758,7 @@ test-revise-%: .FORCE
732758 @$(MAKE ) $(QUIET_MAKE ) -C $(BUILDROOT ) /test revise-$* JULIA_BUILD_MODE=$(JULIA_BUILD_MODE )
733759
734760# download target for some hardcoded windows dependencies
735- .PHONY : win-extras wine_path
761+ .PHONY : win-extras
736762win-extras :
737763 @$(MAKE ) -C $(BUILDROOT ) /deps install-p7zip
738764 mkdir -p $(JULIAHOME ) /dist-extras
0 commit comments