Changeset 21373


Ignore:
Timestamp:
12/16/09 19:35:58 (11 years ago)
Author:
ak19
Message:

ENABLE_JNI switch added in

File:
1 edited

Legend:

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

    r16592 r21373  
    4747ALLFILES = $(OBJECTS)
    4848
     49SPECIAL_COMPILEDIRS = common-src
     50COMPILEDIRS = build-src runtime-src
    4951
    50 COMPILEDIRS = common-src build-src
    51 
    52 INSTALLDIRS = common-src build-src
     52SPECIAL_INSTALLDIRS = common-src
     53INSTALLDIRS = build-src runtime-src
    5354
    5455MODULEDIRS = @MODULEDIRS@
    5556
     57ENABLE_JNI=@ENABLE_JNI@
     58ifeq ($(ENABLE_JNI), 1)
     59COMPILE_TARGET=with-jni
     60else
     61COMPILE_TARGET=without-jni
     62endif
    5663
    57 # we don't want to compile the jni stuff in indexers for gs2
    58 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:
     75    for odir in $(SPECIAL_COMPILEDIRS); do \
     76      if test -d $$odir; then \
     77        echo making $(COMPILE_TARGET) in $$odir; \
     78        (cd $$odir && $(MAKE) $(MDEFINES) $(COMPILE_TARGET)) || exit 1; \
     79      fi; \
     80    done
    5981    for odir in $(COMPILEDIRS) $(MODULEDIRS); do \
    60       echo making $@ in $$odir; \
    61       (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; \
    6286    done
    6387
    64 install: all
     88install-with-jni install-without-jni: all
     89    for idir in $(SPECIAL_INSTALLDIRS); do \
     90      if test -d $$idir; then \
     91        echo installing $$idir $(COMPILE_TARGET); \
     92        (cd $$idir && $(MAKE) install-$(COMPILE_TARGET)) || exit 1; \
     93      fi; \
     94    done
    6595    for idir in $(INSTALLDIRS); do \
    66       echo installing $$idir; \
    67       (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; \
    68100    done
     101
     102apache-for-dist:
     103    if test -d runtime-src; then \
     104      (cd runtime-src/packages && $(MAKE) apache-for-dist) || exit 1; \
     105    fi
     106
     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
    69110
    70111distclean: clean
    71112    rm -f Makefile config.cache config.h config.log stamp-h config.status
    72     for subdir in $(COMPILEDIRS); do \
    73       echo cleaning $@ in $$subdir; \
    74       (cd $$subdir && $(MAKE) distclean) || exit 1; \
     113    for subdir in $(SPECIAL_COMPILEDIRS) $(COMPILEDIRS); do \
     114      if test -d $$subdir; then \
     115        echo cleaning $@ in $$subdir; \
     116        (cd $$subdir && $(MAKE) distclean) || exit 1; \
     117      fi; \
    75118    done
    76119
    77120clean:
    78     for subdir in $(COMPILEDIRS); do \
    79       echo cleaning $@ in $$subdir; \
    80       (cd $$subdir && $(MAKE) clean) || exit 1; \
     121    for subdir in $(SPECIAL_COMPILEDIRS) $(COMPILEDIRS); do \
     122      if test -d $$subdir; then \
     123        echo cleaning $@ in $$subdir; \
     124        (cd $$subdir && $(MAKE) clean) || exit 1; \
     125      fi; \
    81126    done
    82127
Note: See TracChangeset for help on using the changeset viewer.