LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [PATCH] ipvsadm-1.24 Makefile fix

To: Roberto Nibali <ratz@xxxxxxxxxxxx>
Subject: Re: [PATCH] ipvsadm-1.24 Makefile fix
Cc: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Cc: Horms <horms@xxxxxxxxxxxx>
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Sun, 23 Jul 2006 23:39:33 +0800

Hi Ratz,

Thanks for the patch. will apply it soon.

Cheers,

Wensong


Roberto Nibali wrote:
Hola,

The attached patch makes ipvsadm compile again for me. I have to attend
a meeting, changelog will follow later :).

That was fun ... on to interesting things:

The previous patch addressed a few issues when packaging ipvsadm:

o Introduced LDFLAGS which defaults to nothing for backwards
  compatibility. This is needed so we can append LDFLAGS from
  top-level Makefiles, like for example make LDFLAGS="-static -s"
  to get a statically linked binary.
o Introduced KERNELSOURCE which defaults to /usr/src/linux to
  preserve backwards compatibility when it's not set. This variable
  allows one to set an alternative kernel path. Most packagers
  will value this one.
o Changed the libs target to append CFLAGS and INCLUDE settings
  to be able to compile and link libipvs using the same settings.
  LDFLAGS does not need to be exported in my opinion.
o Added the newly introduced LDFLAGS to the ipvsadm target.

As a bonus I have taken the liberty to move the removal of the
ipvsadm.spec file and the tar-ball from the clean to the distclean
target, to match the majority of open source projects using automake
tools. The semantics of clean regarding the deletion of project files is
to my avail only applicable to newly created files during the configure,
compile and install process. This also means, that I have potentially
changed the packager's assumption on this clean target's behaviour. If
you'd rather not change this, let me know and I cook up a patch that
does not include this.

Otherwise, please consider applying, thanks! My test cases were:

1) make KERNELSOURCE=./path/to/kernelsrc
2) make KERNELSOURCE=./path/to/kernelsrc LDFLAGS="-static"
3) make KERNELSOURCE=./path/to/kernelsrc LDFLAGS="-static -s"
4) make clean
5) make distclean

All have passed, and given the nature of this patch, all above use cases
without specifying KERNELSOURCE failed to compile ipvsadm. On a
sidenote, I should like to mention that this Makefile could be improved
by not using "mkdir" directly, but rather "install -d" and secondly by
introducing the notion of DESTDIR as is standard when automake is used.

Best regards,
Roberto Nibali, ratz


<Prev in Thread] Current Thread [Next in Thread>