Skip to content

win32.mak: fix target checkwhitespace#6862

Merged
WalterBright merged 1 commit intodlang:masterfrom
rainers:fix_cws
Jun 14, 2017
Merged

win32.mak: fix target checkwhitespace#6862
WalterBright merged 1 commit intodlang:masterfrom
rainers:fix_cws

Conversation

@rainers
Copy link
Member

@rainers rainers commented Jun 6, 2017

Current version fails if the tools folder already exists:

git clone --depth=1 https://github.com/dlang/tools ..\..\tools
fatal: destination path '..\..\tools' already exists and is not an empty directory.

Also removes references to non-existing files and adds more files to be checked.

@CyberShadow
Copy link
Member

Current version fails if the tools folder already exists:

Why would the tools directory exist but not contain a checkwhitespace.d? An old checkout? In which case, allowing the git command to fail is not going to help move things along, will it?

@rainers
Copy link
Member Author

rainers commented Jun 9, 2017

Why would the tools directory exist but not contain a checkwhitespace.d?

The git command is executed unconditionally by DM make and fails if the directory exists and is non-empty. Ignoring the result forwards the error checking to the compilation of checkwhitespace.d: if it actually doesn't exist dmd will complain.

@CyberShadow
Copy link
Member

The git command is executed unconditionally by DM make and fails if the directory exists and is non-empty.

Huh, is that so? Since the $(TOOLS_DIR)\checkwhitespace.d rule has no dependencies, wouldn't it be executed iff the file doesn't exist?

@rainers
Copy link
Member Author

rainers commented Jun 9, 2017

Every other make behaves as expected, but not the Digital Mars version:

c:\tmp\make>type Makefile

Makefile:
        echo $@ does not exist!?

c:\tmp\make>c:\l\d\dmd2.074\dmd2\windows\bin\make.exe
echo Makefile does not exist!?
Makefile does not exist!?

c:\tmp\make>make
make: `makefile' is up to date.

c:\tmp\make>nmake

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

'Makefile' is up-to-date

@CyberShadow
Copy link
Member

Huh. Well, thanks for the clarification.

@WalterBright WalterBright merged commit b1fa04d into dlang:master Jun 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants