1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-22 08:12:27 +00:00

Merge branch 'senpy' into 'master'

Senpy

See merge request docs/templates/makefiles!1
This commit is contained in:
J. Fernando Sánchez 2017-09-27 19:46:04 +00:00
commit 3bba29fc4e
2 changed files with 30 additions and 3 deletions

27
README.md Normal file
View File

@ -0,0 +1,27 @@
These makefiles are recipes for several common tasks in different types of projects.
To add them to your project, simply do:
```
git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git
git subtree add --prefix=.makefiles/ makefiles master
touch Makefile
echo "include .makefiles/makefiles.mk" >> Makefile
```
Now you can take advantage of the recipes.
For instance, to add useful targets for a python project, just add this to your Makefile:
```
include .makefiles/python.mk
```
You may need to set special variables like the name of your project or the python versions you're targetting.
Take a look at each specific `.mk` file for more information, and the `Makefile` in the [senpy](https://lab.cluster.gsi.dit.upm.es/senpy/senpy) project for a real use case.
If you update the makefiles from your repository, make sure to push the changes for review in upstream (this repository):
```
make makefiles-push
```
It will automatically commit all unstaged changes in the .makefiles folder.

View File

@ -1,11 +1,11 @@
makefiles-remote: makefiles-remote:
git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git || true git remote add makefiles ssh://git@lab.cluster.gsi.dit.upm.es:2200/docs/templates/makefiles.git || true
makefiles-commit: makefiles-commit: makefiles-remote
git add -f .makefiles git add -f .makefiles
git commit -m "Updated makefiles from ${NAME}" git commit -em "Updated makefiles from ${NAME}"
makefiles-push: makefiles-remote makefiles-push:
git subtree push --prefix=.makefiles/ makefiles $(NAME) git subtree push --prefix=.makefiles/ makefiles $(NAME)
makefiles-pull: makefiles-remote makefiles-pull: makefiles-remote