On 7 February 2011 09:52, Antoine LECA <
Antoine.Leca.1@xxxxxxxxx> wrote:
Ivan Gualandri wrote:
> Now editing the Makefile for pkgsrc (the one in /usr)
> i thought that a little modification that add two variables where the user
> can put the address of repository and the branch name will be useful,
> instead of editing the single lines with command. In that way a user:
> 1. Knows immediately what to change
> 2. And he doesn't need to look inside the file (i know that there are only
> three line of code to be edited!!!)
3. Can change the behaviour without changing the makefile, like in
make REPOSITORY=git://
git.minix3.org/pkgsrc.git
versus
make REPOSITORY=
http://github.com/pikpik/minix-pkgsrc.git
versus
make REPOSITORY=ssh://
ast@xxxxxxxxxxxxxxxx:29418/pkgsrc
versus
make REPOSITORY=git@xxxxxxxxxx:pikpik/minix-pkgsrc.git
After all, it is the very basic reason there are variables in make(1)!
However while writing this, I wonder how useful it would be really when
it comes to the repository.
Ops, true!!!
> So attached there is my patched Makefile (i tried it and it seems to work).
cd ${.CURDIR}/pkgsrc && git branch $(BRANCH) origin/$(BRANCH)
I used that way, only because looking on the original makefile it uses the same name in both cases.
But so i think that also remote branch (and maybe local) should be customizable (for example pikpik repository has different branch name from the gautam repository.Actually in the original Makefile branch name is part of the commands:
cd ${.CURDIR}/pkgsrc && git branch minix origin/minix cd ${.CURDIR}/pkgsrc && git checkout minix
And if you want to change repository you must change the command lines. I think that is more useful and readable to have a Branch variable. Like the repository variable.
Maybe the local name should be not needed (you can always use a static name for local branch).
mixes two uses for $(BRANCH): the first is the name of your local
branch, the one you will be using day-to-day; the seocnd is the name of
the branch as it stands on the remote $(REPOSITORY).
By the way: it seems useful to me to read how this is done in
DragonflyBSD (which seems to be the origin here):
http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/etc/Makefile.usr
Note the base setup is following _two_ branches for pkgsrc, master
(which itself is replicating NetBSD's CVS) and pkgsrc-20xxQq; the fact
they are presently following 2010Q3 (while 2010Q4 has become reality for
D-BSD) is because of
http://gitweb.dragonflybsd.org/dragonfly.git/commit/fe70af2188eaa0ac0a5268f8c5c8381ca93efb6d?f=etc/Makefile.usr
which is basically introducing the same feature as Ivan asks! :-)
Just notice Matt Dillon is using ?=, which may allow for a default value
to be set in the calling environment.
Yeah, i saw, but that way the branch name are not customizable. My idea is to make the repository choice more customizable.
Actually if you replace the repository name in Makefile, using the pikpik clone you receive an error due to wrong branch name.
Antoine
Ivan
--
You received this message because you are subscribed to the Google Groups "minix3" group.
To post to this group, send email to
minix3@xxxxxxxxxxxxxxxx.
To unsubscribe from this group, send email to
minix3+unsubscribe@xxxxxxxxxxxxxxxx.
For more options, visit this group at
http://groups.google.com/group/minix3?hl=en.
--
"elen sila lumenn omentielvo"
--
You received this message because you are subscribed to the Google Groups "minix3" group.
To post to this group, send email to minix3@xxxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to minix3+unsubscribe@xxxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/minix3?hl=en.