You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xang-cvs@xml.apache.org by md...@locus.apache.org on 2000/03/23 00:20:01 UTC

cvs commit: xml-xang make.include make.include2 Makefile

mdierken    00/03/22 15:20:01

  Added:       .        make.include make.include2 Makefile
  Log:
  Initial cut at make system
  
  Revision  Changes    Path
  1.1                  xml-xang/make.include
  
  Index: make.include
  ===================================================================
  ###########################################################
  # Common variables and targets for Xang
  #
  # See Makefile for important environment notes
  #
  ###########################################################
  
  ###########################################################
  # Project-specific variables and rules
  #
  # You should not need to edit these
  ###########################################################
  JAVAX = .java
  CLASSX = .class
  JARX  = .jar
  OBJS  = $(SRCS:%.java=%.class)
  
  # A simple marker file created to show last compile time
  # Note subdirectories may reset the name!
  SINCE_FILE       = since.last
  
  # Relative directory (usually from ./src/.) where class files are to go
  CLASS_DIR        = classes
  
  CURRENT_DIR      = .
  
  JARNAME = xang$(JARX)
  
  ###########################################################
  # Environment-specific tools and flags definitions
  #
  # You may need to edit these if you're not using
  # a standard JDK or the tools aren't on the path.
  ###########################################################
  JAVA       = java
  JAVAC      = javac
  JAVACFLAGS = -g -d $(CLASS_DIR)
  # JAVACFLAGS = -g:none -O -d $(CLASS_DIR)
  JAR        = jar
  JARFLAGS   = cf0
  JAVADOC    = javadoc
  # Note that the xdocs subdir requires the use of at least JDK 1.2,
  # even though the src code will compile with JDK 1.1.8 (or equivalent)
  JAVA12       = java
  JAVAC12      = javac
  JAVADOC12  = javadoc
  RM         = rm -f
  CP         = cp -f
  UPDIR      := ..
  
  # Decide if we're on unix or DOS
  ifeq (,$(findstring usr,$(PATH)))
  # DOS
  PATHSEP := \\
  CLPATHSEP := ;
  else 
  # UNIX
  PATHSEP := /
  CLPATHSEP := :
  endif
  
  ###########################################################
  # Main targets definitions
  ###########################################################
  .PHONY: makeall
  makeall: all
  
  .PHONY: clean
  clean::
  	$(RM) *.class $(JARNAME) *~ *.bak *.o *.obj *.dll $(SINCE_FILE)
  
  .PHONY: makesubdirs
  makesubdirs:
  	@for i in $(SUBDIRS) ; \
  	do \
  	(cd $$i; echo making Xang engine in "$(CURRENT_DIR)/$$i..."; \
  	$(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile JAVACFLAGS="$(JAVACFLAGS)" all); \
  	done
  
  .PHONY: makedocs
  makedocs:
  	@for i in xdocs ; \
  	do \
  	(cd $$i; echo making x-docs in "$(CURRENT_DIR)/$$i..."; \
  	$(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile all); \
  	done
  
  .PHONY: makesamples
  makesamples:
  	@for i in samples ; \
  	do \
  	(cd $$i; echo making samples in "$(CURRENT_DIR)/$$i..."; \
  	$(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile all); \
  	done
  
  .PHONY: cleansubdirs
  cleansubdirs:
  	-@for i in $(SUBDIRS) ; \
  	do \
  	(cd $$i; echo cleaning in "$(CURRENT_DIR)/$$i..."; \
  	$(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i -f make_xang $(MFLAGS) clean); \
  	done
  
  .PHONY: cleandocs
  cleandocs:
  	@for i in docs ; \
  	do \
  	(cd $$i; echo cleaning up docs "$(CURRENT_DIR)/$$i..."; \
  	$(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile clean); \
  	done
  
  .PHONY: cleansamples
  cleansamples:
  	@for i in samples ; \
  	do \
  	(cd $$i; echo cleaning up samples "$(CURRENT_DIR)/$$i..."; \
  	$(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile clean); \
  	done
  
  # End of file
  
  
  1.1                  xml-xang/make.include2
  
  Index: make.include2
  ===================================================================
  ###########################################################
  # Common definitions and main 'compile' rule for xpath and xslt.
  #
  # See Makefile for important environment notes
  #
  ###########################################################
  
  # Note this is separate from the variable in make.include
  CLASSESDIR = classes
  
  # Add other required dirs to the classpath
  FESI_CLASSPATH := ..$(PATHSEP)fesi.jar
  EXTRA_CLASSPATH := $(FESI_CLASSPATH)$(CLPATHSEP)$(CLASSESDIR)$(CLPATHSEP)$(CLASSPATH)
  
  sincelast: $(SINCE_FILE)
  $(SINCE_FILE): $(SRCS)
  	-mkdir $(CLASSESDIR)
  	$(JAVAC) $(JAVACFLAGS) -classpath "$(EXTRA_CLASSPATH)" $?
  	touch $(SINCE_FILE)
  
  
  
  
  
  1.1                  xml-xang/Makefile
  
  Index: Makefile
  ===================================================================
  ###########################################################
  # Makefile for xml-xang, a Web Application Framework
  #
  # Please note the following assumptions!
  #  - See make.include for system tools definitions. We assume
  #    that each of these tools are on the path and properly setup.
  #  
  #  - Use GNU make or an equivalent.  On Win32, you can see
  #    http://sourceware.cygnus.com/cygwin for a port. 
  #  
  #  - With JDK 1.1.7B or earlier, a 'make all' may fail the first
  #    time. Try running it again twice, and everything should work.
  #    Note that when using JDK 1.2.x, it all works fine. We'll work on it.
  #  
  #  - Note the several attempts to determine if we're on WinXX or Unix:
  #    ifeq (,$(findstring usr,$(PATH)))
  #    Feel free to modify to work for your machine, and suggest a better
  #    way to create a platform-independent makefile.
  #  
  #  - The docs directory currently requires javadoc from the JDK 1.2.x
  #    You may need to edit make.include 'JAVADOC12' for your system.
  #
  #  - Yes, we plan to move to an 'Ant' based make system soon
  #    (Ant is from jakarta.apache.org and is a Java-based make)
  ###########################################################
  
  include make.include
  
  EXTRA_CLASSPATH = .
  
  SUBDIRS = java/src
  
  ###########################################################
  # Main targets definitions
  #
  # Note that make.include also defines common targets
  ###########################################################
  all: makesubdirs makejar makesamples makedocs
  
  build: makesubdirs makejar
  
  # Create a distribution module
  dist: makedist
  
  docs: makedocs
  
  samples: makesamples
  
  # Need to do something here for passing debug flags
  debug: clean makesubdirs makejar
  
  # Need to do something here for passing debug flags
  release: clean makesubdirs makejar
  
  jars: $(JARNAME)
  
  makejar: $(JARNAME)
  
  
  PROPPATH = org/apache/xang/xap
  $(JARNAME)::
  	$(CP) java/src/$(PROPPATH)/*.cfg java/src/$(CLASS_DIR)/$(PROPPATH)/.
  	echo -n "Jarring ../$@ "
  	cd java/src/$(CLASS_DIR) 
  	$(JAR) $(JARFLAGS) ../../$@ org
  	echo "done"
  
  XANG     := xang
  XVERSION   = _0_0_1
  CPR = cp -Rvf
  .PHONY: makedist
  makedist:
  	echo Making distribution $(XANG)$(XVERSION); \
  	mkdir $(XANG)$(XVERSION) ; \
  	$(CP) * $(XANG)$(XVERSION) ; \
  	$(CPR) xdocs $(XANG)$(XVERSION) ; \
  	$(CPR) build $(XANG)$(XVERSION) ; \
  	$(CPR) samples $(XANG)$(XVERSION) ; \
  	$(CPR) java/src $(XANG)$(XVERSION) ; \
  	$(JAR) -cf $(XANG)$(XVERSION)$(JARX) $(XANG)$(XVERSION); \
  	echo NOTE: You may wish to manually sign this!
  
  # Subsidiary targets are defined in make.include
  clean:: cleansubdirs cleandocs cleansamples