[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ANTS question



I wrote:
> Odd.  Looks like the shell isn't expanding the glob.  Is the glob
> correct? 

It turns out BSD make does not expand more than one glob pattern used
as dependencies to a rule, so the first glob got expanded, but the
second one is just left as an ugly filename.

The only portable solution I found is to explicitly list all of the
.java files in the Makefile.in.

The best work-around for this problem is to just use GNU make
('gmake').  The attached patch will fix the problem for BSD make.

-Pat

----- ----- ---- ---  ---  --   -    -      -         -               -
Pat Tullmann                                       tullmann@cs.utah.edu
     To understand recursion one must first understand recursion.

Index: Makefile.in
===================================================================
RCS file: /n/fast/usr/lsrc/flux/CVS/ants/src/Makefile.in,v
retrieving revision 1.10
diff -u -u -r1.10 Makefile.in
--- Makefile.in	2001/02/06 18:43:57	1.10
+++ Makefile.in	2001/03/25 21:40:52
@@ -33,15 +33,143 @@
 JAR_EXT=@jar_ext@
 JNODEOS_LIB=@jnodeos_lib@
 JVMULATION_LIB=@jvmulation_lib@
-CONFIG_CLASSPATH=@config_classpath@ 
 # configure-time classpath...
 CNF_JAVAC_CLASSPATH=@javac_classpath@
 
 # some convenience variables
 SET_CLASSPATH=-classpath $${JAVAC_CLASSPATH}:${CNF_JAVAC_CLASSPATH}$(JNODEOS_LIB):${JVMULATION_LIB}:$(TOPDIR)/src 
-ANTS_SRCS=$(TOPDIR)/src/ants/*/*.java $(TOPDIR)/src/ants/*/*/*.java
-APPS_SRCS=$(TOPDIR)/src/apps/*/*.java
-TESTS_SRCS=$(TOPDIR)/src/tests/*.java
+
+## XXX BSD make compatibility.  BSD make does not support multiple 
+## wildcard patterns as dependencies.  Only a single pattern can be used.
+#ANTS_SRCS=$(TOPDIR)/src/ants/*/*.java $(TOPDIR)/src/ants/*/*/*.java
+#ANTS_SRCS=$(TOPDIR)/src/ants/*/{*.java,*/*.java}
+ANTS_SRCS=\
+	$(TOPDIR)/src/ants/core/ANEPDemultiplexKey.java \
+	$(TOPDIR)/src/ants/core/ANEPFlow.java	\
+	$(TOPDIR)/src/ants/core/ANTSDemultiplexKey.java \
+	$(TOPDIR)/src/ants/core/AppBooster.java	\
+	$(TOPDIR)/src/ants/core/AppConfig.java	\
+	$(TOPDIR)/src/ants/core/Application.java \
+	$(TOPDIR)/src/ants/core/Assert.java	\
+	$(TOPDIR)/src/ants/core/AttachException.java \
+	$(TOPDIR)/src/ants/core/Booster.java	\
+	$(TOPDIR)/src/ants/core/BoosterArgs.java \
+	$(TOPDIR)/src/ants/core/BuiltinProtocol.java \
+	$(TOPDIR)/src/ants/core/ByteArray.java	\
+	$(TOPDIR)/src/ants/core/Capsule.java	\
+	$(TOPDIR)/src/ants/core/CapsuleChannel.java \
+	$(TOPDIR)/src/ants/core/CapsuleClass.java \
+	$(TOPDIR)/src/ants/core/CodeGroup.java	\
+	$(TOPDIR)/src/ants/core/CodeRequestDemultiplexKey.java \
+	$(TOPDIR)/src/ants/core/ConfigurationManager.java \
+	$(TOPDIR)/src/ants/core/Console.java	\
+	$(TOPDIR)/src/ants/core/ConsoleCommand.java \
+	$(TOPDIR)/src/ants/core/ConsoleWorker.java \
+	$(TOPDIR)/src/ants/core/DLProtocol.java	\
+	$(TOPDIR)/src/ants/core/DLRequestCapsule.java \
+	$(TOPDIR)/src/ants/core/DLResponseCapsule.java \
+	$(TOPDIR)/src/ants/core/DataCapsule.java \
+	$(TOPDIR)/src/ants/core/DataProtocol.java \
+	$(TOPDIR)/src/ants/core/DuplicateCapsuleClassException.java \
+	$(TOPDIR)/src/ants/core/Entity.java	\
+	$(TOPDIR)/src/ants/core/Extension.java	\
+	$(TOPDIR)/src/ants/core/FullCodeGroupException.java \
+	$(TOPDIR)/src/ants/core/MIDIDRequestCapsule.java \
+	$(TOPDIR)/src/ants/core/MIDIDResponseCapsule.java \
+	$(TOPDIR)/src/ants/core/NeighborListener.java \
+	$(TOPDIR)/src/ants/core/NeighborTable.java \
+	$(TOPDIR)/src/ants/core/NoSuchApplicationError.java \
+	$(TOPDIR)/src/ants/core/Node.java	\
+	$(TOPDIR)/src/ants/core/NodeAddress.java \
+	$(TOPDIR)/src/ants/core/NodeCache.java	\
+	$(TOPDIR)/src/ants/core/NodeConfigure.java \
+	$(TOPDIR)/src/ants/core/NodeHasNoAddressError.java \
+	$(TOPDIR)/src/ants/core/NodeStat.java	\
+	$(TOPDIR)/src/ants/core/PendingRequest.java \
+	$(TOPDIR)/src/ants/core/PrimordialMessenger.java \
+	$(TOPDIR)/src/ants/core/PrimordialNode.java \
+	$(TOPDIR)/src/ants/core/Protocol.java	\
+	$(TOPDIR)/src/ants/core/ProtocolBooster.java \
+	$(TOPDIR)/src/ants/core/ProtocolRegister.java \
+	$(TOPDIR)/src/ants/core/ResourceLimitException.java \
+	$(TOPDIR)/src/ants/core/RouteTable.java	\
+	$(TOPDIR)/src/ants/core/Trace.java	\
+	$(TOPDIR)/src/ants/core/TypeID.java	\
+	$(TOPDIR)/src/ants/core/UnknownMidPackets.java \
+	$(TOPDIR)/src/ants/core/UnknownPacketHandler.java \
+	$(TOPDIR)/src/ants/core/UserID.java	\
+	$(TOPDIR)/src/ants/core/WatchDog.java	\
+	$(TOPDIR)/src/ants/core/Xdr.java	\
+	$(TOPDIR)/src/ants/core/security/AdminPermission.java \
+	$(TOPDIR)/src/ants/core/security/BasicPolicy.java \
+	$(TOPDIR)/src/ants/core/security/Permission.java \
+	$(TOPDIR)/src/ants/core/security/Policy.java \
+	$(TOPDIR)/src/ants/core/security/Principal.java \
+	$(TOPDIR)/src/ants/core/security/ReferenceMonitor.java \
+	$(TOPDIR)/src/ants/core/security/ReferenceMonitorException.java \
+	$(TOPDIR)/src/ants/core/security/SecurityDefaults.java \
+	$(TOPDIR)/src/ants/dante/AddressExhaustionException.java \
+	$(TOPDIR)/src/ants/dante/DanteCapsule.java \
+	$(TOPDIR)/src/ants/dante/DanteClient.java \
+	$(TOPDIR)/src/ants/dante/DanteConstants.java \
+	$(TOPDIR)/src/ants/dante/DanteProtocol.java \
+	$(TOPDIR)/src/ants/dante/DanteServer.java \
+	$(TOPDIR)/src/ants/route/DynamicRouteApp.java \
+	$(TOPDIR)/src/ants/route/DynamicRouteCapsule.java \
+	$(TOPDIR)/src/ants/route/DynamicRouteEntry.java \
+	$(TOPDIR)/src/ants/route/DynamicRouteEvent.java \
+	$(TOPDIR)/src/ants/route/DynamicRouteEvents.java \
+	$(TOPDIR)/src/ants/route/DynamicRouteProtocol.java \
+	$(TOPDIR)/src/ants/route/DynamicRouteTable.java \
+	$(TOPDIR)/src/ants/util/ByteCodeReader.java \
+	$(TOPDIR)/src/ants/util/ClassPathReader.java \
+	$(TOPDIR)/src/ants/util/ExtraKeyArgsError.java \
+	$(TOPDIR)/src/ants/util/InvalidKeyArgsException.java \
+	$(TOPDIR)/src/ants/util/KeyArgs.java	\
+	$(TOPDIR)/src/ants/util/LineListException.java \
+	$(TOPDIR)/src/ants/util/LineListTokenizer.java \
+	$(TOPDIR)/src/ants/util/MD5.java
+#APPS_SRCS=$(TOPDIR)/src/apps/*/*.java
+APPS_SRCS=\
+	$(TOPDIR)/src/apps/mobile/MobileApplication.java \
+	$(TOPDIR)/src/apps/mobile/MobileCapsule.java \
+	$(TOPDIR)/src/apps/mobile/MobileProtocol.java \
+	$(TOPDIR)/src/apps/mobile/MobileUpdateCapsule.java \
+	$(TOPDIR)/src/apps/multicast/MulticastApplication.java \
+	$(TOPDIR)/src/apps/multicast/MulticastCapsule.java \
+	$(TOPDIR)/src/apps/multicast/MulticastCapsuleCacheKey.java \
+	$(TOPDIR)/src/apps/multicast/MulticastCapsuleCacheValue.java \
+	$(TOPDIR)/src/apps/multicast/MulticastProtocol.java \
+	$(TOPDIR)/src/apps/multicast/MulticastSubscribeCapsule.java \
+	$(TOPDIR)/src/apps/ping/PingApplication.java \
+	$(TOPDIR)/src/apps/ping/PingCapsule.java \
+	$(TOPDIR)/src/apps/ping/PingProtocol.java \
+	$(TOPDIR)/src/apps/pong/PongApplication.java \
+	$(TOPDIR)/src/apps/pong/PongCapsule.java \
+	$(TOPDIR)/src/apps/pong/PongHelper.java	\
+	$(TOPDIR)/src/apps/pong/PongProtocol.java \
+	$(TOPDIR)/src/apps/stats/StatsApplication.java \
+	$(TOPDIR)/src/apps/stats/StatsCapsule.java \
+	$(TOPDIR)/src/apps/stats/StatsCapsuleCacheKey.java \
+	$(TOPDIR)/src/apps/stats/StatsCapsuleCacheValue.java \
+	$(TOPDIR)/src/apps/stats/StatsProtocol.java \
+	$(TOPDIR)/src/apps/stats/StatsReturnCapsule.java \
+	$(TOPDIR)/src/apps/statsfusion/StatsApplication.java \
+	$(TOPDIR)/src/apps/statsfusion/StatsCapsule.java \
+	$(TOPDIR)/src/apps/statsfusion/StatsCapsuleCacheKey.java \
+	$(TOPDIR)/src/apps/statsfusion/StatsCapsuleCacheValue.java \
+	$(TOPDIR)/src/apps/statsfusion/StatsProtocol.java \
+	$(TOPDIR)/src/apps/statsfusion/StatsReturnCapsule.java
+#TESTS_SRCS=$(TOPDIR)/src/tests/*.java
+TESTS_SRCS=\
+	$(TOPDIR)/src/tests/ANEPDemultiplexKeyTester.java \
+	$(TOPDIR)/src/tests/ANTSRDemultiplexKeyTester.java \
+	$(TOPDIR)/src/tests/CapsuleTester.java	\
+	$(TOPDIR)/src/tests/LineListTokenizerTest.java \
+	$(TOPDIR)/src/tests/ProtocolTester.java	\
+	$(TOPDIR)/src/tests/TestFailedException.java \
+	$(TOPDIR)/src/tests/Tester.java
+
 
 # No implicit rules in my makefiles
 .SUFFIXES:




[ Janos ] [ OSKit ] [ Network Testbed ] [ Flick ] [ Fluke ]
Flux Research Group / Department of Computer Science / University of Utah