Savagedlight / libifconfig

A C API to do most things done by the FreeBSD 'ifconfig' program today
Other
26 stars 7 forks source link

Rewrite examples/Makefile to be more usable for standalone builds #44

Closed asomers closed 7 years ago

Savagedlight commented 7 years ago

This looks good, but I wonder if you could also make two other changes before I merge this PR.

There's a script, tools/cptofbsdsrc.sh, which copies source and documentation from the 'raw' libifconfig repository into the FreeBSD source tree. It's used by gitlab-ci and by me when submitting patches to FreeBSD. Therefore, there has to be two makefiles for building the examples; one which is tailored for git checkout building (the one that's currently in this PR), and one for building in the examples directory (Makefile.base).

Can you also make 'Makefile.base' and make the script copy this as Makefile into the freebsd-src examples directory?

asomers commented 7 years ago

I can do that @Savagedlight, but do you think it's time to start working directly out of SVN instead? That way the wider FreeBSD community will have more visibility into the project, and we can make use of FreeBSD's own CI infrastructure.

Savagedlight commented 7 years ago

@asomers I can't work directly on FreeBSD's SVN as I don't have a commit bit, so it would be very impractical to move main development of libifconfig to the tree at this time.

I'll make the aforementioned changes before merging this PR.

Savagedlight commented 7 years ago

Upon further thought: As libifconfig gets installed as a private library when installed from FreeBSD base, the current makefile in the examples directory doesn't work anyway.

To make it work, the makefile has to refer libprivateifconfig. I think it's a bad idea to make copypasta-ready examples which do this as the whole point of marking it private was to make people have to take one extra step to use it directly from base.

Therefore, I'll merge this as-is and then update cptofbsdsrc.sh to remove the Makefile from the examples directory.

asomers commented 7 years ago

@Savagedlight since you don't have an SVN commit bit, how about forking FreeBSD's git repo at https://github.com/freebsd/freebsd and developing libifconfig there? It's an up-to-date mirror of the SVN repository. Doing that will relieve you of the burden of maintaining two sets of makefiles and make it easier for us to import newer changes into SVN.