On 06.10.2009 22:31, William A. Rowe, Jr. wrote:
> Rainer Jung wrote:
>>
>>>> Another thing is being able to split INSTDIR from APACHE2_HOME. The
>>>> first is where the module should go to, the other one where httpd is. A
>>>> simple tweak to the Makefile allows that. Then there's also an
>>>> unconditional
>>>>
>>>> INSTDIR=\Apache22
>>>>
>>>> near the beginning of both Makefiles, which seems not right.
>>> That's a default. If INSTDIR is provided, that value is overridden.
>>
>> Hmmm, it is applied a little down, but only if INSTDIR is not yet set.
>> So setting the default is in the Makefile twice, once unconditionally,
>> and then later down only if INSTDIR is not yet set. The unconditional
>> one should go. Furthermore the test if it is already set should also be
>> applied to APACHE2_HOME around the line, were APACHE2_HOME is set to
>> INSTDIR.
>
> Understand that if it's provided on the command line, the command line
> overrides.
> It really is just a default. But as you point out, bringing it in from the
> environment
> requires that we protect it in an empty value test.
>
> Right now we have it to initialize INSTDIR twice, and that's obviously wrong,
> so I've adopted your suggestions, including reporting the APACHE2_HOME value.
>
> I think all appropriate changes are now made, please review :)
Yup, works.
I think you can remove the INSTDIR and APACHE2_HOME options when
recursively calling nmake. Now that we don't set them undconditionally
the passing of vars works automatically (at least during my test).
Regards,
Rainer
Index: Makefile-fcgid.win
===================================================================
--- Makefile-fcgid.win (Revision 822505)
+++ Makefile-fcgid.win (Arbeitskopie)
@@ -82,22 +82,18 @@
_buildr:
@$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=R LONG=Release _build
_buildd:
@$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=D LONG=Debug _build
installr:
@$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=R LONG=Release _build _install
installd:
@$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=D LONG=Debug _build _install
clean: _cleanr _cleand
@@ -109,12 +105,10 @@
_cleanr:
$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=R LONG=Release CTARGET=CLEAN _build
_cleand:
$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=D LONG=Debug CTARGET=CLEAN _build
_build:
@@ -127,12 +121,10 @@
_cleanr:
$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=R LONG=Release CTARGET="/clean" _build
_cleand:
$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=D LONG=Debug CTARGET="/clean" _build
_build:
@@ -143,12 +135,10 @@
_cleanr:
@$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=R LONG=Release CTARGET="/CLEAN" _build
_cleand:
@$(MAKE) $(MAKEOPT) -f Makefile-fcgid.win \
- INSTDIR="$(INSTDIR)" APACHE2_HOME="$(APACHE2_HOME)" \
SHORT=D LONG=Debug CTARGET="/CLEAN" _build
_build: