Skip to content

Checkout stable repositories into .generated #1889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions posix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -152,21 +152,21 @@ DPL_DOCS_PATH=dpl-docs
DPL_DOCS=$(DPL_DOCS_PATH)/dpl-docs
[email protected]:data
TMP?=/tmp
GENERATED=.generated
G=$(GENERATED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we just use G and delete GENERATED?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a strong opinion about this, having it like this allows people to overwrite the more expressive GENERATED variable and doesn't cost us too much.
Note that I just moved these two lines up, s.t. the variables are in order (i.e. the are defined before used).

If you or someone else has a stronger opinion about this, let me know and then I will make a PR ;-)


# Last released versions
DMD_LATEST_DIR=${DMD_DIR}-${LATEST}
DMD_LATEST_DIR=$G/${DMD_DIR}-${LATEST}
DMD_LATEST=$(DMD_LATEST_DIR)/generated/$(OS)/release/$(MODEL)/dmd
DRUNTIME_LATEST_DIR=${DRUNTIME_DIR}-${LATEST}
PHOBOS_LATEST_DIR=${PHOBOS_DIR}-${LATEST}
DRUNTIME_LATEST_DIR=$G/${DRUNTIME_DIR}-${LATEST}
PHOBOS_LATEST_DIR=$G/${PHOBOS_DIR}-${LATEST}

# Auto-cloning missing directories
$(shell [ ! -d $(DMD_DIR) ] && git clone --depth=1 ${GIT_HOME}/dmd $(DMD_DIR))
$(shell [ ! -d $(DRUNTIME_DIR) ] && git clone --depth=1 ${GIT_HOME}/druntime $(DRUNTIME_DIR))

################################################################################
# Automatically generated directories
GENERATED=.generated
G=$(GENERATED)
PHOBOS_DIR_GENERATED=$(GENERATED)/phobos-prerelease
PHOBOS_LATEST_DIR_GENERATED=$(GENERATED)/phobos-latest
# The assert_writeln_magic tool transforms all source files from Phobos. Hence
Expand Down Expand Up @@ -574,9 +574,11 @@ $G/twid_latest.ddoc:
# Git rules
################################################################################

../%-${LATEST} :
# Clone snapshots of the latest official release of all main D repositories
$G/%-${LATEST} :
git clone -b v${LATEST} --depth=1 ${GIT_HOME}/$(notdir $*) $@

# Clone all main D repositories
${DMD_DIR} ${DRUNTIME_DIR} ${PHOBOS_DIR} ${TOOLS_DIR} ${INSTALLER_DIR}:
git clone --depth=1 ${GIT_HOME}/$(notdir $(@F)) $@

Expand Down Expand Up @@ -845,7 +847,7 @@ test_dspec: dspec_tester.d $(STABLE_DMD)

test: $(ASSERT_WRITELN_BIN)_test test_dspec test/next_version.sh all
@echo "Searching for trailing whitespace"
@grep -n '[[:blank:]]$$' $$(find . -type f -name "*.dd") ; test $$? -eq 1
@grep -n '[[:blank:]]$$' $$(find . -type f -name "*.dd" | grep -v .generated) ; test $$? -eq 1
@echo "Searching for undefined macros"
@grep -n "UNDEFINED MACRO" $$(find $W -type f -name "*.html" -not -path "$W/phobos/*") ; test $$? -eq 1
@echo "Searching for undefined ddoc"
Expand Down