Changeset 18560 for gsdl


Ignore:
Timestamp:
02/20/09 13:32:31 (12 years ago)
Author:
davidb
Message:

Additinal targets to support Server2.java

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/Makefile.in

    r18494 r18560  
    6868    done
    6969
    70 configure-cgi:
    71     @if test ! -z "$(GSDLHOME)" ; then \
    72       echo "Configuring cgi-bin/gsdlsite.cfg" ; \
    73       sed "s@\*\*GSDLHOME\*\*@$(GSDLHOME)@g" cgi-bin/gsdlsite.cfg.in > cgi-bin/gsdlsite.cfg ; \
     70
     71
     72test-gsdlhome:
     73    @ if test -z "$(GSDLHOME)" ; then \
     74      echo "" ; \
     75      echo "Environment variable GSDLHOME not set." ; \
     76      echo "  This needs to be set to run this Makefile target." ; \
     77          echo "  Have you run 'source setup.bash'?" ; \
     78      echo "" ; \
     79      exit 1; \
    7480    else \
    75       echo "Environment variable GSDLHOME not set.  Have you run 'source setup.bash'?" ; \
     81      echo "Using: " ; \
     82      echo "  GSDLHOME = ${GSDLHOME}" ; \
     83      echo "  GSDLOS   = ${GSDLOS}" ; \
    7684    fi
    7785
     86configure-cgi: test-gsdlhome
     87    @ echo "Configuring cgi-bin/gsdlsite.cfg" ;
     88    sed "s@\*\*GSDLHOME\*\*@$(GSDLHOME)@g" cgi-bin/gsdlsite.cfg.in > cgi-bin/gsdlsite.cfg ;
    7889
    79 configure-admin:
    80     @ if test ! -z "$(GSDLHOME)" ; then \
    81       echo "" ; \
    82       echo "Configuring admin user password:" ; \
    83       encrypted_password=`getpw` ; \
    84       if [ $$? = "0" ] ; then \
    85         echo -e "[admin]\n<enabled>true\n<groups>administrator,colbuilder,all-collections-editor\n<password>$$encrypted_password\n<username>admin" \
    86                | txt2db -append "${GSDLHOME}/etc/users.db" ; \
    87       fi \
    88     else \
    89       echo "Environment variable GSDLHOME not set.  Have you run 'source setup.bash'?" ; \
     90
     91
     92configure-admin: test-gsdlhome
     93    @echo "" ;
     94    @echo "Configuring admin user password:" ;
     95    encrypted_password=`getpw` ;
     96    if [ $$? = "0" ] ; then \
     97      echo -e "[admin]\n<enabled>true\n<groups>administrator,colbuilder,all-collections-editor\n<password>$$encrypted_password\n<username>admin" \
     98             | txt2db -append "${GSDLHOME}/etc/users.db" ; \
    9099    fi
    91100    @echo ""
    92101
     102configure-port: test-gsdlhome
     103    @ echo "Enter port number to use:"
     104    @ ( read port ; \
     105        if test ! -z $$port ; then \
     106          echo "Stopping web server (if running)" ; \
     107          make web-stop-tested ; \
     108          echo "Setting config file to use port $$port"; \
     109          cat "${GSDLHOME}/apache-httpd/conf/httpd.conf" \
     110        | sed "s/^Listen [0-9]\+/Listen $$port/" \
     111        > "${GSDLHOME}/apache-httpd/conf/httpd.conf.new" ; \
     112          echo "Type 'make web-start' to start the web server running on port $$port" ; \
     113        fi ; \
     114        echo "Done" ; )
     115     
     116MONITOR_SUCCESS="MAKE SUCCESSFUL"
     117MONITOR_FAILED="MAKE FAILED"
     118MONITOR_FINISHED="MAKE DONE"
    93119
     120web-status: test-gsdlhome
     121    ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl status
     122
     123web-start: test-gsdlhome
     124    ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl start
     125    @ echo $(MONITOR_SUCCESS)
     126    @ echo $(MONITOR_FINISHED)
     127
     128web-restart: test-gsdlhome
     129    ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl restart
     130    @ echo $(MONITOR_SUCCESS)
     131    @ echo $(MONITOR_FINISHED)
     132
     133web-graceful: test-gsdlhome
     134    ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl graceful
     135    @ echo $(MONITOR_SUCCESS)
     136    @ echo $(MONITOR_FINISHED)
     137
     138web-stop-tested:
     139    @# This version runs without testing for GSDLHOME
     140    @# Useful to be run as a target when we know test-gsdlhome has already
     141    @# been done.  This avoids a unnecessary repetition of printing
     142    @# out the values of GSDLHOME and GSDLOS
     143    ${GSDLHOME}/apache-httpd/${GSDLOS}/bin/apachectl stop
     144    @ echo $(MONITOR_SUCCESS)
     145    @ echo $(MONITOR_FINISHED)
     146
     147web-stop: test-gsdlhome web-stop-tested
    94148
    95149
Note: See TracChangeset for help on using the changeset viewer.