Fix tptserver and tvlserver install rules
authorAndrew Deason <adeason@sinenomine.net>
Mon, 14 Jun 2010 18:28:37 +0000 (13:28 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 15 Jun 2010 11:16:06 +0000 (04:16 -0700)
Commit 00c37e8634b97dba3431804cea467a046be525d5 introduced a few
usages of 'ifeq' in cross-platform Makefiles, breaking the build when
not using GNU make. Fix this by making the tptserver and tvlserver
'install' and 'dest' targets behave more like the 'ptserver' and
'vlserver' ones, and correct the ptserver 'install' target while we
are here.

Change-Id: Ia3fd9149c0f18a96a9899a5dfde41e53a45102b7
Reviewed-on: http://gerrit.openafs.org/2160
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/ptserver/Makefile.in
src/tptserver/Makefile.in
src/tvlserver/Makefile.in

index eeb3a2a..f3aa7dd 100644 (file)
@@ -209,12 +209,12 @@ install: ptserver pts pt_util db_verify libprot.a ptclient.h pterror.h \
        ${INSTALL} -d ${DESTDIR}${bindir}
        ${INSTALL} -d ${DESTDIR}${libdir}/afs
        ${INSTALL} -d ${DESTDIR}${includedir}/afs
-       if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then
-               ${INSTALL_PROGRAM} ptserver ${DESTDIR}${afssrvlibexecdir}/ptserver \
-               ${INSTALL_PROGRAM} pts ${DESTDIR}${afssrvbindir}/pts \
-               ${INSTALL_PROGRAM} pts ${DESTDIR}${bindir}/pts \
-               ${INSTALL_PROGRAM} pt_util ${DESTDIR}${afssrvsbindir}/pt_util \
-               ${INSTALL_PROGRAM} db_verify ${DESTDIR}${afssrvsbindir}/prdb_check \
+       if [ "x$(ENABLE_PTHREADED_UBIK)" != "xyes" ] ; then \
+               ${INSTALL_PROGRAM} ptserver ${DESTDIR}${afssrvlibexecdir}/ptserver; \
+               ${INSTALL_PROGRAM} pts ${DESTDIR}${afssrvbindir}/pts; \
+               ${INSTALL_PROGRAM} pts ${DESTDIR}${bindir}/pts; \
+               ${INSTALL_PROGRAM} pt_util ${DESTDIR}${afssrvsbindir}/pt_util; \
+               ${INSTALL_PROGRAM} db_verify ${DESTDIR}${afssrvsbindir}/prdb_check; \
        fi
        ${INSTALL_DATA} libprot.a ${DESTDIR}${libdir}/afs/libprot.a
        ${INSTALL_DATA} ptclient.h ${DESTDIR}${includedir}/afs/prclient.h
index 9735d65..f83eba1 100644 (file)
@@ -16,21 +16,6 @@ ENABLE_PTHREADED_UBIK=@ENABLE_PTHREADED_UBIK@
 
 CCRULE=${MT_CC} ${CFLAGS} ${MT_CFLAGS} -c $?
 
-ifeq ($(ENABLE_PTHREADED_UBIK),yes)
-DEST_DEP = \
-       ${DEST}/root.server/usr/afs/bin/ptserver \
-       ${DEST}/root.server/usr/afs/bin/pts \
-       ${DEST}/bin/pts \
-       ${DEST}/root.server/usr/afs/bin/pt_util \
-       ${DEST}/etc/prdb_check
-INST_DEP = \
-       ${DESTDIR}${afssrvlibexecdir}/ptserver \
-       ${DESTDIR}${afssrvbindir}/pts \
-       ${DESTDIR}${bindir}/pts \
-       ${DESTDIR}${afssrvsbindir}/pt_util \
-       ${DESTDIR}${afssrvsbindir}/prdb_check
-endif
-
 RX=../rx
 UTIL=../util
 PTSERVER=../ptserver
@@ -248,19 +233,23 @@ prerror.h: pterror.h
 #
 # Installation targets
 #
-install: $(INST_DEP)
-
-${DEST}/root.server/usr/afs/bin/ptserver: ptserver
-       ${INSTALL_PROGRAM} $? $@
-
-${DEST}/bin/pts ${DEST}/root.server/usr/afs/bin/pts: pts
-       ${INSTALL_PROGRAM} $? $@
-
-${DEST}/root.server/usr/afs/bin/pt_util: pt_util
-       ${INSTALL_PROGRAM} $? $@
-
-${DEST}/etc/prdb_check: db_verify
-       ${INSTALL_PROGRAM} $? $@
+install: ptserver pts pt_util db_verify
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
+               ${INSTALL_PROGRAM} ptserver ${DESTDIR}${afssrvlibexecdir}/ptserver; \
+               ${INSTALL_PROGRAM} pts ${DESTDIR}${afssrvbindir}/pts; \
+               ${INSTALL_PROGRAM} pts ${DESTDIR}${bindir}/pts; \
+               ${INSTALL_PROGRAM} pt_util ${DESTDIR}${afssrvsbindir}/pt_util; \
+               ${INSTALL_PROGRAM} db_verify ${DESTDIR}${afssrvsbindir}/prdb_check; \
+       fi
+
+dest: ptserver pts pt_util db_verify
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
+               ${INSTALL_PROGRAM} ptserver ${DEST}/root.server/usr/afs/bin/ptserver; \
+               ${INSTALL_PROGRAM} pts ${DEST}/root.server/usr/afs/bin/pts; \
+               ${INSTALL_PROGRAM} pts ${DEST}/bin/pts; \
+               ${INSTALL_PROGRAM} pt_util ${DEST}/root.server/usr/afs/bin/pt_util; \
+               ${INSTALL_PROGRAM} db_verify ${DEST}/etc/prdb_check; \
+       fi
 
 #
 # Misc. targets
@@ -271,19 +260,3 @@ clean:
        core AFS_component_version_number.c Kptint.cs.c Kptint.h Kptint.xdr.c
 
 include ../config/Makefile.version
-${DESTDIR}${afssrvlibexecdir}/ptserver: ptserver
-       ${INSTALL_PROGRAM} $? $@
-
-${DESTDIR}${afssrvbindir}/pts: pts
-       ${INSTALL_PROGRAM} $? $@
-
-${DESTDIR}${bindir}/pts: pts
-       ${INSTALL_PROGRAM} $? $@
-
-${DESTDIR}${afssrvsbindir}/pt_util: pt_util
-       ${INSTALL_PROGRAM} $? $@
-
-${DESTDIR}${afssrvsbindir}/prdb_check: db_verify
-       ${INSTALL_PROGRAM} -f $? $@
-
-dest: $(DEST_DEP)
index fe19c2f..cbae712 100644 (file)
@@ -18,17 +18,6 @@ CC=${MT_CC}
 CFLAGS=${COMMON_CFLAGS} ${MT_CFLAGS} 
 CCRULE=${CC} ${CFLAGS} -c $?
 
-ifeq ($(ENABLE_PTHREADED_UBIK),yes)
-DEST_DEP = \
-       ${DEST}/root.server/usr/afs/bin/vlserver \
-       ${DEST}/etc/vldb_convert \
-       ${DEST}/etc/vldb_check
-INST_DEP = \
-       ${DESTDIR}${afssrvlibexecdir}/vlserver \
-       ${DESTDIR}${afssrvsbindir}/vldb_convert \
-       ${DESTDIR}${afssrvsbindir}/vldb_check
-endif
-
 RX=../rx
 UTIL=../util
 VLSERVER=../vlserver
@@ -195,27 +184,19 @@ vlserver.h vl_errors.c: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h
 
 system: install
 
-${DEST}/root.server/usr/afs/bin/vlserver: vlserver
-       ${INSTALL} $? $@
-
-${DEST}/etc/vldb_convert: cnvldb
-       ${INSTALL} $? $@
-
-install: $(INST_DEP)
-
-${DESTDIR}${afssrvlibexecdir}/vlserver: vlserver
-       ${INSTALL} $? $@
-
-${DESTDIR}${afssrvsbindir}/vldb_convert: cnvldb
-       ${INSTALL} $? $@
-
-${DESTDIR}${afssrvsbindir}/vldb_check: vldb_check
-       ${INSTALL} $? $@
-
-dest: $(DEST_DEP)
-
-${DEST}/etc/vldb_check: vldb_check
-       ${INSTALL} $? $@
+install: vlserver cnvldb vldb_check
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
+               ${INSTALL_PROGRAM} vlserver ${DESTDIR}${afssrvlibexecdir}/vlserver; \
+               ${INSTALL_PROGRAM} cnvldb ${DESTDIR}${afssrvsbindir}/vldb_convert; \
+               ${INSTALL_PROGRAM} vldb_check ${DESTDIR}${afssrvsbindir}/vldb_check; \
+       fi
+
+dest: vlserver cnvldb vldb_check
+       if [ "x$(ENABLE_PTHREADED_UBIK)" = "xyes" ] ; then \
+               ${INSTALL_PROGRAM} vlserver ${DEST}/root.server/usr/afs/bin/vlserver; \
+               ${INSTALL_PROGRAM} cnvldb ${DEST}/etc/vldb_convert; \
+               ${INSTALL_PROGRAM} vldb_check ${DEST}/etc/vldb_check; \
+       fi
 
 #
 # Misc targets