[RFC] fully integrate etc/Makefile into bsd.prog.mk

NGie Cooper yaneurabeya at gmail.com
Thu Sep 25 01:22:37 UTC 2014


On Wed, Sep 24, 2014 at 9:07 AM, Warner Losh <imp at bsdimp.com> wrote:
>
> On Sep 23, 2014, at 5:20 PM, Garrett Cooper <yaneurabeya at gmail.com> wrote:
>
>> On Sep 23, 2014, at 16:12, Glen Barber <gjb at FreeBSD.org> wrote:
>>
>> ...
>>
>>> And the "other people's" is exactly why etc/Makefile should remain
>>> untouched.  Many companies build their own releases, and touching
>>> something for the sake of touching something will inevitably break
>>> something that has worked for a long time.
>>>
>>> In my opinion, etc/Makefile is not broken, so there is no reason to
>>> "fix" it.  You can consider my reply an objection to arbitrary changes
>>> to etc/Makefile, in this case.
>>
>>       Ok. I’ll rescind my proposal to cleanup/change the structure/method used for installing things in etc/Makefile, and instead focus on testing and review of the removal of optional pieces from the install which are always installed.
>> Thank you for the input,
>
> That’s why I asked what the plan was. etc/Makefile is simply fraught with danger.

My lack of a plan was probably what caused the FUD. I didn't have one
yet because I was doing initial investigation to see whether or not
what I was proposing was even plausible.

Basically, the idea was to do the following:

Goal:
- All high level/documented targets (all, clean, distribute,
distribution, install, etc) would remain untouched. No backwards
compatibility would be broken when doing this work.

Tasks:
1. Any "missing" Makefiles in subdirectories would be added/converted
as needed to bsd.prog.mk in order to handle "make distribution"
cleanly.
2. All lines like "cd ${.CURDIR}/some-dir; make install" executed
under the distribution target would turn into something like this:

# Only install these items with make distribution.
.if make(distribution)
SUBDIR+= some-dir
.endif

I would need to change ${.TARGET} to execute install like is currently
being done today (with exception of sendmail -- which handles make
distribution), unless I created a Makefile.inc in the directory which
created the distribution target as needed.

3. Everything would be converted over to FILES/FILESDIR or
SCRIPTS/SCRIPTSDIR in etc/Makefile that is installed from etc.
4. Everything that's not installed from /etc would be moved to their
relevant subdir Makefile.
5. Targets that handle creating login.conf.db, etc would be moved to
the end of the target, or be moved to a supporting target which would
ensure that vendors/users would have the ability to customize
${DESTDIR}/etc before cap_mkdb, etc are run, eliminating the need for
duplicated logic in scripts.

Thanks,
-Garrett


More information about the freebsd-arch mailing list