Bug 47659 - makefile.win needs check for DBM_LIST, dies on build
Summary: makefile.win needs check for DBM_LIST, dies on build
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.5-HEAD
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-07 00:30 UTC by Gregg L. Smith
Modified: 2009-08-07 07:18 UTC (History)
0 users



Attachments
patch against trunk (2.55 KB, patch)
2009-08-07 00:31 UTC, Gregg L. Smith
Details | Diff
patch against branch (2.79 KB, patch)
2009-08-07 00:32 UTC, Gregg L. Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gregg L. Smith 2009-08-07 00:30:32 UTC
Hello folks,

Trunk R664253 Branch R664254 added the DBD_LIST to the build process. 
The makefile checked if DBD_LIST was defined or it would gently tell you
that the drivers could not be made as none were defined. 

!IFDEF DBD_LIST
..
..
!ELSE
#     no DBD_LIST

_trydbd:
	@echo -----
	@echo apr_dbd drivers will not build unless DBD_LIST is set to the list
	@echo of all the client modules available in the LIB and INCLUDE path.

!ENDIF

Trunk R704771 Branch R712514 removed the check for the DBD_LIST since the odbc driver was going to be built on Windows since support for odbc is built in. At this time the above check was removed and the odbc was directly inserted into the for loop prior to the value of the DBD_LIST render the check unnecessary. Had this unneeded check been left behind, it would have at least been a clue when adding dbm in the build. 

Trunk R799069 Branch R799070 

-_trydbd:
+_trydb:
..
..
+	cd ..\dbm
+	for %d in ($(DBM_LIST)) do \
+	  $(MAKE) $(MAKEOPT) -f apr_dbm_%d.mak CFG="apr_dbm_%d - Win32 $(LONG)" RECURSE=0 $(CTARGET)
 	cd ..\..\..
 !ELSEIF $(USESLN) == 1
..
..
 !ELSE
..
..
+	@for %d in ($(DBM_LIST)) do \
+	  msdev Apache.dsw /USEENV /MAKE \
+		"apr_dbm_%d - Win32 $(LONG)" /NORECURSE $(CTARGET)
 !ENDIF

The problem show up cause unlike odbc, there is no built in support for any of the DBMs and since they have been added to the dbd build section without a check to see if DBM_LIST is actually defined, the for loop is being fed and undefined value and nmake barfs. 

for %d in () do \

--------------------Configuration: apr_dbd_odbc - Win32 Release--------------------
Linking...
   Creating library Release/apr_dbd_odbc-1.lib and object Release/apr_dbd_odbc-1.exp
Embed .manifest
apr_dbd_odbc-1.dll - 0 error(s), 0 warning(s)
NMAKE : fatal error U1077: 'for' : return code '0x3020302'
Stop.
Error executing NMAKE.

See attached patches. It is not pretty but the dbd and dbm cannot simply be built together and a separate build for dbm is a made necessary.

Gregg
Comment 1 Gregg L. Smith 2009-08-07 00:31:25 UTC
Created attachment 24115 [details]
patch against trunk
Comment 2 Gregg L. Smith 2009-08-07 00:32:03 UTC
Created attachment 24116 [details]
patch against branch
Comment 3 William A. Rowe Jr. 2009-08-07 07:18:59 UTC
Gregg, thanks for the patch, will integrate.