mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
Remove deprecated compiler Makefiles
This commit is contained in:
parent
732090485d
commit
c847abc42a
11 changed files with 35 additions and 669 deletions
|
@ -1497,7 +1497,7 @@ string detectHostCxx()
|
|||
alias allRepoSources = memoize!(() => srcDir.dirEntries("*.{d,h,di}", SpanMode.depth).map!(e => e.name).array);
|
||||
|
||||
/// Returns: all make/build files
|
||||
alias buildFiles = memoize!(() => "win32.mak posix.mak osmodel.mak build.d".split().map!(e => srcDir.buildPath(e)).array);
|
||||
alias buildFiles = memoize!(() => "osmodel.mak build.d".split().map!(e => srcDir.buildPath(e)).array);
|
||||
|
||||
/// Returns: all sources used in the build
|
||||
alias allBuildSources = memoize!(() => buildFiles
|
||||
|
|
|
@ -1,217 +0,0 @@
|
|||
################################################################################
|
||||
# Important variables:
|
||||
# --------------------
|
||||
#
|
||||
# HOST_CXX: Host C++ compiler to use (g++,clang++)
|
||||
# HOST_DMD: Host D compiler to use for bootstrapping
|
||||
# AUTO_BOOTSTRAP: Enable auto-boostrapping by downloading a stable DMD binary
|
||||
# INSTALL_DIR: Installation folder to use
|
||||
# MODEL: Target architecture to build for (32,64) - defaults to the host architecture
|
||||
#
|
||||
################################################################################
|
||||
# Build modes:
|
||||
# ------------
|
||||
# BUILD: release (default) | debug (enabled a build with debug instructions)
|
||||
#
|
||||
# Opt-in build features:
|
||||
#
|
||||
# ENABLE_RELEASE: Optimized release build
|
||||
# ENABLE_DEBUG: Add debug instructions and symbols (set if ENABLE_RELEASE isn't set)
|
||||
# ENABLE_ASSERTS: Don't use -release if ENABLE_RELEASE is set
|
||||
# ENABLE_LTO: Enable link-time optimizations
|
||||
# ENABLE_UNITTEST: Build dmd with unittests (sets ENABLE_COVERAGE=1)
|
||||
# ENABLE_PROFILE: Build dmd with a profiling recorder (D)
|
||||
# ENABLE_COVERAGE Build dmd with coverage counting
|
||||
# ENABLE_SANITIZERS Build dmd with sanitizer (e.g. ENABLE_SANITIZERS=address,undefined)
|
||||
#
|
||||
# Targets
|
||||
# -------
|
||||
#
|
||||
# all Build dmd
|
||||
# unittest Run all unittest blocks
|
||||
# cxx-unittest Check conformance of the C++ headers
|
||||
# build-examples Build DMD as library examples
|
||||
# clean Remove all generated files
|
||||
# man Generate the man pages
|
||||
# checkwhitespace Checks for trailing whitespace and tabs
|
||||
# zip Packs all sources into a ZIP archive
|
||||
# gitzip Packs all sources into a ZIP archive
|
||||
# install Installs dmd into $(INSTALL_DIR)
|
||||
################################################################################
|
||||
|
||||
$(warning ===== DEPRECATION NOTICE ===== )
|
||||
$(warning ===== DEPRECATION: posix.mak is deprecated. Please use src/build.d instead.)
|
||||
$(warning ============================== )
|
||||
|
||||
BUILD_JOBS_ARG=
|
||||
ifneq (,$(BUILD_JOBS))
|
||||
BUILD_JOBS_ARG = -j$(BUILD_JOBS)
|
||||
endif
|
||||
|
||||
# Forward D compiler bootstrapping to bootstrap.sh
|
||||
ifneq (,$(AUTO_BOOTSTRAP))
|
||||
default:
|
||||
@bash ./bootstrap.sh $(BUILD_JOBS_ARG)
|
||||
.DEFAULT:
|
||||
@bash ./bootstrap.sh "$@" $(BUILD_JOBS_ARG)
|
||||
else
|
||||
|
||||
# get OS and MODEL
|
||||
include osmodel.mak
|
||||
|
||||
# Default to a release built, override with BUILD=debug
|
||||
ifeq (,$(BUILD))
|
||||
BUILD=release
|
||||
endif
|
||||
|
||||
ifneq ($(BUILD),release)
|
||||
ifneq ($(BUILD),debug)
|
||||
$(error Unrecognized BUILD=$(BUILD), must be 'debug' or 'release')
|
||||
endif
|
||||
endif
|
||||
|
||||
INSTALL_DIR=../../install
|
||||
D = dmd
|
||||
|
||||
GENERATED = ../../generated
|
||||
G = $(GENERATED)/$(OS)/$(BUILD)/$(MODEL)
|
||||
$(shell mkdir -p $G)
|
||||
|
||||
ifeq (osx,$(OS))
|
||||
export MACOSX_DEPLOYMENT_TARGET=10.9
|
||||
endif
|
||||
|
||||
HOST_CXX?=c++
|
||||
# compatibility with old behavior
|
||||
ifneq ($(HOST_CC),)
|
||||
$(warning ===== WARNING: Please use HOST_CXX=$(HOST_CC) instead of HOST_CC=$(HOST_CC). =====)
|
||||
HOST_CXX=$(HOST_CC)
|
||||
endif
|
||||
|
||||
HOST_DC?=
|
||||
ifneq (,$(HOST_DC))
|
||||
$(warning ========== Use HOST_DMD instead of HOST_DC ========== )
|
||||
HOST_DMD=$(HOST_DC)
|
||||
endif
|
||||
|
||||
# No bootstrap, a $(HOST_DMD) installation must be available
|
||||
HOST_DMD?=dmd
|
||||
HOST_DMD_PATH=$(abspath $(shell which $(HOST_DMD)))
|
||||
ifeq (,$(HOST_DMD_PATH))
|
||||
$(error '$(HOST_DMD)' not found, get a D compiler or make AUTO_BOOTSTRAP=1)
|
||||
endif
|
||||
HOST_DMD_RUN:=$(HOST_DMD)
|
||||
|
||||
RUN_BUILD = $(GENERATED)/build OS="$(OS)" BUILD="$(BUILD)" MODEL="$(MODEL)" HOST_DMD="$(HOST_DMD)" CXX="$(HOST_CXX)" AUTO_BOOTSTRAP="$(AUTO_BOOTSTRAP)" DOCDIR="$(DOCDIR)" STDDOC="$(STDDOC)" DOC_OUTPUT_DIR="$(DOC_OUTPUT_DIR)" MAKE="$(MAKE)" VERBOSE="$(VERBOSE)" ENABLE_RELEASE="$(ENABLE_RELEASE)" ENABLE_DEBUG="$(ENABLE_DEBUG)" ENABLE_ASSERTS="$(ENABLE_ASSERTS)" ENABLE_LTO="$(ENABLE_LTO)" ENABLE_UNITTEST="$(ENABLE_UNITTEST)" ENABLE_PROFILE="$(ENABLE_PROFILE)" ENABLE_COVERAGE="$(ENABLE_COVERAGE)" DFLAGS="$(DFLAGS)" $(BUILD_JOBS_ARG)
|
||||
######## Begin build targets
|
||||
|
||||
all: dmd
|
||||
.PHONY: all
|
||||
|
||||
dmd: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
.PHONY: dmd
|
||||
|
||||
$(GENERATED)/build: build.d $(HOST_DMD_PATH)
|
||||
$(HOST_DMD_RUN) -of$@ -g build.d
|
||||
|
||||
toolchain-info: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
# Run header test on linux
|
||||
ifeq ($(OS)$(MODEL),linux64)
|
||||
HEADER_TEST=cxx-headers-test
|
||||
endif
|
||||
|
||||
unittest: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
######## Manual cleanup
|
||||
|
||||
clean:
|
||||
rm -Rf $(GENERATED)
|
||||
|
||||
FORCE: ;
|
||||
|
||||
################################################################################
|
||||
# Generate the man pages
|
||||
################################################################################
|
||||
|
||||
DMD_MAN_PAGE = $(GENERATED)/docs/man/man1/dmd.1
|
||||
|
||||
$(GENERATED)/docs/%: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
man: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
######################################################
|
||||
|
||||
install: $(GENERATED)/build $(DMD_MAN_PAGE)
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
######################################################
|
||||
|
||||
checkwhitespace: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
######################################################
|
||||
# DScanner
|
||||
######################################################
|
||||
|
||||
# runs static code analysis with Dscanner
|
||||
style: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
######################################################
|
||||
|
||||
cxx-unittest: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
######################################################
|
||||
|
||||
zip: $(GENERATED)/build
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
######################################################
|
||||
|
||||
gitzip:
|
||||
git archive --format=zip HEAD > $(ZIPFILE)
|
||||
|
||||
######################################################
|
||||
# Default rule to forward targets to build.d
|
||||
|
||||
$G/%: $(GENERATED)/build FORCE
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
################################################################################
|
||||
# DDoc documentation generation
|
||||
################################################################################
|
||||
|
||||
# BEGIN fallbacks for old variable names
|
||||
# should be removed after https://github.com/dlang/dlang.org/pull/1581
|
||||
# has been pulled
|
||||
DOCSRC=../dlang.org
|
||||
STDDOC=$(DOCFMT)
|
||||
DOC_OUTPUT_DIR=$(DOCDIR)
|
||||
# END fallbacks
|
||||
|
||||
# DDoc html generation - this is very similar to the way the documentation for
|
||||
# Phobos is built
|
||||
ifneq ($(DOCSRC),)
|
||||
|
||||
html: $(GENERATED)/build FORCE
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
endif
|
||||
|
||||
######################################################
|
||||
|
||||
.DELETE_ON_ERROR: # GNU Make directive (delete output files on error)
|
||||
|
||||
# Dont run targets in parallel because this makefile is just a thin wrapper
|
||||
# for build.d and multiple invocations might stomp on each other.
|
||||
# (build.d employs it's own parallelization)
|
||||
.NOTPARALLEL:
|
||||
|
||||
endif
|
|
@ -1,167 +0,0 @@
|
|||
# DEPRECATED - use src\build.d
|
||||
#_ win32.mak
|
||||
#
|
||||
# Copyright (C) 1999-2023 by The D Language Foundation, All Rights Reserved
|
||||
# written by Walter Bright
|
||||
# https://www.digitalmars.com
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# https://www.boost.org/LICENSE_1_0.txt
|
||||
# https://github.com/dlang/dmd/blob/master/src/win32.mak
|
||||
#
|
||||
# Dependencies:
|
||||
#
|
||||
# Digital Mars C++ toolset
|
||||
# https://www.digitalmars.com/download/freecompiler.html
|
||||
#
|
||||
# win32.mak (this file) - requires Digital Mars Make ($DM_HOME\dm\bin\make.exe)
|
||||
# https://www.digitalmars.com/ctg/make.html
|
||||
#
|
||||
# Configuration:
|
||||
#
|
||||
# The easiest and recommended way to configure this makefile is to add
|
||||
# $DM_HOME\dm\bin to your PATH environment to automatically find make.
|
||||
# Set HOST_DC to point to your installed D compiler.
|
||||
#
|
||||
# Targets:
|
||||
#
|
||||
# defaulttarget - debug dmd
|
||||
# release - release dmd (with clean)
|
||||
# trace - release dmd with tracing options enabled
|
||||
# clean - delete all generated files except target binary
|
||||
# install - copy build targets to install directory
|
||||
# install-clean - delete all files in the install directory
|
||||
# zip - create ZIP archive of source code
|
||||
#
|
||||
# dmd - release dmd (legacy target)
|
||||
# debdmd - debug dmd
|
||||
# reldmd - release dmd
|
||||
|
||||
############################### Configuration ################################
|
||||
|
||||
# fixed model for win32.mak, overridden by win64.mak
|
||||
MODEL=32
|
||||
BUILD=release
|
||||
OS=windows
|
||||
|
||||
##### Directories
|
||||
|
||||
# DMD source directories
|
||||
D=dmd
|
||||
|
||||
# Generated files directory
|
||||
GEN = ..\..\generated
|
||||
G = $(GEN)\$(OS)\$(BUILD)\$(MODEL)
|
||||
|
||||
##### Tools
|
||||
|
||||
# Make program
|
||||
MAKE=make
|
||||
# Delete file(s)
|
||||
DEL=del
|
||||
# Remove directory
|
||||
RD=rmdir
|
||||
|
||||
##### User configuration switches
|
||||
|
||||
# Target name
|
||||
TARGET=$G\dmd
|
||||
TARGETEXE=$(TARGET).exe
|
||||
|
||||
# Recursive make
|
||||
DMDMAKE=$(MAKE) -fwin32.mak MAKE="$(MAKE)" HOST_DC="$(HOST_DC)" MODEL=$(MODEL) CC="$(CC)" VERBOSE=$(VERBOSE)
|
||||
|
||||
############################### Rule Variables ###############################
|
||||
|
||||
RUN_BUILD=$(GEN)\build.exe --called-from-make "OS=$(OS)" "BUILD=$(BUILD)" "MODEL=$(MODEL)" "HOST_DMD=$(HOST_DMD)" "HOST_DC=$(HOST_DC)" "MAKE=$(MAKE)" "VERBOSE=$(VERBOSE)" "ENABLE_RELEASE=$(ENABLE_RELEASE)" "ENABLE_DEBUG=$(ENABLE_DEBUG)" "ENABLE_ASSERTS=$(ENABLE_ASSERTS)" "ENABLE_LTO=$(ENABLE_LTO)" "ENABLE_UNITTEST=$(ENABLE_UNITTEST)" "ENABLE_PROFILE=$(ENABLE_PROFILE)" "ENABLE_COVERAGE=$(ENABLE_COVERAGE)" "DFLAGS=$(DFLAGS)"
|
||||
|
||||
############################## Release Targets ###############################
|
||||
|
||||
defaulttarget: $G debdmd
|
||||
|
||||
dmd: $G reldmd
|
||||
|
||||
$(GEN)\build.exe: build.d $(HOST_DMD_PATH)
|
||||
echo "===== DEPRECATION NOTICE ====="
|
||||
echo "===== DEPRECATION: win32.mak is deprecated. Please use src\build.d instead."
|
||||
echo "=============================="
|
||||
$(HOST_DC) -m$(MODEL) -of$@ -g build.d
|
||||
|
||||
release:
|
||||
$(DMDMAKE) clean
|
||||
$(DEL) $(TARGETEXE)
|
||||
$(DMDMAKE) reldmd
|
||||
$(DMDMAKE) clean
|
||||
|
||||
$G :
|
||||
if not exist "$G" mkdir $G
|
||||
|
||||
check-host-dc:
|
||||
@cmd /c if "$(HOST_DC)" == "" (echo Error: Environment variable HOST_DC is not set & exit 1)
|
||||
|
||||
debdmd: check-host-dc debdmd-make
|
||||
|
||||
debdmd-make:
|
||||
$(DMDMAKE) "ENABLE_DEBUG=1" $(TARGETEXE)
|
||||
|
||||
reldmd: check-host-dc reldmd-make
|
||||
|
||||
reldmd-make: $(GEN)\build.exe
|
||||
$(RUN_BUILD) "ENABLE_RELEASE=1" $(TARGETEXE)
|
||||
|
||||
reldmd-asserts: check-host-dc reldmd-asserts-make
|
||||
|
||||
reldmd-asserts-make: $(GEN)\build.exe
|
||||
$(RUN_BUILD) "ENABLE_RELEASE=1" "ENABLE_ASSERTS=1" $(TARGETEXE)
|
||||
|
||||
# Don't use ENABLE_RELEASE=1 to avoid -inline
|
||||
profile:
|
||||
$(DMDMAKE) "ENABLE_PROFILE=1" "DFLAGS=-O -release" $(TARGETEXE)
|
||||
|
||||
trace: debdmd-make
|
||||
|
||||
unittest: $(GEN)\build.exe
|
||||
$(RUN_BUILD) unittest
|
||||
|
||||
################################ Libraries ##################################
|
||||
|
||||
$(TARGETEXE): $(GEN)\build.exe
|
||||
$(RUN_BUILD) $@
|
||||
copy $(TARGETEXE) .
|
||||
|
||||
############################ Maintenance Targets #############################
|
||||
|
||||
clean:
|
||||
$(RD) /s /q $(GEN)
|
||||
$(DEL) $D\msgs.h $D\msgs.c
|
||||
$(DEL) $(TARGETEXE) *.map *.obj *.exe
|
||||
|
||||
install: detab install-copy
|
||||
|
||||
install-copy: $(GEN)\build.exe
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
install-clean:
|
||||
$(DEL) /s/q $(INSTALL)\*
|
||||
$(RD) /s/q $(INSTALL)
|
||||
|
||||
detab: $(GEN)\build.exe
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
tolf: $(GEN)\build.exe
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
zip: detab tolf $(GEN)\build.exe
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
checkwhitespace: $(GEN)\build.exe
|
||||
$(RUN_BUILD) $@
|
||||
|
||||
######################################################
|
||||
|
||||
..\changelog.html: ..\changelog.dd
|
||||
$(HOST_DC) -Df$@ $<
|
||||
|
||||
############################## Generated Source ##############################
|
||||
|
||||
$G\VERSION : ..\VERSION $G
|
||||
copy ..\VERSION $@
|
|
@ -1,59 +0,0 @@
|
|||
# DEPRECATED - use src\build.d
|
||||
#_ win64.mak
|
||||
#
|
||||
# Supports same targets as win32.mak.
|
||||
|
||||
############################### Configuration ################################
|
||||
|
||||
MAKE=make
|
||||
HOST_DC=dmd
|
||||
MODEL=64
|
||||
BUILD=release
|
||||
OS=windows
|
||||
|
||||
################################### Rules ####################################
|
||||
|
||||
.d.exe:
|
||||
$(HOST_DC) -g -of$@ $<
|
||||
|
||||
D=dmd
|
||||
GEN = ..\..\generated
|
||||
G = $(GEN)\$(OS)\$(BUILD)\$(MODEL)
|
||||
DEPENDENCIES=vcbuild\msvc-lib.exe $G
|
||||
|
||||
MAKE_WIN32=$(MAKE) -f win32.mak "OS=$(OS)" "BUILD=$(BUILD)" "MODEL=$(MODEL)" "HOST_DMD=$(HOST_DMD)" "HOST_DC=$(HOST_DC)" "MAKE=$(MAKE)" "VERBOSE=$(VERBOSE)" "ENABLE_RELEASE=$(ENABLE_RELEASE)" "ENABLE_DEBUG=$(ENABLE_DEBUG)" "ENABLE_ASSERTS=$(ENABLE_ASSERTS)" "ENABLE_LTO=$(ENABLE_LTO)" "ENABLE_UNITTEST=$(ENABLE_UNITTEST)" "ENABLE_PROFILE=$(ENABLE_PROFILE)" "ENABLE_COVERAGE=$(ENABLE_COVERAGE)" "DFLAGS=$(DFLAGS)" "GEN=$(GEN)" "G=$G" "LIB=vcbuild\msvc-lib"
|
||||
|
||||
################################## Targets ###################################
|
||||
|
||||
defaulttarget : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
release : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
trace : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
clean :
|
||||
del /s /q $(DEPENDENCIES) dmd.pdb
|
||||
$(MAKE_WIN32) $@
|
||||
install : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
install-clean : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
zip : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
dmd : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
debdmd : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
reldmd : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
reldmd-asserts : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
unittest : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
detab : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
tolf : $(DEPENDENCIES)
|
||||
$(MAKE_WIN32) $@
|
||||
|
||||
$G:
|
||||
if not exist "$G" mkdir $G
|
Loading…
Add table
Add a link
Reference in a new issue