Ignore:
Timestamp:
2010-01-16T23:44:18+13:00 (14 years ago)
Author:
davidb
Message:

Adjustments to bring configure/Makefile logic in to line with main greenstone2 code

File:
1 edited

Legend:

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

    r16608 r21487  
    4747ALLFILES = $(OBJECTS)
    4848
     49SPECIAL_COMPILEDIRS = common-src
     50COMPILEDIRS = runtime-src
    4951
    50 COMPILEDIRS = common-src runtime-src
    51 
    52 INSTALLDIRS = common-src runtime-src
     52SPECIAL_INSTALLDIRS = common-src
     53INSTALLDIRS = 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
    69101
Note: See TracChangeset for help on using the changeset viewer.