windows-libafsconf-20090525

LICENSE MIT

libafsconf.dll has been present since OpenAFS 1.0.  However,
for some unknown reason the components that it consists of
(cm_dns.obj, cm_config.obj, cm_nls.obj) have been staticly
linked into exes and dlls all over the code base.  This commit
removes all of the static references and replaces them with
libafsconf.lib.

libafsconf.dll is also moved from Client\Program to Common
because it is now linked to by server and utility components.
This commit is contained in:
Jeffrey Altman 2009-05-25 22:30:24 +00:00
parent d8410b56c8
commit c8ccb88788
15 changed files with 33 additions and 69 deletions

View File

@ -137,7 +137,8 @@ $(OUT)\cm_conn.obj: cm_conn.c
$(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $**
FSOBJS=$(OUT)\fs.obj \
$(OUT)\fs_utils.obj
$(OUT)\fs_utils.obj \
$(OUT)\cm_nls.obj
CMDBGOBJS=$(OUT)\cmdebug.obj
@ -181,7 +182,7 @@ MIDL_FLAGS=/app_config \
############################################################################
# libafsconf.dll
CONF_DLLFILE = $(DESTDIR)\root.client\usr\vice\etc\libafsconf.dll
CONF_DLLFILE = $(DESTDIR)\lib\libafsconf.dll
CONF_DLLLIBS = \
$(DESTDIR)\lib\afs\afsutil.lib \
@ -193,8 +194,7 @@ $(CONF_DLLFILE): $(CONFOBJS) $(OUT)\libafsconf.res $(CONF_DLLLIBS)
$(DLLPREP)
$(CODESIGN_USERLAND)
$(MAKECYGLIB) --input-def libafsconf.def
$(COPY) $*.lib $(ILIBDIR)
$(DEL) $*.lib $*.exp
$(DEL) $*.exp
############################################################################
# lanahelper.lib
@ -265,10 +265,7 @@ $(LOGON_DLLFILE): $(LOGON_DLLOBJS) $(LOGON_DLLLIBS)
############################################################################
# Install target; primary makefile target
install_objs: $(OUT)\cm_dns.obj $(OUT)\cm_config.obj $(OUT)\cm_nls.obj $(LANAHELPERLIB) $(OUT)\afsicf.obj
$(COPY) $(OUT)\cm_dns.obj $(DESTDIR)\lib
$(COPY) $(OUT)\cm_nls.obj $(DESTDIR)\lib
$(COPY) $(OUT)\cm_config.obj $(DESTDIR)\lib
install_objs: $(CONF_DLLFILE) $(LANAHELPERLIB) $(OUT)\afsicf.obj
$(COPY) $(OUT)\afsicf.obj $(DESTDIR)\lib
install_headers: $(IDLFILES) $(INCFILES)
@ -316,8 +313,7 @@ EXELIBS = \
$(DESTDIR)\lib\afsrx.lib \
$(DESTDIR)\lib\afslwp.lib \
$(DESTDIR)\lib\libosi.lib \
$(DESTDIR)\lib\libafsconf.lib \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
EXELIBS2 = \
$(DESTDIR)\lib\afsrpc.lib \

View File

@ -546,7 +546,6 @@ Section "!AFS Client" secClient
SetOutPath "$INSTDIR\Client\Program"
File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
!insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\libosi.dll" "$INSTDIR\Client\Program\libosi.dll" "$INSTDIR"
!insertmacro ReplaceDLL "${AFS_CLIENT_BUILDDIR}\libafsconf.dll" "$INSTDIR\Client\Program\libafsconf.dll" "$INSTDIR"
File "${AFS_CLIENT_BUILDDIR}\klog.exe"
File "${AFS_CLIENT_BUILDDIR}\tokens.exe"
File "${AFS_CLIENT_BUILDDIR}\unlog.exe"
@ -576,6 +575,8 @@ Section "!AFS Client" secClient
File "${AFS_CLIENT_BUILDDIR}\afscpcc.exe"
; Remove the binaries from the old location if present
Delete /REBOOTOK "$INSTDIR\Client\Program\libafsconf.dll"
Delete "$INSTDIR\Client\Program\libafsconf.pdb"
Delete /REBOOTOK "$SYSDIR\afslogon.dll"
Delete "$SYSDIR\afscpcc.exe"
Delete "$SYSDIR\afslogon.pdb"
@ -1161,7 +1162,8 @@ Section /o "Debug symbols" secDebug
SetOutPath "$INSTDIR\Client\Program"
File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb"
File "${AFS_CLIENT_BUILDDIR}\libosi.pdb"
File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb"
; remove old location if present
Delete "$INSTDIR\Client\Program\libafsconf.pdb"
File "${AFS_CLIENT_BUILDDIR}\klog.pdb"
File "${AFS_CLIENT_BUILDDIR}\tokens.pdb"
File "${AFS_CLIENT_BUILDDIR}\unlog.pdb"
@ -1268,6 +1270,7 @@ DoCommon:
File "${AFS_DESTDIR}\lib\afsauthent.pdb"
File "${AFS_DESTDIR}\lib\afspthread.pdb"
File "${AFS_DESTDIR}\lib\afsrpc.pdb"
File "${AFS_DESTDIR}\lib\libafsconf.pdb"
File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb"
File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb"
File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
@ -2770,7 +2773,8 @@ Function AFSLangFiles
File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
!insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsauthent.dll" "$INSTDIR\Common\afsauthent.dll" "$INSTDIR"
!insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afspthread.dll" "$INSTDIR\Common\afspthread.dll" "$INSTDIR"
!insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR"
!insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\afsrpc.dll" "$INSTDIR\Common\afsrpc.dll" "$INSTDIR"
!insertmacro ReplaceDLL "${AFS_DESTDIR}\lib\libafsconf.dll" "$INSTDIR\Common\libafsconf.dll" "$INSTDIR"
!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsadminutil.dll" "$INSTDIR\Common\afsadminutil.dll" "$INSTDIR"
!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll" "$INSTDIR\Common\afsclientadmin.dll" "$INSTDIR"
!insertmacro ReplaceDLL "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll" "$INSTDIR\Common\afsprocmgmt.dll" "$INSTDIR"

View File

@ -48,6 +48,9 @@
<Component Win64="$(var.Win64)" Id="cmf_afsrpc_DLL" Guid="$(var.cmf_afsrpc_DLL_guid)">
<File Id="fileafsrpc_DLL" Name="afsrpc.dll" LongName="afsrpc.dll" KeyPath="yes" DiskId="1" src="$(var.LibDir)\afsrpc.dll"/>
</Component>
<Component Win64="$(var.Win64)" Id="cmf_libafsconf_DLL" Guid="$(var.cmf_libafsconf_DLL_guid)">
<File Id="filelibafsconf_DLL" Name="libafscf.dll" LongName="libafsconf.dll" KeyPath="yes" DiskId="1" src="$(var.LibDir)\libafsconf.dll"/>
</Component>
<Component Win64="$(var.Win64)" Id="cmf_afsauthent2_DLL" Guid="$(var.cmf_afsauthent2_DLL_guid)">
<File Id="fileafsauthent2_DLL" Name="afsauth.dll" LongName="afsauthent.dll" KeyPath="yes" DiskId="1" src="$(var.LibDir)\afsauthent.dll"/>
</Component>
@ -77,6 +80,7 @@
<?endif?>
<Component Win64="$(var.Win64)" Id="cmp_CommonCommonDebug" Guid="$(var.cmp_CommonCommonDebug_guid)">
<File Id="fileafsrpc_PDB" Name="afsrpc.pdb" LongName="afsrpc.pdb" KeyPath="yes" DiskId="1" src="$(var.LibDir)\afsrpc.pdb"/>
<File Id="filelibafsconf_PDB" Name="libafscf.pdb" LongName="libafsconf.pdb" DiskId="1" src="$(var.LibDir)\libafsconf.pdb"/>
<File Id="fileafsauthent_PDB" Name="afsauth.pdb" LongName="afsauthent.pdb" DiskId="1" src="$(var.LibDir)\afsauthent.pdb"/>
<File Id="fileafspthread_PDB" Name="afspthrd.pdb" LongName="afspthread.pdb" DiskId="1" src="$(var.LibDir)\afspthread.pdb"/>
<File Id="fileTaAfsAppLib_PDB" Name="TaAfsApL.pdb" LongName="TaAfsAppLib.pdb" DiskId="1" src="$(var.ServerDir)\TaAfsAppLib.pdb"/>
@ -1058,9 +1062,6 @@
<Component Win64="$(var.Win64)" Id="cmf_libosi_DLL" Guid="$(var.cmf_libosi_DLL_guid)">
<File Id="filelibosi_DLL" Name="libosi.dll" LongName="libosi.dll" KeyPath="yes" DiskId="1" />
</Component>
<Component Win64="$(var.Win64)" Id="cmf_libafsconf_DLL" Guid="$(var.cmf_libafsconf_DLL_guid)">
<File Id="filelibafsconf_DLL" Name="libafscf.dll" LongName="libafsconf.dll" KeyPath="yes" DiskId="1" />
</Component>
<Component Win64="$(var.Win64)" Id="cmf_klog_EXE" Guid="$(var.cmf_klog_EXE_guid)">
<File Id="fileklog_EXE" Name="klog.exe" LongName="klog.exe" KeyPath="yes" DiskId="1" />
</Component>
@ -1238,7 +1239,6 @@
<Component Win64="$(var.Win64)" Id="cmp_ClientProgramDebug" Guid="$(var.cmp_ClientProgramDebug_guid)">
<File Id="fileafsshare_PDB" Name="afsshare.pdb" LongName="afsshare.pdb" DiskId="1" />
<File Id="filelibosi_PDB" Name="libosi.pdb" LongName="libosi.pdb" DiskId="1" />
<File Id="filelibafsconf_PDB" Name="libafscf.pdb" LongName="libafsconf.pdb" DiskId="1" />
<File Id="fileklog_PDB" Name="klog.pdb" LongName="klog.pdb" DiskId="1" />
<File Id="filetokens_PDB" Name="tokens.pdb" LongName="tokens.pdb" DiskId="1" />
<File Id="fileunlog_PDB" Name="unlog.pdb" LongName="unlog.pdb" DiskId="1" />
@ -1648,15 +1648,13 @@
<File Id="filelanahelper_LIB" Name="LANAHE~1.lib" LongName="lanahelper.lib" DiskId="1" src="$(var.LibDir)lanahelper.lib" />
<File Id="filelibafsconf_LIB" Name="LIBAFS~1.lib" LongName="libafsconf.lib" DiskId="1" src="$(var.LibDir)libafsconf.lib" />
<File Id="filelibosi_LIB" Name="libosi.lib" LongName="libosi.lib" DiskId="1" src="$(var.LibDir)libosi.lib" />
<File Id="filecm_config_OBJ" Name="CM_CON~1.obj" LongName="cm_config.obj" DiskId="1" src="$(var.LibDir)cm_config.obj" />
<File Id="filecm_dns_OBJ" Name="cm_dns.obj" LongName="cm_dns.obj" DiskId="1" src="$(var.LibDir)cm_dns.obj" />
</Component>
<?ifdef CygwinArchives?>
<Component Win64="$(var.Win64)" Id="cmp_SDK_Lib_Cygwin" Guid="$(var.cmp_SDK_Lib_Cygwin_guid)">
<File Id="fileafsauthent_A" Name="afsauth.a" LongName="afsauthent.a" DiskId="1" src="$(var.LibDir)afsauthent.a" />
<File Id="fileafspthread_A" Name="afspthrd.a" LongName="afspthread.a" DiskId="1" src="$(var.LibDir)afspthread.a" />
<File Id="fileafsrpc_A" Name="afsrpc.a" LongName="afsrpc.a" DiskId="1" src="$(var.LibDir)afsrpc.a" />
<File Id="filelibafsconf_A" Name="libafscf.a" LongName="libafsconf.a" DiskId="1" src="$(var.ClientDir)libafsconf.a" />
<File Id="filelibafsconf_A" Name="libafscf.a" LongName="libafsconf.a" DiskId="1" src="$(var.LibDir)libafsconf.a" />
<File Id="filelibosi_A" Name="libosi.a" LongName="libosi.a" DiskId="1" src="$(var.ClientDir)libosi.a" />
</Component>
<?endif?>

View File

@ -81,9 +81,7 @@ EXELIBS =\
$(EXELIBDIR)\afs\afsutil.lib \
$(EXELIBDIR)\afs\afseventlog.lib \
$(EXELIBDIR)\afs\afsreg.lib \
$(EXELIBDIR)\cm_dns.obj \
$(EXELIBDIR)\cm_nls.obj
$(EXELIBDIR)\libafsconf.lib
$(SETKEY_EXEFILE): $(SETKEY_EXEOBJS) $(EXELIBS)
$(EXECONLINK) dnsapi.lib shell32.lib

View File

@ -67,8 +67,7 @@ BOSSERVER_EXELIBS =\
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
$(BOSSERVER_EXEFILE): $(BOSSERVER_EXEOBJS) $(BOSSERVER_EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
@ -104,8 +103,7 @@ BOS_EXELIBS =\
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\afs\afspioctl.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
$(RS_BOS_EXEFILE): $(BOS_EXEOBJS) $(BOS_EXELIBS)

View File

@ -88,8 +88,7 @@ EXELIBS =\
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\afs\afspioctl.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
$(EXEFILE): $(EXEOBJS) $(EXERES) $(EXELIBS)

View File

@ -77,9 +77,7 @@ EXELIBS =\
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
$(EXEFILE): $(EXEOBJS) $(EXELIBS)
$(EXECONLINK) dnsapi.lib iphlpapi.lib shell32.lib

View File

@ -53,8 +53,7 @@ EXELIBS =\
$(DESTDIR)\lib\afs\afspioctl.lib \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
$(EXERES): butc.rc AFS_component_version_number.h

View File

@ -39,14 +39,8 @@ KAUTH_LIBOBJS =\
$(OUT)\kaerrors.obj \
$(OUT)\user_nt.obj \
$(OUT)\krb_tf.obj \
$(OUT)\cm_config.obj \
$(OUT)\AFS_component_version_number.obj
WINNTAFSD = ..\WINNT\afsd\
$(OUT)\cm_config.obj: $(WINNTAFSD)\cm_config.c
$(C2OBJ) $**
$(KAUTH_LIBFILE): $(KAUTH_LIBOBJS)
$(LIBARCH)
@ -67,7 +61,6 @@ KAUTH_KRB_LIBOBJS =\
$(OUT)\kaerrors.obj \
$(OUT)\user.krb.obj \
$(OUT)\krb_tf.obj \
$(OUT)\cm_config.obj \
$(OUT)\AFS_component_version_number.obj
$(KAUTH_KRB_LIBFILE): $(KAUTH_KRB_LIBOBJS)
@ -98,8 +91,7 @@ AFSLIBS = \
$(DESTDIR)\lib\afsubik.lib \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afsrxkad.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
TOKENLIB = $(DESTDIR)\lib\afs\afspioctl.lib

View File

@ -82,7 +82,6 @@ SYSOBJS = \
$(OUT)\pioctl_nt.obj
WINNTAFSDOBJS =\
$(OUT)\cm_config.obj \
$(OUT)\afsrpc_c.obj
DLLOBJS =\
@ -95,8 +94,6 @@ DLLOBJS =\
$(SYSOBJS) \
$(WINNTAFSDOBJS) \
$(AUDITBJS) \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj \
$(OUT)\afsauthent.res
$(RXOBJS): $(RX)\$$(@B).c
@ -142,7 +139,8 @@ DLLLIBS =\
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\afslwp.lib \
$(DESTDIR)\lib\lanahelper.lib
$(DESTDIR)\lib\lanahelper.lib \
$(DESTDIR)\lib\libafsconf.lib
$(LIBFILE): $(DLLOBJS) $(DLLLIBS) $(RXOBJS)
$(DLLCONLINK) /DEF:afsauthent.def rpcrt4.lib dnsapi.lib mpr.lib secur32.lib shell32.lib

View File

@ -69,8 +69,7 @@ PTSERVER_EXELIBS =\
$(DESTDIR)\lib\afs\afsaudit.lib \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
!IF (("$(SYS_NAME)"!="i386_win95" ) && ("$(SYS_NAME)"!="I386_WIN95" ))
PTSERVER_EXELIBS =$(PTSERVER_EXELIBS) $(DESTDIR)\lib\afs\afsprocmgmt.lib
@ -111,8 +110,7 @@ PTS_EXELIBS =\
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\afspioctl.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
$(PTS): $(PTS_EXEOBJS) $(PTS_EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib

View File

@ -94,20 +94,9 @@ BUTCLIBS=$(DESTDIR)\lib\afs\afsbudb.lib \
$(DESTDIR)\lib\afspthread.lib \
!ENDIF
$(DESTDIR)\lib\afsdes.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
# $(DESTDIR)\lib\afsauthent.lib \
# $(DESTDIR)\lib\afsrpc.lib \
# $(DESTDIR)\lib\afs\afscmd.lib \
# $(DESTDIR)\lib\afs\afsaudit.lib \
# $(DESTDIR)\lib/afs/afscom_err.lib \
# $(DESTDIR)\lib\afs\afsreg.lib \
# $(DESTDIR)\lib\afs\afsprocmgmt.lib \
# $(DESTDIR)\lib\afs\afseventlog.lib \
# $(DESTDIR)\lib\pthread.lib
# rm $(OUT)\tcstatus.obj
# nmake /nologo /f ntmakefile install
#----------------------------------------------- BUTC

View File

@ -22,8 +22,7 @@ LIBS = \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afsrxkad.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
############################################################################
# Definitions for generating files via RXGEN

View File

@ -88,8 +88,7 @@ VLSERVER_EXECLIBS = \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afsprocmgmt.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
$(VLSERVER): $(VLSERVER_EXEOBJS) $(LIBFILE) $(VLSERVER_EXECLIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib

View File

@ -70,8 +70,7 @@ EXEC_LIBS = \
$(DESTDIR)\lib\afs\afsacl.lib \
$(DESTDIR)\lib\afs\afsreg.lib \
$(DESTDIR)\lib\afs\afseventlog.lib \
$(DESTDIR)\lib\cm_dns.obj \
$(DESTDIR)\lib\cm_nls.obj
$(DESTDIR)\lib\libafsconf.lib
############################################################################