Changeset 88 for trunk/libjdkmidi/trunk

Show
Ignore:
Timestamp:
08/17/06 10:53:11 (2 years ago)
Author:
jeffk@…
Message:

native-tests support when cross compiling. added help messages and make install* now uses rsync instead of cp

Location:
trunk/libjdkmidi/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/libjdkmidi/trunk/configure

    r86 r88  
    6060# at the end of this script, all variables with the "magic_" prefix are outputted to the Makefile and the vars.sh 
    6161# in the appropriate format. The script file './reconfigure' is created with the current command line parameters 
     62 
     63# before we parse the command line arguments, do some rudimentary host machine investigation. 
     64 
    6265 
    6366 
  • trunk/libjdkmidi/trunk/magic.mak

    r85 r88  
    88PROJECT_VERSION?=$(shell date +%Y%m%d) 
    99 
     10BINARY_TARBALL_NAME?=$(PROJECT_NAME)-$(PROJECT_VERSION).tar.bz2 
     11 
    1012CROSS_COMPILING?=0 
    1113 
     
    1416LIB_SRC_DIR=$(LIB_DIRS) 
    1517 
     18RSYNC?=rsync 
     19RSYNC_OPTIONS?=-a --exclude='*~' --exclude='.svn' --exclude='CVS' 
    1620 
    1721TARGET_PLATFORM_GENERIC=1 
     
    496500 
    497501ifeq ($(CROSS_COMPILING),1) 
    498 all : native_dirs native_lib native_tools native_tests native_examples dirs lib tools tests examples  
     502all : native-dirs native-lib native-tools native-tests native-examples dirs lib tools tests examples  
    499503else 
    500504all : dirs lib tools tests examples  
     
    551555install-dev : install 
    552556   @-$(MKDIR) -p $(INSTALL_INCLUDE_DIR) $(INSTALL_LIB_DIR) 
    553    $(CP) -rp $(LIB_INCLUDE_DIR)/* $(INSTALL_INCLUDE_DIR)  
    554    $(CP) -rp $(OUTPUT_LIB) $(INSTALL_LIB_DIR)  
     557   @$(RSYNC) $(RSYNC_OPTIONS) $(LIB_INCLUDE_DIR)/* $(INSTALL_INCLUDE_DIR)  
     558   @$(RSYNC) $(RSYNC_OPTIONS) $(OUTPUT_LIB) $(INSTALL_LIB_DIR)  
    555559 
    556560.PHONY : install-dev-docs 
     
    558562install-dev-docs : docs install-dev 
    559563   @-$(MKDIR) -p $(INSTALL_DOCS_DIR) 
    560    $(CP) -rp $(OUTPUT_DOCS_DIR)/* $(INSTALL_DOCS_DIR) 
     564   @$(SYNC) $(RSYNC_OPTIONS) $(OUTPUT_DOCS_DIR)/* $(INSTALL_DOCS_DIR) 
    561565 
    562566.PHONY : test 
    563567 
     568ifeq ($(CROSS_COMPILING),1) 
     569test : native-test 
     570else 
    564571test: lib tools $(LIB_TESTS_SH_FILES) $(LIB_TESTS_EXE_FILES) 
    565572   @cd "$(OUTPUT_TESTS_DIR)"; \ 
     
    574581     if bash "$${i}" >"$${n}.out" 2>"$${n}.err"; then rm "$${n}.err"; echo SUCCESS:$${n}; else echo  FAIL:$${n}; fi;\ 
    575582   done 
     583endif 
    576584 
    577585.PHONY : docs 
     
    607615.PHONY : native_dirs 
    608616 
    609 native_dirs : 
     617native-dirs : 
    610618   -@$(MKDIR) -p $(NATIVE_ALL_OUTPUT_DIRS) 
    611619 
    612 .PHONY : native_lib 
    613  
    614 native_lib : native_dirs $(NATIVE_OUTPUT_LIB) 
     620.PHONY : native-lib 
     621 
     622native-lib : native-dirs $(NATIVE_OUTPUT_LIB) 
    615623 
    616624$(NATIVE_OUTPUT_LIB) : $(NATIVE_LIB_O_FILES)  
     
    629637.PHONY : native_tools 
    630638 
    631 native_tools : native_lib $(NATIVE_LIB_TOOLS_EXE_FILES) 
     639native-tools : native-lib $(NATIVE_LIB_TOOLS_EXE_FILES) 
    632640    
    633 .PHONY : native_examples 
    634  
    635 native_examples: native_lib $(NATIVE_LIB_EXAMPLES_EXE_FILES) 
     641.PHONY : native-examples 
     642 
     643native-examples: native-lib $(NATIVE_LIB_EXAMPLES_EXE_FILES) 
    636644    
    637 .PHONY : native_tests 
    638  
    639 native_tests: native_lib $(NATIVE_LIB_TESTS_EXE_FILES) 
     645.PHONY : native-tests 
     646 
     647native-tests: native-lib $(NATIVE_LIB_TESTS_EXE_FILES) 
     648 
     649.PHONY : native-test 
     650 
     651native-test: native-lib native-tools $(LIB_TESTS_SH_FILES) $(NATIVE_LIB_TESTS_EXE_FILES) 
     652   @cd "$(NATIVE_OUTPUT_TESTS_DIR)"; \ 
     653   for i in $(NATIVE_LIB_TESTS_EXE_FILES); \ 
     654   do \ 
     655     n=$$(basename $$i); \ 
     656     if $(VALGRIND) $(VALGRIND_OPTIONS) "./$${n}" >"$${n}.out" 2>"$${n}.err"; then rm "$${n}.err"; echo SUCCESS:$${n}; else echo  FAIL:$${n}; fi;\ 
     657   done; \ 
     658   for i in $(LIB_TESTS_SH_FILES); \ 
     659   do \ 
     660     n=$$(basename $$i); \ 
     661     if bash "$${i}" >"$${n}.out" 2>"$${n}.err"; then rm "$${n}.err"; echo SUCCESS:$${n}; else echo  FAIL:$${n}; fi;\ 
     662   done 
     663 
     664 
    640665endif 
    641666 
     
    690715   @echo "clean : clean intermediatte files" 
    691716   @echo "distclean / realclean : clean all built files (except docs)" 
    692    @echo "tools : build tool programs" 
    693    @echo "examples : build example programs" 
    694    @echo "tests : build test programs" 
     717   @echo "tools : build tool programs $(LIB_TOOLS_EXE_FILES)" 
     718   @echo "examples : build example programs $(LIB_EXAMPLES_EXE_FILES)" 
     719   @echo "tests : build test programs $(LIB_TESTS_EXE_FILES)" 
    695720   @echo "test : run tests, sh scripts and test programs" 
    696    @echo "dirs : create output dirs" 
     721   @echo "dirs : create output dirs $(OUTPUT_DIR)" 
    697722   @echo "install : install tool executables files into $(INSTALL_DIR)" 
    698723   @echo "install-dev : install tool executables, include files and library files into $(INSTALL_DIR)" 
    699724   @echo "install-dev-docs : install tool executables, include files, library files, and doxygen docs into $(INSTALL_DIR)" 
     725ifeq ($(CROSS_COMPILING),1) 
     726   @echo "native-dirs : create output dirs for native build in $(NATIVE_OUTPUT_DIR)" 
     727   @echo "native-lib : build native library $(NATIVE_OUTPUT_LIB)" 
     728   @echo "native-tests : build native tests $(NATIVE_LIB_TESTS_EXE_FILES)" 
     729   @echo "native-test : run native tests." 
     730endif 
    700731 
    701732# include any dependencies created during the last make.