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

Create SWI-Prolog pack (solves #4) #24

Merged
merged 6 commits into from Jul 14, 2018
Merged

Create SWI-Prolog pack (solves #4) #24

merged 6 commits into from Jul 14, 2018

Conversation

fnogatz
Copy link
Contributor

@fnogatz fnogatz commented Jul 4, 2018

I wanted to use APE as a pack in SWI-Prolog. Following the instructions, I did the following:

  • 25f56c0: Added a /pack.pl. You should adapt it to your needs. Additional fields are possible, they are documented here.
  • 46e3d80: All Prolog files except for /runape.pl have been moved into a new /prolog directory. The original /get_ape_results.pl has been moved to /prolog/ape.pl and is the entry point for SWI-Prolog's library(ape).
  • e49824a: All references have been adapted accordingly.
  • cd39c61: Just for compatibility, I re-added the file /get_ape_results.pl which re-exports all of the predicates of /prolog/ape.pl.
  • 63cf1ed: SWI-Prolog runs post-installation scripts on installation: make all, make check and make install. They have been added to the Makefile.

Before merging this, you should change /pack.pl to your needs. Thereafter, it should be possible to install APE by calling ?- pack_install('https://github.com/Attempto/APE.git')., although I am not sure about the capitalized APE in the repository's name (since we are later using it with ?- use_module(library(ape)).).

I am not sure about /runape.pl. I had the impression it was replaced some time ago with ape.pl, but /run.sh is still referencing it, while the Makefile and /make_exe.sh refer to different files.

This addresses #4.

@fnogatz
Copy link
Contributor Author

fnogatz commented Jul 6, 2018

In d02da96, I had to change the version number to 6.7.131003 instead of 6.7-131003, which is not valid according to SWI-Prolog's spec.

Kaljurand added a commit that referenced this pull request Jul 7, 2018
Fixes #23

Note that ape.pl and Makefile also contain references to
local/1 and global/1 but these were not changed to avoid creating
conflicts with #24

Also, both build scripts were simplified to remove
search of SWI-Prolog by obsolete names.
@Kaljurand
Copy link
Member

Thanks! I did some casual testing and I think this could be merged, provided that we do some immediate follow-up actions, e.g.:

  • update paths in examples/, tests/, tools/, Makefile, make_exe.*, run.sh, runape.pl etc. to reflect the move of the main files into prolog/
  • update README that the new way to compile plp-files and ape.exe is now "make install". Also, add instructions on installing APE as a SWI-Prolog package.
  • possibly remove "make_exe.sh" assuming that any Unix has "make"
  • tag future releases with labels that contain only dots (e.g. "6.7.180708")

@tkuhn any other comments?

@tkuhn
Copy link
Member

tkuhn commented Jul 9, 2018

Sounds good. I will try to find time to look into it too, but I am not sure when that will happen. In the meantime, feel free to move ahead with this.

@Kaljurand Kaljurand merged commit 23255fa into Attempto:master Jul 14, 2018
Kaljurand added a commit that referenced this pull request Jul 14, 2018
@fnogatz fnogatz deleted the prolog-pack branch July 25, 2018 16:33
Kaljurand added a commit that referenced this pull request Aug 15, 2018
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.

None yet

3 participants