-
Notifications
You must be signed in to change notification settings - Fork 471
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
Improve support for out-of-tree installations #4252
base: master
Are you sure you want to change the base?
Conversation
Hi @nmnobre, if this is ready, can you mark it with the (See also the CONTRIBUTING document.) |
I can't, I don't think I have triage access on this repo. |
Can you please try again? |
This PR is now under review (see the table in the PR description). To help with the review process, please do not force push to the branch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems okay to me but there are a lot of changed permissions so I'd like to get a second pair of eyes - @v-dobrev do you have any input?
Main things I'm noticing is
mkdir -p $(DIR)
changed to$(INSTALL) -m 755 -d $(DIR)
.mkdir
defaults to 755 so this seems okay to me?- Granting read privileges to all users (640 -> 644)
- Lines 632 and 635 change the privileges from 640 -> 755, is this necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Justin, thanks for taking the time to review this PR :)
mkdir -p $(DIR)
changed to$(INSTALL) -m 755 -d $(DIR)
Indeed, this should be equivalent on most (all?) platforms. I just thought... since we're using $(INSTALL)
for files why not follow the same conventional industry practices for directories too?
Granting read privileges to all users (640 -> 644)
I tried to follow what other people are doing. The llvm and gcc guys install .a
libs with 644, .so
libs with 755 and .h
files with 644.
Lines 632 and 635 change the privileges from 640 -> 755, is this necessary?
The people at Nvidia install .mk
files with 755, but Intel uses 644. I think I used the former just because I happened to come across the Nvidia makefiles first (on closer inspection, Nvidia install way too many things with 755... including header files??!!), but I'm happy to change to 644, I agree it'd make more sense.
Hi,
The changes here have the objective of allowing a classical build (i.e. one via the provided
makefile
) to install the required files on a system directory (viaPREFIX=
) with suitable permissions for use by everyone in that system.In addition, a user (or a module file for instance) should then be able to set
MFEM_INSTALL_DIR
allowing the use of the providedmakefile
s to build examples, miniapps and tests. Note the idea to useor
andwildcard
comes from an existingmakefile
:mfem/tests/par-mesh-format/makefile
Lines 16 to 17 in 12ed616
Cheers,
-Nuno
PR Checklist
make style
.CHANGELOG
:CHANGELOG
to group with other related features?INSTALL
:make
orcmake
have a new target?.github
.appveyor.yml
.gitignore
:make distclean; git status
shows any files that were generated from the source by the project (not an IDE) but we don't want to track in the repository.examples/makefile
:SEQ_EXAMPLES
andPAR_EXAMPLES
variables.clean
target..gitignore
file.examples/CMakeLists.txt
:ALL_EXE_SRCS
variable.THIS_TEST_OPTIONS
is set correctly for the new example.doc/CodeDocumentation.dox
.examples/pumi
), list it indoc/CodeDocumentation.conf.in
src/examples.md
.src/examples.md
andsrc/img
.examples.md
, list the example under the appropriate categories, add new categories if necessary.features.md
.makefile
andmakefile
in corresponding miniapp directory..gitignore
file.CMakeLists.txt
file in theminiapps
directory, if the new miniapp is in a new directory.CMakeLists.txt
file in the new miniapp directory.doc/CodeDocumentation.dox
miniapps/nurbs
), add it toMINIAPP_SUBDIRS
in themakefile
.miniapps/nurbs
), list it indoc/CodeDocumentation.conf.in
src/meshing.md
andsrc/electromagnetics.md
files.src/examples.md
andsrc/img
.features.md
.mfem/web
repo.README
(rare).doc/CodeDocumentation.dox
(rare).make unittest
to make sure all unit tests pass.tests/scripts
.