Ignore:
Timestamp:
2009-12-16T14:11:07+13:00 (14 years ago)
Author:
ak19
Message:

New configuration and compilation flag ENABLE_JNI added which will be disabled by default for GS2 since in general GS doesn't need mg and mgpp compiled up with jni. GS3's build.xml will need to explicitly set ENABLE_JNI to compile mg and mgpp with jni.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/Makefile.in

    r19262 r21366  
    5555MODULEDIRS = @MODULEDIRS@
    5656
     57ENABLE_JNI=@ENABLE_JNI@
     58ifeq ($(ENABLE_JNI), 1)
     59COMPILE_TARGET=with-jni
     60else
     61COMPILE_TARGET=without-jni
     62endif
    5763
    58 # we don't want to compile the jni stuff in indexers for gs2
    59 all:
     64
     65# with some compilers, just calling another target is insufficient
     66# so an extra echo stmt is added after each call to another target
     67all:    $(COMPILE_TARGET)
     68    @echo "Compile done"
     69
     70install: install-$(COMPILE_TARGET)
     71    @echo "Install done"
     72
     73
     74with-jni without-jni:
    6075    for odir in $(SPECIAL_COMPILEDIRS); do \
    61     echo making gs2 in $$odir; \
    62     (cd $$odir && $(MAKE) $(MDEFINES) gs2) || exit 1; \
     76      if test -d $$odir; then \
     77        echo making $(COMPILE_TARGET) in $$odir; \
     78        (cd $$odir && $(MAKE) $(MDEFINES) $(COMPILE_TARGET)) || exit 1; \
     79      fi; \
    6380    done
    6481    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
    65       echo making $@ in $$odir; \
    66       (cd $$odir && $(MAKE) $(MDEFINES) $@) || exit 1; \
     82      if test -d $$odir; then \
     83        echo making all in $$odir; \
     84        (cd $$odir && $(MAKE) $(MDEFINES) all) || exit 1; \
     85      fi; \
    6786    done
    6887
    69 install: all
     88install-with-jni install-without-jni: all
    7089    for idir in $(SPECIAL_INSTALLDIRS); do \
    71       echo installing $$idir; \
    72       (cd $$idir && $(MAKE) install-gs2) || exit 1; \
     90      if test -d $$idir; then \
     91        echo installing $$idir $(COMPILE_TARGET); \
     92        (cd $$idir && $(MAKE) install-$(COMPILE_TARGET)) || exit 1; \
     93      fi; \
    7394    done
    7495    for idir in $(INSTALLDIRS); do \
    75       echo installing $$idir; \
    76       (cd $$idir && $(MAKE) install) || exit 1; \
     96      if test -d $$idir; then \
     97        echo installing $$idir; \
     98        (cd $$idir && $(MAKE) install) || exit 1; \
     99      fi; \
    77100    done
    78101
    79102apache-for-dist:
    80     (cd runtime-src/packages && $(MAKE) apache-for-dist) || exit 1;
     103    if test -d runtime-src; then \
     104      (cd runtime-src/packages && $(MAKE) apache-for-dist) || exit 1; \
     105    fi
    81106
    82 # include the Greenstone Server Interface Makefile here
    83 include GSI-Makefile
     107# For GS2: include the Greenstone Server Interface Makefile here
     108# http://www.makelinux.net/make3/make3-CHP-3-SECT-7.html
     109sinclude GSI-Makefile
    84110
    85111distclean: clean
    86112    rm -f Makefile config.cache config.h config.log stamp-h config.status
    87113    for subdir in $(SPECIAL_COMPILEDIRS) $(COMPILEDIRS); do \
    88       echo cleaning $@ in $$subdir; \
    89       (cd $$subdir && $(MAKE) distclean) || exit 1; \
     114      if test -d $$subdir; then \
     115        echo cleaning $@ in $$subdir; \
     116        (cd $$subdir && $(MAKE) distclean) || exit 1; \
     117      fi; \
    90118    done
    91119
    92120clean:
    93121    for subdir in $(SPECIAL_COMPILEDIRS) $(COMPILEDIRS); do \
    94       echo cleaning $@ in $$subdir; \
    95       (cd $$subdir && $(MAKE) clean) || exit 1; \
     122      if test -d $$subdir; then \
     123        echo cleaning $@ in $$subdir; \
     124        (cd $$subdir && $(MAKE) clean) || exit 1; \
     125      fi; \
    96126    done
    97127
Note: See TracChangeset for help on using the changeset viewer.