build: separate source and header compile_et rules

Generate source and header files separately to support parallel make
without contortions.

Add a complete list of dependencies for each generated header file
to avoid build errors during parallel make.

Reviewed-on: http://gerrit.openafs.org/10370
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
(cherry picked from commit c01236beb5)

Change-Id: Ib0e3c3b8e0a268f7db741243ce78fed9f6c342c7
Reviewed-on: http://gerrit.openafs.org/11242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
Michael Meffie 2013-10-26 23:35:14 -04:00 committed by Stephan Wiesand
parent 73b6ed21c7
commit 7c451fab11
22 changed files with 270 additions and 68 deletions

View File

@ -506,7 +506,7 @@ libuafs_setup: config export
libuafs: libuafs_setup vlserver_depinstall tvlserver_depinstall rx_depinstall fsint_depinstall \
auth_depinstall dir_depinstall libacl_depinstall rxkad_depinstall \
ubik_depinstall afs_depinstall kauth_depinstall ptserver_depinstall \
rxstat_depinstall lwp_depinstall sys_depinstall des cmd
rxstat_depinstall lwp_depinstall sys_depinstall des cmd ubik
+set -x; \
case ${SYS_NAME} in \
hp_ux102* | *_obsd* | sun*_4* | *_nbsd*| hp_ux11i | hp_ux112* | ia64_hpux112*) \

View File

@ -97,15 +97,32 @@ setkey: setkey.o ${LIBS}
acfg_errors.o: acfg_errors.c
acfg_errors.c cellconfig.h: acfg_errors.et cellconfig.p.h
$(RM) -f cellconfig.h acfg_errors.c
${COMPILE_ET} -p ${srcdir} acfg_errors -h cellconfig
acfg_errors.c: acfg_errors.et
${COMPILE_ET_C} -p ${srcdir} acfg_errors
cellconfig.h: acfg_errors.et cellconfig.p.h
${COMPILE_ET_H} -p ${srcdir} acfg_errors -h cellconfig
authcon.o: cellconfig.h
cellconfig.o: cellconfig.h
copyauth.o: cellconfig.h
ktc.o: cellconfig.h
setkey.o: cellconfig.h
userok.o: cellconfig.h
writeconfig.o: cellconfig.h
ktc_errors.o: ktc_errors.c
ktc_errors.c auth.h: ktc_errors.et auth.p.h
$(RM) -f auth.h ktc_errors.c
${COMPILE_ET} -p ${srcdir} ktc_errors -h auth
ktc_errors.c: ktc_errors.et
${COMPILE_ET_C} -p ${srcdir} ktc_errors
auth.h: ktc_errors.et auth.p.h
${COMPILE_ET_H} -p ${srcdir} ktc_errors -h auth
authcon.o: auth.h
copyauth.o: auth.h
ktc.o: auth.h
userok.o: auth.h
#
# Install targets

View File

@ -79,11 +79,19 @@ bosint.cs.c: bosint.h
bosint.ss.c: bosint.h
bosint.xdr.c: bosint.h
bnode.h: boserr.c
boserr.c: boserr.et
${COMPILE_ET_C} -p ${srcdir} boserr
boserr.c: bnode.p.h boserr.et
$(RM) -f boserr.c bnode.h
${COMPILE_ET} -p ${srcdir} boserr -h bnode
bnode.h: bnode.p.h boserr.et
${COMPILE_ET_H} -p ${srcdir} boserr -h bnode
bnode.o: bnode.h
bos.o: bnode.h
bosoprocs.o: bnode.h
bosserver.o: bnode.h
cronbnodeops.o: bnode.h
ezbnodeops.o: bnode.h
fsbnodeops.o: bnode.h
bosserver.o: bosserver.c ${INCLS} AFS_component_version_number.o

View File

@ -82,23 +82,23 @@ bumon.xdr.c: bumon.h
bumon.ss.c: bumon.h
bumon.cs.c: bumon.h
butm.h: butm_errs.c
butm.h: butm_errs.et butm.p.h
${COMPILE_ET_H} -p ${srcdir} butm_errs -h butm
butm_errs.c: butm_errs.et butm.p.h
$(RM) -f butm.h butm_errs.c
${COMPILE_ET} -p ${srcdir} butm_errs -h butm
butm_errs.c: butm_errs.et
${COMPILE_ET_C} -p ${srcdir} butm_errs
tcdata.h: butc_errs.c
tcdata.h: butc_errs.et tcdata.p.h butm.h
${COMPILE_ET_H} -p ${srcdir} butc_errs -h tcdata
butc_errs.c: butc_errs.et tcdata.p.h butm.h
$(RM) -f tcdata.h butc_errs.c
${COMPILE_ET} -p ${srcdir} butc_errs -h tcdata
butc_errs.c: butc_errs.et
${COMPILE_ET_C} -p ${srcdir} butc_errs
butx.h: butx_errs.c
butx.h: butx_errs.et
${COMPILE_ET_H} -p ${srcdir} butx_errs -h butx
butx_errs.c: butx_errs.et
$(RM) -f butx.h butx_errs.c
${COMPILE_ET} -p ${srcdir} butx_errs -h butx
${COMPILE_ET_C} -p ${srcdir} butx_errs
#
# Installation targets

View File

@ -71,9 +71,31 @@ backup: $(BACKOBJS) ${LIBS}
bc.h: bucoord_errs.c
bucoord_errs.c: bucoord_errs.et bc.p.h
$(RM) -f bc.h bucoord_errs.c
${COMPILE_ET} -p ${srcdir} bucoord_errs -h bc
bucoord_errs.c: bucoord_errs.et
${COMPILE_ET_C} -p ${srcdir} bucoord_errs
bc.h: bucoord_errs.et bc.p.h
${COMPILE_ET_H} -p ${srcdir} bucoord_errs -h bc
bc_status.o: bc.h
btest.o: bc.h
commands.o: bc.h
config.o: bc.h
dlq.o: bc.h
dsstub.o: bc.h
dsvs.o: bc.h
dump.o: bc.h
dump_sched.o: bc.h
expire.o: bc.h
main.o: bc.h
restore.o: bc.h
status.o: bc.h
tape_hosts.o: bc.h
ttest.o: bc.h
ubik_db_if.o: bc.h
vol_sets.o: bc.h
volstub.o: bc.h
#
# Errors

View File

@ -72,11 +72,23 @@ ${TOP_INCDIR}/afs/budb_client.h: budb_client.h
${TOP_INCDIR}/afs/budb_prototypes.h: budb_prototypes.h
${INSTALL_DATA} $? $@
budb_errs.h: budb_errs.c
budb_errs.c: budb_errs.et
$(RM) -f budb_errs.c
${COMPILE_ET} -p ${srcdir} budb_errs
${COMPILE_ET_C} -p ${srcdir} budb_errs
budb_errs.h: budb_errs.et
${COMPILE_ET_H} -p ${srcdir} budb_errs
database.o: budb_errs.h
db_alloc.o: budb_errs.h
db_dump.o: budb_errs.h
db_hash.o: budb_errs.h
db_lock.o: budb_errs.h
dbs_dump.o: budb_errs.h
db_text.o: budb_errs.h
ol_verify.o: budb_errs.h
procs.o: budb_errs.h
server.o: budb_errs.h
struct_ops.o: budb_errs.h
database.o: database.c budb_errs.h globals.h ${INCLS}
db_alloc.o: db_alloc.c budb_errs.h ${INCLS}

View File

@ -30,11 +30,13 @@ ${TOP_LIBDIR}/libcmd64.a: libcmd64.a
${TOP_INCDIR}/afs/cmd.h: cmd.h
${INSTALL_DATA} $? $@
cmd.h: cmd_errors.et cmd.p.h
$(RM) -f cmd.h cmd_errors.c
${COMPILE_ET} -p ${srcdir} cmd_errors -h cmd
cmd_errors.c: cmd_errors.et
${COMPILE_ET_C} -p ${srcdir} cmd_errors
cmd_errors.c: cmd.h
cmd.h: cmd_errors.et cmd.p.h
${COMPILE_ET_H} -p ${srcdir} cmd_errors -h cmd
cmd.o: cmd.h
cmd_errors.o: cmd_errors.c

View File

@ -109,11 +109,32 @@ kaauxdb.o: kaauxdb.c
kaerrors.o: kaerrors.c
kautils.h: kaerrors.c
kaerrors.c: kaerrors.et
${COMPILE_ET_C} -p ${srcdir} kaerrors
kaerrors.c: kaerrors.et kautils.p.h
$(RM) -f kautils.h kaerrors.c
${COMPILE_ET} -p ${srcdir} kaerrors -h kautils
kautils.h: kaerrors.et kautils.p.h
${COMPILE_ET_H} -p ${srcdir} kaerrors -h kautils
admin_tools.o: kautils.h
authclient.o: kautils.h
client.o: kautils.h
decode_ticket.o: kautils.h
kadatabase.o: kautils.h
kalocalcell.o: kautils.h
kaprocs.o: kautils.h
kas.o: kautils.h
kaserver.o: kautils.h
ka_util.o: kautils.h
kautils.o: kautils.h
klog.o: kautils.h
kpasswd.o: kautils.h
krb_tf.o: kautils.h
krb_udp.o: kautils.h
manyklog.o: kautils.h
rebuild.o: kautils.h
token.o: kautils.h
user.o: kautils.h
kauth.ss.o: kauth.ss.c
kauth.cs.o: kauth.cs.c

View File

@ -155,9 +155,22 @@ ptclient.o: ptclient.c ${INCLS} AFS_component_version_number.c
ptuser.o: ptuser.c ${LINCLS}
pterror.h pterror.c: pterror.et
$(RM) -f pterror.h pterror.c
${COMPILE_ET} -p ${srcdir} pterror
pterror.c: pterror.et
${COMPILE_ET_C} -p ${srcdir} pterror
pterror.h: pterror.et
${COMPILE_ET_H} -p ${srcdir} pterror
db_verify.o: pterror.h
ptclient.o: pterror.h
ptprocs.o: pterror.h
pts.o: pterror.h
ptuser.o: pterror.h
pt_util.o: pterror.h
ptutils.o: pterror.h
readgroup.o: pterror.h
testpt.o: pterror.h
utils.o: pterror.h
libprot.a: ptuser.o pterror.o ptint.cs.o ptint.xdr.o AFS_component_version_number.o
$(RM) -f $@

View File

@ -72,9 +72,22 @@ rxkad_common.o: fcrypt.h private_data.h rxkad_common.c ${INCLS}
rxkad_errs.o: rxkad_errs.c
rxkad_errs.c rxkad.h: rxkad_errs.et rxkad.p.h
$(RM) -f rxkad.h rxkad_errs.c
${COMPILE_ET} -p ${srcdir} rxkad_errs -h rxkad
rxkad_errs.c: rxkad_errs.et
${COMPILE_ET_C} -p ${srcdir} rxkad_errs
rxkad.h: rxkad_errs.et rxkad.p.h
${COMPILE_ET_H} -p ${srcdir} rxkad_errs -h rxkad
bg-fcrypt.o: rxkad.h
crc.o: rxkad.h
fcrypt.o: rxkad.h
fc_test.o: rxkad.h
md4.o: rxkad.h
md5.o: rxkad.h
rxkad_client.o: rxkad.h
ticket5.o: rxkad.h
ticket5_keytab.o: rxkad.h
ticket.o: rxkad.h
ticket.o: ticket.c lifetimes.h ${INCLS}
$(CC) $(CFLAGS) -c ${srcdir}/ticket.c

View File

@ -44,7 +44,7 @@
#include <string.h>
#include <rx/xdr.h>
#include <rx/rx.h>
#include <rx/rxkad.h>
#include "rxkad.h"
#include <des.h>
#include "lifetimes.h"
#include "md4.h"

View File

@ -43,7 +43,7 @@
#endif
#include <string.h>
#include <rx/rx.h>
#include <rx/rxkad.h>
#include "rxkad.h"
#include <des.h>
#include "lifetimes.h"

View File

@ -55,7 +55,7 @@
#include <rx/rx.h>
#include <rx/xdr.h>
#ifdef AFS_PTHREAD_ENV
#include "rx/rxkad.h"
#include "rxkad.h"
#endif /* AFS_PTHREAD_ENV */
#endif /* KERNEL */

View File

@ -70,8 +70,15 @@ stress_errs.o: stress_errs.c
th_stress_errs.o: stress_errs.c
${THRULE} -c $(srcdir)/stress_errs.c -o th_stress_errs.o
stress_errs.c stress_errs.h: stress_errs.et
$(RM) -f stress_errs.h stress_errs.c; ${COMPILE_ET} -p ${srcdir} stress_errs -h stress_errs
stress_errs.c: stress_errs.et
${COMPILE_ET_C} -p ${srcdir} stress_errs
stress_errs.h: stress_errs.et
${COMPILE_ET_H} -p ${srcdir} stress_errs
stress_c.o: stress_errs.h
stress.o: stress_errs.h
stress_s.o: stress_errs.h
stress.o: ${HEADERS}
stress_c.o: ${HEADERS}

View File

@ -27,7 +27,7 @@
#include <afs/param.h>
#include <afs/stds.h>
#include <rx/rx.h>
#include <rx/rxkad.h>
#include "rxkad.h"
#include <string.h>
#include <errno.h>

View File

@ -58,11 +58,23 @@ SERVER_OBJS = ${COMMON_OBJS} budb.ss.o budb.xdr.o dbs_dump.o db_lock.o db_text.o
all: ${TOP_LIBDIR}/libbudb.a ${TOP_INCDIR}/afs/budb.h ${TOP_INCDIR}/afs/budb_errs.h ${TOP_INCDIR}/afs/budb_client.h budb_server ${INCLS}
budb_errs.h: budb_errs.c
budb_errs.c: ${BUDB}/budb_errs.et
$(RM) -f budb_errs.c
${COMPILE_ET} -p ${srcdir}/${BUDB} budb_errs
${COMPILE_ET_C} -p ${BUDB} budb_errs
budb_errs.h: ${BUDB}/budb_errs.et
${COMPILE_ET_H} -p ${BUDB} budb_errs
database.o: budb_errs.h
db_alloc.o: budb_errs.h
db_dump.o: budb_errs.h
db_hash.o: budb_errs.h
db_lock.o: budb_errs.h
dbs_dump.o: budb_errs.h
db_text.o: budb_errs.h
ol_verify.o: budb_errs.h
procs.o: budb_errs.h
server.o: budb_errs.h
struct_ops.o: budb_errs.h
#
# Build targets

View File

@ -174,9 +174,22 @@ ptclient.o: ${PTSERVER}/ptclient.c ${INCLS}
ptuser.o: ${PTSERVER}/ptuser.c ${INCLS}
${CCRULE} ${srcdir}/${PTSERVER}/ptuser.c
pterror.h pterror.c: ${PTSERVER}/pterror.et
$(RM) -f pterror.h pterror.c
${COMPILE_ET} -p ${srcdir}/${PTSERVER} pterror
pterror.c: ${PTSERVER}/pterror.et
${COMPILE_ET_C} -p ${PTSERVER} pterror
pterror.h: ${PTSERVER}/pterror.et
${COMPILE_ET_H} -p ${PTSERVER} pterror
db_verify.o: pterror.h
ptclient.o: pterror.h
ptprocs.o: pterror.h
pts.o: pterror.h
ptuser.o: pterror.h
pt_util.o: pterror.h
ptutils.o: pterror.h
readgroup.o: pterror.h
testpt.o: pterror.h
utils.o: pterror.h
pts: pts.o $(PTOBJS) ${TOP_LIBDIR}/libcmd.a $(LIBS) ${INCLS}
$(CC) ${LDFLAGS} -o pts pts.o ${TOP_LIBDIR}/libcmd.a $(PTOBJS) ${LIBS} ${MT_LIBS} ${XLIBS} ${KRB5_LIBS}

View File

@ -179,8 +179,18 @@ vlclient.o: ${VLSERVER}/vlclient.c
vl_errors.o: vl_errors.c
${CCRULE} vl_errors.c
vlserver.h vl_errors.c: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h
$(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir}/${VLSERVER} vl_errors -h vlserver
vl_errors.c: ${VLSERVER}/vl_errors.et
${COMPILE_ET_C} -p ${VLSERVER} vl_errors
vlserver.h: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h
${COMPILE_ET_H} -p ${VLSERVER} vl_errors -h vlserver
cnvldb.o: vlserver.h
vlclient.o: vlserver.h
vldb_check.o: vlserver.h
vlprocs.o: vlserver.h
vlserver.o: vlserver.h
vlutils.o: vlserver.h
system: install

View File

@ -137,8 +137,18 @@ aclprocs.o: ${LIBACL}/aclprocs.c
netprocs.o: ${LIBACL}/netprocs.c
${COMPILE}
vlserver.h vl_errors.c: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h
$(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${VLSERVER} vl_errors -h vlserver
vl_errors.c: ${VLSERVER}/vl_errors.et
${COMPILE_ET_C} -p ${VLSERVER} vl_errors
vlserver.h: ${VLSERVER}/vl_errors.et ${VLSERVER}/vlserver.p.h
${COMPILE_ET_H} -p ${VLSERVER} vl_errors -h vlserver
cnvldb.o: vlserver.h
vlclient.o: vlserver.h
vldb_check.o: vlserver.h
vlprocs.o: vlserver.h
vlserver.o: vlserver.h
vlutils.o: vlserver.h
vl_errors.o: vl_errors.c
${COMPILE}

View File

@ -108,9 +108,26 @@ udebug.o: udebug.c ${INCLS} AFS_component_version_number.c
uerrors.o: uerrors.c
uerrors.c ubik.h: uerrors.et ubik.p.h
$(RM) -f ubik.h uerrors.c
${COMPILE_ET} -p ${srcdir} uerrors -h ubik
uerrors.c: uerrors.et
${COMPILE_ET_C} -p ${srcdir} uerrors
ubik.h: uerrors.et ubik.p.h
${COMPILE_ET_H} -p ${srcdir} uerrors -h ubik
beacon.o: ubik.h
disk.o: ubik.h
lock.o: ubik.h
phys.o: ubik.h
recovery.o: ubik.h
remote.o: ubik.h
ubik.o: ubik.h
ubikclient.o: ubik.h
ubikcmd.o: ubik.h
udebug.o: ubik.h
uinit.o: ubik.h
utst_client.o: ubik.h
utst_server.o: ubik.h
vote.o: ubik.h
libubik.a: ${LIBOBJS} AFS_component_version_number.o
-$(RM) -f $@

View File

@ -129,8 +129,19 @@ vlclient: vlclient.o libvldb.a $(LIBS)
vlclient.o: vlclient.c ${INCLS} AFS_component_version_number.o
vl_errors.o: vl_errors.c
vlserver.h vl_errors.c: vl_errors.et vlserver.p.h
$(RM) -f vlserver.h vl_errors.c; ${COMPILE_ET} -p ${srcdir} vl_errors -h vlserver
vl_errors.c: vl_errors.et
${COMPILE_ET_C} -p ${srcdir} vl_errors
vlserver.h : vl_errors.et vlserver.p.h
${COMPILE_ET_H} -p ${srcdir} vl_errors -h vlserver
cnvldb.o: vlserver.h
vlclient.o: vlserver.h
vldb_check.o: vlserver.h
vlprocs.o: vlserver.h
vlserver.o: vlserver.h
vlutils.o: vlserver.h
vlserver.o: vlserver.c

View File

@ -106,9 +106,23 @@ libvolser.a: volint.cs.o $(VSOBJS) volint.ss.o AFS_component_version_number.o
volser.h: volerr.c
volerr.c: volerr.et volser.p.h
$(RM) -f volser.h volerr.c
${COMPILE_ET} -p ${srcdir} volerr -h volser
volerr.c: volerr.et
${COMPILE_ET_C} -p ${srcdir} volerr
volser.h: volerr.et volser.p.h
${COMPILE_ET_H} -p ${srcdir} volerr -h volser
common.o: volser.h
dumpstuff.o: volser.h
lockprocs.o: volser.h
vol-dump.o: volser.h
volmain.o: volser.h
volprocs.o: volser.h
vol_split.o: volser.h
voltrans.o: volser.h
vos.o: volser.h
vsprocs.o: volser.h
vsutils.o: volser.h
volint.cs.c: volint.xg
${RXGEN} -A -x -C -o $@ ${srcdir}/volint.xg