Skip to content
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

Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake #8267

Merged
merged 26 commits into from
Oct 5, 2019

Conversation

JackBoosY
Copy link
Contributor

@JackBoosY JackBoosY commented Sep 20, 2019

For Windows:

  • support make using yasm
    support nmake to handle makefile will support this in the future.
  • support nmake to handle makefile.vc

For UNIX:

  • support make.

Progress:

  • add vcpkg_configure_make
  • add vcpkg_build_make
  • add vcpkg_install_make
  • add vcpkg_build_nmake
  • add vcpkg_install_nmake
  • test in windows(make)
    test in windows(nmake makefile) will support this in the future.
  • test in windows(nmake makefile.vc)
  • test in linux
  • update documentation

@JackBoosY JackBoosY added info:internal This PR or Issue was filed by the vcpkg team. wip labels Sep 20, 2019
@Neumann-A
Copy link
Contributor

Add an option to use jom instead of nmake? (I should not be the person to write this since I always have problems with jom on my main pc but whatever....)

@JackBoosY
Copy link
Contributor Author

@Neumann-A I considered jom, but we already have vcpkg_build_qmake.cmake, so if it is reasonable, I will add it in the future.

@MVoz
Copy link
Contributor

MVoz commented Sep 21, 2019

looking ahead, you can see an example of the assembly
for example TCL
https://github.com/tcltk/tcl

Copy link
Contributor

@MVoz MVoz left a comment

Choose a reason for hiding this comment

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

example TCL

vcpkg_download_distfile(ARCHIVE
    URLS "https://prdownloads.sourceforge.net/tcl/tcl8.6.9-src.tar.gz"
    FILENAME "tcl8.6.9-src.tar.gz"
    SHA512 707fc0fb4f45c85e8f21692e5035d727cde27d87a2e1cd2e748ad373ebd3517aeca25ecaef3382a2f0e0a1feff96ce94a62b87abcf085e1a0afe2a23ef460112
)

vcpkg_extract_source_archive_ex(
    OUT_SOURCE_PATH SOURCE_PATH
    ARCHIVE ${ARCHIVE}
)

if(VCPKG_TARGET_ARCHITECTURE MATCHES "x64")
    set(MACHINE_STR AMD64)
else()
    set(MACHINE_STR IX86)
endif()

vcpkg_configure_make(
    SOURCE_PATH ${SOURCE_PATH}
    GENERATOR "nmake"
    PROJECT_SUBPATH "/win"
    PROJECT_PATH "makefile.vc"
    OPTIONS
        MACHINE=${MACHINE_STR}
    OPTIONS_DEBUG
        OPTS=symbols #symbols - debug version
    POSTRUN_SHELL_RELEASE
        INSTALLDIR=${CURRENT_PACKAGES_DIR} install
    POSTRUN_SHELL_DEBUG
        OPTS=symbols INSTALLDIR=${CURRENT_PACKAGES_DIR}/debug install
)

it seems everything works, compiles and installs)
with my edits

#vcpkg_install_make() # <<-- the script does not work #NMake

I don't quite understand the logic of NMake in vcpkg_configure_make when there is vcpkg_build_make

can NMake is to move fully in vcpkg_build_make ?

scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
scripts/cmake/vcpkg_configure_make.cmake Outdated Show resolved Hide resolved
@JackBoosY
Copy link
Contributor Author

JackBoosY commented Sep 24, 2019

make(linux)/nmake(windows) are okay now, and blocking in make(windows), seems to require passing target/host/build in ./configure.
Can anyone help me?

@JackBoosY
Copy link
Contributor Author

JackBoosY commented Sep 24, 2019

I suddenly realized that mixing configure/makefile with makefile.vc is a bad idea. Because using nmake in windows to handle makefile and makefile.vc will appear ambiguous.
Maybe we should separate vcpkg_build_nmake/vcpkg_install_nmake.
This is indeed over-engineered.

@JackBoosY JackBoosY changed the title Add function vcpkg_configure_make/vcpkg_build_make Add function vcpkg_configure_make/vcpkg_build_make/vcpkg_install_make/vcpkg_build_nmake/vcpkg_install_nmake Sep 25, 2019
@MVoz
Copy link
Contributor

MVoz commented Sep 26, 2019

are radical changes planned? or can stamp ports)))
https://github.com/krb5/krb5/tree/master/src/windows

@JackBoosY
Copy link
Contributor Author

@voskrese There are fewer ports using make or nmake, so I plan to update these ports later.

@JackBoosY
Copy link
Contributor Author

Finally, all the work is done (except for the nmake makefile).

Copy link
Contributor

@cbezault cbezault left a comment

Choose a reason for hiding this comment

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

I don't see anything especially objectionable besides the fact we're not running make in parallel. Waiting on @vicroms more thorough review.

scripts/cmake/vcpkg_build_make.cmake Outdated Show resolved Hide resolved
@cbezault
Copy link
Contributor

I just merged a TCL port, I guess I should have preferred this one...

@JackBoosY
Copy link
Contributor Author

@cbezault #8402 is upgrading this.

@cenit
Copy link
Contributor

cenit commented Sep 30, 2019

May I ask you what’s the meaning of

support make using yasm

Is yasm supporting makefiles now in a more compatible windows way than nmake? I don’t know. I am wondering because that would be great news?!?
Thanks :)

@MVoz
Copy link
Contributor

MVoz commented Oct 5, 2019

@cbezault
why isn't the merger happening?

either close or merge and so on with the rest, many edits are simply outdated

Pull requests [138]

@cbezault
Copy link
Contributor

cbezault commented Oct 5, 2019

@voskrese, I've moved on from this project in an official capacity. I'm just finishing up one more feature which is going to be useful for the ci. I'm also going to be in charge of the macos infrastructure for the foreseeable future. I'm just responding to/working on PRs I'm interested in outside of work. @dan-shaw, @grdowns and @vicroms can still help you.

On another note jack is on vacation until next week and I think we want to talk to him about something before merging this.

@cbezault
Copy link
Contributor

cbezault commented Oct 5, 2019

Well, I think this PR is ready.

@cbezault cbezault merged commit ad493fd into microsoft:master Oct 5, 2019
@JackBoosY JackBoosY deleted the dev/jack/support_make branch October 8, 2019 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info:internal This PR or Issue was filed by the vcpkg team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants