From 3514c22d061171a1557509a728bc1fd523c9b956 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Sun, 13 Jun 2010 09:49:32 -0400 Subject: [PATCH] generated file target in order to cross compile, allow a way to generate generated files on the host Change-Id: I9639f350b179dbeb3d45802e8685da88a3b06c83 Reviewed-on: http://gerrit.openafs.org/2147 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- Makefile.in | 22 ++++++++++++++++++++++ src/afs/Makefile.in | 2 ++ src/auth/Makefile.in | 2 ++ src/bozo/Makefile.in | 2 ++ src/bubasics/Makefile.in | 7 +++++++ src/bucoord/Makefile.in | 2 ++ src/budb/Makefile.in | 4 ++++ src/cmd/Makefile.in | 2 ++ src/des/Makefile.in | 9 +++++++++ src/fsint/Makefile.in | 8 ++++++++ src/kauth/Makefile.in | 4 ++++ src/ptserver/Makefile.in | 4 ++++ src/rxkad/Makefile.in | 3 +++ src/rxstat/Makefile.in | 4 ++++ src/sys/Makefile.in | 4 ++++ src/tests/Makefile.in | 2 ++ src/ubik/Makefile.in | 6 ++++++ src/update/Makefile.in | 2 ++ src/vlserver/Makefile.in | 5 +++++ src/volser/Makefile.in | 2 ++ 20 files changed, 96 insertions(+) diff --git a/Makefile.in b/Makefile.in index c9bd0b1c49..5f9d6b2cf3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -30,6 +30,7 @@ COMPILE_PART2B = all COMPILE_PART2 = ${COMPILE_PART2A} ${COMPILE_PART2B} COMPILE_CLEAN = ${COMPILE_PART2A} clean COMPILE_DEPINSTALL = ${COMPILE_PART2A} depinstall +COMPILE_GENERATED = ${COMPILE_PART2A} generated all: force $(MAKE) build @@ -46,6 +47,27 @@ only_libafs_tree: force buildtools: force $(MAKE) build TARGET=build_tools COMPILE_PART2B=buildtools +generated: force buildtools + +${COMPILE_PART1} afs ${COMPILE_GENERATED} + +${COMPILE_PART1} auth ${COMPILE_GENERATED} + +${COMPILE_PART1} bozo ${COMPILE_GENERATED} + +${COMPILE_PART1} bubasics ${COMPILE_GENERATED} + +${COMPILE_PART1} bucoord ${COMPILE_GENERATED} + +${COMPILE_PART1} budb ${COMPILE_GENERATED} + +${COMPILE_PART1} cmd ${COMPILE_GENERATED} + +${COMPILE_PART1} des ${COMPILE_GENERATED} + +${COMPILE_PART1} fsint ${COMPILE_GENERATED} + +${COMPILE_PART1} kauth ${COMPILE_GENERATED} + +${COMPILE_PART1} ptserver ${COMPILE_GENERATED} + +${COMPILE_PART1} rxkad ${COMPILE_GENERATED} + +${COMPILE_PART1} rxstat ${COMPILE_GENERATED} + +${COMPILE_PART1} sys ${COMPILE_GENERATED} + +${COMPILE_PART1} tests ${COMPILE_GENERATED} + +${COMPILE_PART1} ubik ${COMPILE_GENERATED} + +${COMPILE_PART1} update ${COMPILE_GENERATED} + +${COMPILE_PART1} vlserver ${COMPILE_GENERATED} + +${COMPILE_PART1} volser ${COMPILE_GENERATED} + install: all install_dirs $(MAKE) build COMPILE_PART2B=install diff --git a/src/afs/Makefile.in b/src/afs/Makefile.in index 9f4864f3ce..787b0ffe2c 100644 --- a/src/afs/Makefile.in +++ b/src/afs/Makefile.in @@ -16,6 +16,8 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ all: depinstall +generated: afs_trace.h afs_trace.msf unified_afs.c unified_afs.h + afs_trace.h afs_trace.msf: afs_trace.et ${COMPILE_ET} -v 2 -p ${srcdir} afs_trace.et diff --git a/src/auth/Makefile.in b/src/auth/Makefile.in index 58f6dd43de..bd64ac0bad 100644 --- a/src/auth/Makefile.in +++ b/src/auth/Makefile.in @@ -34,6 +34,8 @@ depinstall: ${TOP_INCDIR}/afs/keys.h \ ${TOP_INCDIR}/afs/auth.h \ ${TOP_INCDIR}/afs/ktc.h +generated: acfg_errors.c cellconfig.h ktc_errors.c auth.h + ${TOP_INCDIR}/afs/keys.h: keys.h ${INSTALL_DATA} $? $@ diff --git a/src/bozo/Makefile.in b/src/bozo/Makefile.in index 14bb2794d9..630e406e91 100644 --- a/src/bozo/Makefile.in +++ b/src/bozo/Makefile.in @@ -45,6 +45,8 @@ bosoprocs.o cronbnodeops.o all: bosserver ${TOP_INCDIR}/afs/bosint.h bos ${TOP_LIBDIR}/libbos.a bos_util +generated: bosint.ss.c bosint.xdr.c bosint.cs.c bosint.h bnode.h boserr.c + ${TOP_INCDIR}/afs/bosint.h: bosint.h ${INSTALL_DATA} $? $@ diff --git a/src/bubasics/Makefile.in b/src/bubasics/Makefile.in index ab0444f13a..99a4f1930e 100644 --- a/src/bubasics/Makefile.in +++ b/src/bubasics/Makefile.in @@ -15,6 +15,13 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ all: ${TOP_LIBDIR}/libbubasics.a ${TOP_INCDIR}/afs/bumon.h ${TOP_INCDIR}/afs/butc.h ${TOP_INCDIR}/afs/bubasics.h ${TOP_INCDIR}/afs/butx.h \ ${TOP_INCDIR}/afs/tcdata.h ${TOP_INCDIR}/afs/butm.h +generated: \ + butc.ss.c butc.cs.c butc.xdr.c butc.h \ + bumon.ss.c bumon.cs.c bumon.xdr.c bumon.h \ + butc_errs.c tcdata.h \ + butm_errs.c butm.h \ + butx_errs.c butx.h + OBJS=butc.ss.o butc.cs.o butc.xdr.o bumon.ss.o bumon.cs.o bumon.xdr.o butc_errs.o butm_errs.o butx_errs.o ${TOP_LIBDIR}/libbubasics.a: libbubasics.a diff --git a/src/bucoord/Makefile.in b/src/bucoord/Makefile.in index 49aa840483..d0a507e859 100644 --- a/src/bucoord/Makefile.in +++ b/src/bucoord/Makefile.in @@ -24,6 +24,8 @@ LIBS=${TOP_LIBDIR}/libbudb.a ${TOP_LIBDIR}/libbubasics.a \ all: ${TOP_LIBDIR}/libbxdb.a ${TOP_INCDIR}/afs/bucoord_prototypes.h ${TOP_INCDIR}/afs/bc.h backup +generated: bucoord_errs.c bc.h + ${TOP_LIBDIR}/libbxdb.a: libbxdb.a ${INSTALL_DATA} $? $@ diff --git a/src/budb/Makefile.in b/src/budb/Makefile.in index 9611616525..ef251bb5cd 100644 --- a/src/budb/Makefile.in +++ b/src/budb/Makefile.in @@ -51,6 +51,10 @@ 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_prototypes.h budb_server +generated: \ + budb_errs.c budb_errs.h budb_client.h \ + budb.cs.c budb.ss.c budb.xdr.c budb.h + ${TOP_LIBDIR}/libbudb.a: libbudb.a ${INSTALL_DATA} $? $@ diff --git a/src/cmd/Makefile.in b/src/cmd/Makefile.in index 6c954eb129..260bcc0995 100644 --- a/src/cmd/Makefile.in +++ b/src/cmd/Makefile.in @@ -19,6 +19,8 @@ all: ${TOP_LIBDIR}/libcmd.a ${TOP_INCDIR}/afs/cmd.h all64: all ${TOP_LIBDIR}/libcmd64.a +generated: cmd.h cmd_errors.c + ${TOP_LIBDIR}/libcmd.a: libcmd.a ${INSTALL_DATA} $? $@ diff --git a/src/des/Makefile.in b/src/des/Makefile.in index ee85ab45c1..19a88f5f75 100644 --- a/src/des/Makefile.in +++ b/src/des/Makefile.in @@ -67,6 +67,15 @@ buildtools: \ ${TOP_INCDIR}/mit-cpyright.h \ ${TOP_INCDIR}/des/stats.h +generated: \ + p.c \ + key_perm.h \ + s_table.h \ + p_table.h \ + ip.c \ + fp.c \ + odd.h + ${TOP_LIBDIR}/libdes.a: libdes.a ${INSTALL_DATA} $? $@ diff --git a/src/fsint/Makefile.in b/src/fsint/Makefile.in index 5704a7b54e..8dd4a673ad 100644 --- a/src/fsint/Makefile.in +++ b/src/fsint/Makefile.in @@ -25,6 +25,14 @@ depinstall: \ Kpagcb.ss.c Kpagcb.h Kpagcb.cs.c Kpagcb.xdr.c \ afscbint.h afsint.h pagcb.h +generated: \ + Kcallback.cs.c Kcallback.ss.c Kcallback.xdr.c Kcallback.h \ + Kvice.cs.c Kvice.ss.c Kvice.xdr.c Kvice.h \ + Kpagcb.cs.c Kpagcb.ss.c Kpagcb.xdr.c Kpagcb.h \ + pagcb.h \ + afscbint.cs.c afscbint.ss.c afscbint.xdr.c afscbint.h \ + afsint.cs.c afsint.ss.c afsint.xdr.c afsint.h + ${TOP_LIBDIR}/libafsint.a: libafsint.a ${INSTALL_DATA} $? $@ diff --git a/src/kauth/Makefile.in b/src/kauth/Makefile.in index ae28340b1f..a3ff4d1e16 100644 --- a/src/kauth/Makefile.in +++ b/src/kauth/Makefile.in @@ -66,6 +66,10 @@ depinstall: \ ${TOP_INCDIR}/afs/kauth.h \ ${TOP_INCDIR}/afs/kaport.h +generated: \ + kaerrors.c kautils.h \ + kauth.cs.c kauth.ss.c kauth.xdr.c kauth.h + ${TOP_LIBDIR}/libkauth.a: libkauth.a ${INSTALL_DATA} $? $@ diff --git a/src/ptserver/Makefile.in b/src/ptserver/Makefile.in index 5e86b40167..eeb3a2a1d4 100644 --- a/src/ptserver/Makefile.in +++ b/src/ptserver/Makefile.in @@ -46,6 +46,10 @@ LIBS=${TOP_LIBDIR}/libubik.a \ all: ptserver pts pt_util db_verify ${TOP_LIBDIR}/libprot.a \ depinstall readgroup readpwd testpt +generated: \ + pterror.h pterror.c \ + ptint.cs.c ptint.ss.c ptint.xdr.c ptint.h + depinstall: \ ptint.cs.c ptint.xdr.c \ ${TOP_INCDIR}/afs/prclient.h \ diff --git a/src/rxkad/Makefile.in b/src/rxkad/Makefile.in index f8320602d2..43982f4d09 100644 --- a/src/rxkad/Makefile.in +++ b/src/rxkad/Makefile.in @@ -35,6 +35,9 @@ fc_test_LIBS=\ all: ${TOP_LIBDIR}/librxkad.a depinstall test: fc_test +generated: \ + rxkad_errs.c rxkad.h + depinstall: \ ${TOP_INCDIR}/rx/rxkad.h \ ${TOP_INCDIR}/rx/rxkad_prototypes.h \ diff --git a/src/rxstat/Makefile.in b/src/rxstat/Makefile.in index b958ee9020..052deebf94 100644 --- a/src/rxstat/Makefile.in +++ b/src/rxstat/Makefile.in @@ -16,6 +16,10 @@ LIBOBJS = rxstat.cs.o rxstat.ss.o rxstat.xdr.o rxstat.o all: depinstall ${TOP_LIBDIR}/librxstat.a +generated: \ + Krxstat.cs.c Krxstat.ss.c Krxstat.xdr.c \ + rxstat.cs.c rxstat.ss.c rxstat.xdr.c rxstat.h + depinstall: \ ${TOP_INCDIR}/rx/rxstat.h Krxstat.cs.c \ Krxstat.ss.c Krxstat.xdr.c diff --git a/src/sys/Makefile.in b/src/sys/Makefile.in index cc7c1d0f42..f5f75055ef 100644 --- a/src/sys/Makefile.in +++ b/src/sys/Makefile.in @@ -36,6 +36,10 @@ all: \ ${KERNELDIR}/afs/xfsattrs.h \ ${UKERNELDIR}/afs/afsl.exp +generated: \ + rmtsys.cs.c rmtsys.ss.c rmtsys.xdr.c rmtsys.h \ + Krmtsys.cs.c Krmtsys.xdr.c Krmtsys.h + ${TOP_INCDIR}/afs/afssyscalls.h: afssyscalls.h ${INSTALL_DATA} $? $@ diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in index 2e141a648b..cf36bec5a4 100644 --- a/src/tests/Makefile.in +++ b/src/tests/Makefile.in @@ -44,6 +44,8 @@ all: run-tests OpenAFS/Dirpath.pm libxfiles.a libdumpscan.a $(TEST_PROGRAMS)\ afsdump_scan afsdump_dirlist afsdump_extract dumptool OpenAFS/Dirpath.sh @chmod +x run-tests +generated: xf_errs.c xf_errs.h dumpscan_errs.c dumpscan_errs.h + afsdump_scan: libxfiles.a libdumpscan.a $(OBJS_afsdump_scan) $(CC) $(CFLAGS) $(LDFLAGS) -o afsdump_scan $(OBJS_afsdump_scan) $(LIBS) diff --git a/src/ubik/Makefile.in b/src/ubik/Makefile.in index 37578aa06b..7b9136e924 100644 --- a/src/ubik/Makefile.in +++ b/src/ubik/Makefile.in @@ -26,6 +26,12 @@ LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a \ all: depinstall ${TOP_LIBDIR}/libubik.a udebug utst_server utst_client +generated: \ + utst_int.cs.c utst_int.ss.c utst_int.xdr.c utst_int.h \ + Kubik_int.cs.c Kubik_int.xdr.c Kubik_int.h \ + ubik_int.cs.c ubik_int.ss.c ubik_int.xdr.c ubik_int.h \ + uerrors.c ubik.h + depinstall: \ ubik_int.cs.c ubik_int.xdr.c \ ${TOP_INCDIR}/ubik.h \ diff --git a/src/update/Makefile.in b/src/update/Makefile.in index a7419bd566..03b2530ac4 100644 --- a/src/update/Makefile.in +++ b/src/update/Makefile.in @@ -24,6 +24,8 @@ LIBS=${TOP_LIBDIR}/libauth.a \ all: upserver upclient +generated: update.cs.c update.ss.c update.xdr.c update.h + # # Build targets # diff --git a/src/vlserver/Makefile.in b/src/vlserver/Makefile.in index 0aa5c02768..4b647b3d84 100644 --- a/src/vlserver/Makefile.in +++ b/src/vlserver/Makefile.in @@ -43,6 +43,11 @@ all: \ Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \ ${TOP_LIBDIR}/libvldb.a depinstall +generated: \ + vl_errors.c vlserver.h \ + Kvldbint.cs.c Kvldbint.xdr.c \ + vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h + depinstall: \ Kvldbint.cs.c Kvldbint.xdr.c vldbint.h \ ${TOP_INCDIR}/afs/vl_opcodes.h \ diff --git a/src/volser/Makefile.in b/src/volser/Makefile.in index aa2abaee87..214ab0572a 100644 --- a/src/volser/Makefile.in +++ b/src/volser/Makefile.in @@ -67,6 +67,8 @@ all: volserver vos restorevol voldump \ ${TOP_INCDIR}/afs/volint.h \ ${TOP_LIBDIR}/libvolser.a +generated: volser.h volerr.c volint.cs.c volint.ss.c volint.xdr.c volint.h + ${TOP_INCDIR}/afs/vsutils_prototypes.h: vsutils_prototypes.h ${INSTALL_DATA} $? $@