[pve-devel] [PATCH cluster v2] buildsys: replace autotools with plain makefiles

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jul 25 11:33:54 CEST 2018


Am 07/24/2018 um 12:30 PM schrieb Wolfgang Bumiller:
> On Tue, Jul 24, 2018 at 11:17:43AM +0200, Thomas Lamprecht wrote:
>> Am 07/12/2018 um 10:06 AM schrieb Thomas Lamprecht:
>>> pve-cluster is not a big project with to much dependencies, so
>>> autotools was a bit of an overkill for it.
>>> Omit it, plus a ./configure step in general and just use a plain
>>> Makefile - in combination with pkg-config - like we do in our other
>>> projects.
>>>
>>> Build time gets reduced quite a bit - albeit the were never that big
>>> anyway...:
>>>
>>> (old autotools) time make deb
>>> make deb  12.96s user 1.78s system 94% cpu 15.543 total
>>>
>>> (new plain makefile) time make deb
>>> make deb  9.40s user 1.14s system 100% cpu 10.465 total
>>>
>>> A third less time needed here, and with compiling in parallel I can
>>> shave off even 1.5 seconds more, so almost  half of the original
>>> time.
>>>
>>> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
>>> ---
>>>
>>> changes v1 -> v2:
>>> * s/make/$(MAKE)/
>>> * ensure all clean targets are PHONY ones
>>> * add all: target to data/Makefile
>>> * allow to build src/ binaries (pmxcfs and helpers) with make only by
>>>     adding them to the default target
>>>
>>
>> any comments?
> 
> Looks good. 2 more suggestions:
> 
> data/Makefile's all target needs to actually be filled (otherwise the
> compile process happens at the install step...)
> I'd suggest a SUBDIR variable approach as below...
> 
> And in data/src/Makefile we should generate the dependencies via -MMD in
> order to be able to run make and have pmxcfs rebuilt properly even when
> only touching eg. header files.
> 

Both seems good to me and your patches look and work as expected.
Single thing I noticed that *.d should be added to the clean target's rm -f.

Would it be OK for you to just apply mine plus your two proposed
patches?




More information about the pve-devel mailing list