-MODULES = lib # release
+MODULES = \
+ src
-all clean:
- @ for dir in $(MODULES); do \
+all clean docs :
+ for dir in $(MODULES); do \
(cd $$dir; ${MAKE} $@); \
- if [ "$$?" -ne "0" ]; then ERROR=$$?; echo "Error Code $$ERROR"; exit $$ERROR; fi; \
done
-
-docs:
- (cd lib; ${MAKE} $@); \
- if [ "$$?" -ne "0" ]; then ERROR=$$?; echo "Error Code $$ERROR"; exit $$ERROR; fi;
-
-install:
- echo NO OP
-Much more information on these topics can be found at www.erlware.org
-
-
-Building the tree
-=================
-
-To build, type make, it should all work from there.
-
-NOTE** if your system has erlang installed in a directory other than /usr/local/lib/erlang
-then you must set the environment variable ERL_RUN_TOP to that directory. For example
-if you have erlang installed in /home/jdoe/erlang then you should
-export ERL_RUN_TOP=/home/jdoe/erlang
-
-
-Creating a new application
-==========================
-
-A new application can be created by using the appgen utility in otp/tools/utilities.
-This utility will create a basic OTP app framework under the otp/lib directory and
-an OTP release under the otp/release directory.
-
-usage: appgen <appname> <prefix>
-
-Appname is the name of the application that you would like to create. The prefix is
-usually the first letter of each word in the appname. This prefix is to avoid name
-clashes between applications included in a release (Erlang does not have packages).
-
-example usage: appgen my_app ma
-
-which results in
-
-otp/lib/my_app & otp/release/my_app_rel
-
-Running a release
-=================
-
-Your release should contain all that you need to run your application. If your application
-depends on any applications that are supplied outside of this build tree or OTP itself then
-they may be added to the <appname>_rel.rel.src file. If the extra applications are present
-in this build tree then they will be found by the make process and included in the final
-release.
-
-To run a release there are two options: "local" and installed. The local version can be found
-in the otp/release/<appname>_rel/local directory which is added by the make process. This
-should be used during development to run your release interactively via an Erlang shell.
-To run a release in local mode cd into the "local" directory and run <appname>_rel.sh.
-
-The second way to run a release is to install it and run it as a daemon. This is used for
-applications in a production setting. To do this you need to first run make & make install
-from the <appname>_rel directory. This will place a complete production ready versioned
-release in the /usr/local/lib/ directory under <appname>_rel. To run an installed release
-cd to /usr/local/lib/<appname>_rel/release/<rel_vsn> and run <appname>_rel.sh.
-
-In the case where you want to create a production ready release on one machine and then deploy it
-on multiple identical machines you may create a production tar archive. To do this run
-make & make tar from the otp/release/<appname>_rel/ directory. This will create a tar file conataining
-the release name and version number in the file name. This tar can be shipped to its destination and
-untarred. Within the untarred directory there is a shell script entitled install.sh. Running this
-script will install the release by default in /usr/local/lib/<appname>_rel. An optional argument
-can be provided that will direct the installation to a different directory.
-
-Example install.sh /opt/lib
-
-This will install the release in /opt/lib/<appname>_rel
-
-
-
-
+Thrift Erlang Library
+
+README Author: Chris Piro (cpiro@facebook.com)
+Last Modified: 2007-Sep-17
+
+Thrift is distributed under the Thrift open source software license.
+Please see the included LICENSE file.
+
+Using Thrift with Erlang
+========================
+
+The Thrift Erlang binding is built using GNU make. Run `make' in
+lib/erl to generate the necessary .beam object files in lib/erl/ebin/.
+Although the directories are laid out much like an OTP application,
+these bindings (as you will soon discover) are not an OTP application
+proper. When starting the Erlang emulator (interpreter) you must use
+`-pa /path/to/thrift/lib/erl/ebin' to load the bindings.
+
+Running the Tutorial
+====================
+
+It is recommended to pattern your own servers after the tutorial
+included in tutorial/. Generate the gen-erl/ directory by running
+tutorial.thrift, then cd to tutorial/erl/ and run server.sh. This
+script includes the commmands necessary to compile the generated
+Erlang source, compile the tutorial server itself, and open the Erlang
+emulator. At the emulator prompt, type `server:start()' to begin
+listening for connections.
+
+Note that there is no tutorial client; you may use a supplied client
+in another language.
+
+Implementation Notes
+====================
+
+tExecptions and t*Factorys are straight "new" -- e.g. TF =
+tTransportFactory:new() everything else is start_new
+(i.e. gen_server:start_link) -- this spawns a process and returns a
+pid
+
+tErlProcessor is a shim around the generated code (which is not
+actually a gen_server). Of course tErlProcessor isn't a gen_server
+either ... thrift_oop_server is a shim to make our "Thrift objects"
+gen_servers. Maybe we should remove some layers?
+
+get/set never means process dictionary
+
+Use tErlServer and tErlAcceptor. tSimpleServer and tServerSocket as
+are present in the other bindings are incompatible by design ... the
+call trace is spastic across the process tree. tErlServer and
+tErlAcceptor follow the same model as iserve:
+
+ * the top level code spawns a tErlServer, which listens on a socket
+ * a tErlAcceptor is spawned and calls accept() on the listening
+socket
+ * when accept() finishes, the tErlAcceptor
+ * tells the tErlServer to spawn a new acceptor
+ * handles the requests by spawning a processor, a transport, and a
+protocol
+ * (the tricky part) when the socket closes, the protocol exits, so:
+ * the transport exits because it's the one caller of the protocol
+ * likewise, the processor exits because it's the caller of the
+transport
+ * the tErlAcceptor traps the protocol's exit and exits with an
+acceptor_done
+ * the tErlServer sees that the acceptor exited and does nothing
+since there is already another acceptor accept()ing on the listen
+socket
+
+For info about iserve: http://www.trapexit.org/A_fast_web_server_demonstrating_some_undocumented_Erlang_features
+
+Final Thoughts
+==============
+
+This binding is a work in progress. It's certainly less thoroughly
+tested than the other, older bindings. Despite using parts from
+otp_base it is not packaged well, nor is it an OTP application (not to
+mention its many smaller transgressions). This implementation
+intentionally patterns after the other bindings (which is why there's
+oop.erl and thrift_oop_server), but regretfully it departs from
+idiomatic Erlang. Please see the included TODO and contribute your
+improvements back to the project.
tutorial client
-find TODO(cpiro)s
make all methods effectful, remove the special casing (optionally, implement monads for Erlang)
change objects from {record_tag, ...} to {oop_object, {record_tag, ...}, other_useful_stuff}
carry around the class/superclasses so is_a(Object, ClassOrSuperclass) is easy
3) maybe hack up io:format and friends to run objects through oop:inspect automatically
+Currently we can't distingish a method exiting in the middle with an undef or function_clause from a method not being defined in a module. Big example: if the generated code can't be called at tErlProcessor.erl:63, it will exit with a missing_method not because tErlProcessor:process/3 is undefined, but because GP:process/3 is undefined, but the error makes it seem like the former happened. The oop code needs to be smarter -- I think it's possible to either a) hook into Erlang's missing function handler or b) do some introspection to determine directly whether a function is defined, rather than trying to infer from the exit.
+
test suites
-move as much as possible out of thrift_logger
+move as much (program logic) as possible out of thrift_logger
make thrift_logger 100% robust
move away from Factories
-move away from ?L0, ?M0, and friends ... make calls in oop
-better/worse yet, make an absyn transformer and introduce some slick syntax to make it less painful and more obvious what's going on
-ONLY IF our gentle nudging away from oop and thrift_oop_server isn't good enough
+move away from ?L0, ?M0, and friends ... make calls in oop or individual modules (like gen_servers should be)
-define(CLASS(Obj), element(1, Obj)).
--define(DEFINE_ATTR(Attr), attr(This, get, Attr, _Value) -> This#?MODULE.Attr;
+-define(DEFINE_ATTR(Attr), attr(This, get, Attr, _Value) -> This#?MODULE.Attr;
attr(This, set, Attr, Value) -> This#?MODULE{Attr=Value}
).
-
+
%%% static: use only if you're sure This is class ?MODULE and not a super/subclass
-define(ATTR(Attr), This#?MODULE.Attr).
%%% convenience for implementing inspect/1
%%% e.g. -> "foo=5"
--define(FORMAT_ATTR(Attr),
+-define(FORMAT_ATTR(Attr),
io_lib:write_atom(Attr) ++ "=" ++ io_lib:print(?ATTR(Attr))
).
-
-define(ATTR_DUMMY,
attr(dummy, dummy, dummy, dummy) ->
throw(dummy_attr_used)
+++ /dev/null
-include ../build/colors.mk
-
-MODULES=$(shell ls . | grep "[^(Makefile)]")
-
-all clean docs:
- @for dir in $(MODULES); do \
- (cd $$dir; if [ -e "SKIP" ]; then echo $${MY_LRED:-$(LRED)}"skipping \"make $@\" for $$dir"; else ${MAKE} $@; fi); \
- if [ "$$?" -ne "0" ]; then ERROR=$$?; echo "Error Code $$ERROR"; exit $$ERROR; fi; \
- echo -n $(OFF)$(NO_COLOR); \
- done
+++ /dev/null
-%%% Copyright (c) 2007- Facebook
-%%% Distributed under the Thrift Software License
-%%%
-%%% See accompanying file LICENSE or visit the Thrift site at:
-%%% http://developers.facebook.com/thrift/
-
+++ /dev/null
-MODULES = \
- src
-
-all clean docs:
- for dir in $(MODULES); do \
- (cd $$dir; ${MAKE} $@); \
- done
+++ /dev/null
-YMMV
-email cpiro@facebook.com
---
-
-TO START A SERVER:
-
-$ cd lib/erl/lib/thrift/
-$ cd tutorial
-$ thrift -cpp -java -py -php -rb -perl -erl -xsd -r tutorial.thrift
-$ cd ..
-$ make
-$ ./server.sh
-> Pid = server:start().
- ** GAZE IN AMAZEMENT **
-> server:stop(Pid).
-
-NOTES:
-
-get/set never means process dictionary
-
-tExecptions and t*Factorys are straight "new" -- e.g. TF = tTransportFactory:new()
-everything else is start_new (i.e. gen_server:start_link) -- this spawns a process and returns a pid
-
-notable change from the Ruby:
-in t*Server:new, the parameters now include a handler, i.e. the generated module name. For example if your interface is called calculator, then to spawn a TSimpleServer try: oop:start_new(tSimpleServer, [calculator, calculatorHandler, Transport, TF])
-
-tErlProcessor is a shim around the generated code (which is not actually a gen_server). Of course tErlProcessor isn't a gen_server either ... thrift_oop_server is a shim to make our "Thrift objects" gen_servers. Maybe we should remove some layers?
-
-Use tErlServer and tErlAcceptor. tSimpleServer and tServerSocket are incompatible by design ... the call trace is spastic across the process tree. tErlServer and tErlAcceptor follow the same model as iserve:
- * the top level code spawns a tErlServer, which listens on a socket
- * a tErlAcceptor is spawned and calls accept() on the listening socket
- * when accept() finishes, the tErlAcceptor
- * tells the tErlServer to spawn a new acceptor
- * handles the requests by spawning a processor, a transport, and a protocol
- * (the tricky part) when the socket closes, the protocol exits, so:
- * the transport exits because it's the one caller of the protocol
- * likewise, the processor exits because it's the caller of the transport
- * the tErlAcceptor traps the protocol's exit and exits with an acceptor_done
- * the tErlServer sees that the acceptor exited and does nothing since there is already another acceptor accept()ing on the listen socket
+++ /dev/null
-#!/bin/sh
-if ! [ -d tutorial/gen-erl ]; then
- echo generating gen-erl
- cd tutorial
- thrift -erl -rb -r tutorial.thrift
- cd ..
-fi
-echo "Compiling user/ and tutorial/gen-erl/..."
-mkdir ebin-user
-erlc -I include -I tutorial/gen-erl -o ebin-user user/*.erl tutorial/gen-erl/*.erl &&
-erl +K true -pa ebin -pa ebin-user
+++ /dev/null
-../../../../tutorial
\ No newline at end of file
+++ /dev/null
-../../../../tutorial/erl
\ No newline at end of file
+++ /dev/null
-Tue Oct 24 12:28:44 CDT 2006
-
-Copyright (c) <2006> <Martin J. Logan, Erlware>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software (OTP Base, fslib, G.A.S) and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
-INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
-PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
-OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+++ /dev/null
-include ../build/colors.mk
-
-MODULES=$(shell ls . | grep "[^(Makefile)]")
-
-all clean:
- @for dir in $(MODULES); do \
- (cd $$dir; if [ -e "SKIP" ]; then echo $${MY_LRED:-$(LRED)}"skipping \"make $@\" for $$dir"; else ${MAKE} $@; fi); \
- if [ "$$?" -ne "0" ]; then ERROR=$$?; echo "Error Code $$ERROR"; exit $$ERROR; fi; \
- echo -n $(OFF)$(NO_COLOR); \
- done
+++ /dev/null
-# ----------------------------------------------------
-# Make file for creating an otp release.
-# ----------------------------------------------------
-
-##
-# Basename of this release.
-##
-RELS=$(shell basename `pwd`)
-APP_NAME=$(shell echo $(RELS) | sed s/_rel$$//)
-
-include ../../build/otp.mk
-
-include ./vsn.mk
-
-#include $(ERL_TOP)/make/target.mk
-#include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-USR_LIBPATH=../../lib
-INSTALL_DIR=/usr/local/lib
-ABS_USER_LIBPATH=$(shell cd ../../lib;pwd)
-
-# ----------------------------------------------------
-# CREATE DIR STRUCTURE HERE
-# ----------------------------------------------------
-
-HTDOCS=$(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.html) \
- $(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.htm) \
- $(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.yaws)
-BUILD_FILES=fs_boot_smithe.beam fs_lists.beam fs_lib.beam
-
-LOCAL_DIR=local
-#LOCAL_DIR=$(shell cat $(RELS).rel.src |grep -m 1 '$(APP_NAME)' |awk -F '"' '{printf "%s-%s", $$2,$$4}')
-
-DIR_STRUCTURE= \
- $(LOCAL_DIR) \
- $(LOCAL_DIR)/log/$(REL_VSN) \
- $(LOCAL_DIR)/var/$(REL_VSN) \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/htdocs
-
-PRODUCTION_DIR_STRUCTURE= \
- $(RELS) \
- $(RELS)/release/$(REL_VSN) \
- $(RELS)/stage \
- $(RELS)/log/$(REL_VSN) \
- $(RELS)/var/$(REL_VSN) \
- $(RELS)/var/$(REL_VSN)/www \
- $(RELS)/var/$(REL_VSN)/www/htdocs \
- $(RELS)/var/$(REL_VSN)/www/conf
-
-# ----------------------------------------------------
-SCRIPT_AND_BOOT_FILES= \
- $(RELS).script \
- $(RELS).boot
-
-LOCAL_SCRIPT_AND_BOOT_FILES= \
- $(LOCAL_DIR)/$(RELS).script \
- $(LOCAL_DIR)/$(RELS).boot
-
-LOCAL_HTTP_CONF= \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types
-
-PRODUCTION_HTTP_CONF= \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types
-
-LOCAL_TARGET_FILES=$(LOCAL_HTTP_CONF) $(LOCAL_DIR)/$(RELS).config $(LOCAL_SCRIPT_AND_BOOT_FILES)
-
-LOCAL_TARGETS=$(LOCAL_DIR)/$(RELS).sh vsnit $(LOCAL_TARGET_FILES)
-
-PRODUCTION_TARGETS=$(RELS)/build/$(REL_VSN) \
- $(RELS)/lib \
- $(RELS)/stage/$(RELS).rel.src \
- $(RELS)/stage/$(RELS).config.src \
- $(RELS)/stage/yaws.conf.src \
- $(RELS)/stage/$(RELS).sh.src \
- $(RELS)/var/$(REL_VSN)/www/htdocs \
- $(RELS)/install.sh \
- $(RELS)/release/$(REL_VSN)/clean_release
-
-# ----------------------------------------------------
-# TARGETS
-# ----------------------------------------------------
-
-all debug opt instr script: $(DIR_STRUCTURE) $(LOCAL_TARGETS) $(PRODUCTION_DIR_STRUCTURE) $(PRODUCTION_TARGETS)
- @echo $(HTDOCS)
-
-install: stage
-
-tar: $(RELS)-$(LOCATION)-$(REL_VSN).tgz
-
-$(DIR_STRUCTURE):
- mkdir -p $@
-
-$(PRODUCTION_DIR_STRUCTURE):
- mkdir -p $@
-
-clean:
- $(RM) $(REL_SCRIPTS) $(TARGET_FILES)
- $(RM) -r $(LOCAL_DIR) $(PRODN_DIR)
- $(RM) $(RELS).rel
- $(RM) -r $(RELS)
- $(RM) $(RELS)*.tgz
- $(RM) $(RELS).rel.src.tmp
- $(RM) $(SCRIPT_AND_BOOT_FILES)
-
-docs:
-
-# ----------------------------------------------------
-# TARGETS FOR LOCAL MODE
-# ----------------------------------------------------
-
-# startup script for local mode
-$(LOCAL_DIR)/$(RELS).sh:
- @echo '#!/bin/sh' > $@
- @echo "cd $(CURDIR)/$(LOCAL_DIR)" >> $@
- @echo "erl -name $${USER}_$(RELS) -boot $(RELS) -config $(RELS).config \$$@" >> $@
- chmod +x $@
- @echo
- @echo "==== Start local node with \"sh $@\" ===="
- @echo
-
-# Create the config file for local mode.
-$(LOCAL_DIR)/$(RELS).config: $(RELS).config.src
- sed -e 's;%LOG_OTP%;$(CURDIR)/$(LOCAL_DIR)/log/$(REL_VSN);' \
- -e 's;%VAR_OTP%;$(CURDIR)/$(LOCAL_DIR)/var/$(REL_VSN);' \
- -e 's;%RELS%;$(RELS);g' \
- -e 's;%HOME%;$(HOME);g' \
- -e 's;%BROADCAST_ADDRESS%;$(BROADCAST_ADDRESS);g' \
- -e 's;%CONTACT_NODE%;$(CONTACT_NODE);g' \
- -e "s;%HOSTNAME%;`hostname --long`;" \
- -e 's;%APP_NAME%;$(APP_NAME);' \
- -e 's;%APP_VERSION%;$(APP_VERSION);g' \
- $< > $@
-
-# Create the httpd conf file for local mode.
-$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf: yaws.conf.src
- sed -e 's;%VAR_OTP%;$(CURDIR)/$(LOCAL_DIR)/var/$(REL_VSN);' \
- -e 's;%LOG_OTP%;$(CURDIR)/$(LOCAL_DIR)/log/$(REL_VSN);' \
- -e 's;%HTDOC_ROOT%;$(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs;' \
- -e 's;%APP_NAME%;$(APP_NAME);' \
- -e 's;%RELS%;$(RELS);' \
- -e 's;%USER%;$(USER);' \
- -e 's;%HTDOC_ROOT%;$(ABS_USER_LIBPATH);' \
- -e 's;%MHOST%;$(MHOST);' \
- $< > $@
-
-# Create the config file for local mode.
-vsnit: $(RELS).rel.src
- sed -e 's;%REL_VSN%;$(REL_VSN);' \
- $< > $<.tmp
-
-# Create and position script and boot files for local mode.
-$(LOCAL_SCRIPT_AND_BOOT_FILES):
- @ erl -pz $(USR_LIBPATH)/fslib/ebin \
- -noshell \
- -s fs_lib s_apply fs_boot_smithe make_script_and_boot "[\"$(ERL_RUN_TOP)/*\", \"$(USR_LIBPATH)\"]. " \
- \"$$(basename `pwd`)".rel.src.tmp\". " \
- "[local]. " \
- -s init stop
- cp $(SCRIPT_AND_BOOT_FILES) $(LOCAL_DIR)/
-
-$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types: ../../build/mime.types
- cp $< $@
-
-# ----------------------------------------------------
-# TARGETS FOR PRODUCTION MODE
-# ----------------------------------------------------
-$(RELS)/lib:
- # For some reason this will not happen if added to PRODUCTION_DIR_STRUCTURE
- mkdir $@
- @ erl -pz $(RELS)/build/$(REL_VSN) \
- -noshell \
- -s fs_lib s_apply fs_boot_smithe stage_from_relsrc "[\"$(USR_LIBPATH)\"]. " \
- \"$$(basename `pwd`)".rel.src\". " \
- \"$@\"". " \
- -s init stop
-
-# Move the htdocs from the local apps to the production htdoc root directory.
-$(RELS)/var/$(REL_VSN)/www/htdocs/: $(HTDOCS)
- @mkdir -p $(RELS)/var/$(REL_VSN)/www/htdocs; \
- for x in $(HTDOCS);do \
- cp $$x $@; \
- done
-
-# startup script for production mode
-$(RELS)/stage/$(RELS).sh.src:
- @echo '#!/bin/sh' > $@
- @echo "cd %INSTALL_DIR%/$(RELS)/release/$(REL_VSN)" >> $@
- @echo "erl -name $(RELS) -boot $(RELS) -config $(RELS).config -detached \$$@" >> $@
- chmod +x $@
-
-$(RELS)/build/$(REL_VSN): $(USR_LIBPATH)/fslib/ebin
- mkdir -p $(RELS)/build/$(REL_VSN)
- cp $</fs_boot_smithe.beam $@
- cp $</fs_lib.beam $@
- cp $</fs_lists.beam $@
-
-$(RELS)/stage/$(RELS).rel.src: $(RELS).rel.src.tmp
- cp $< $@
-
-$(RELS)/stage/$(RELS).config.src: $(RELS).config.src
- cp $< $@
-
-$(RELS)/stage/yaws.conf.src: yaws.conf.src
- cp $< $@
-
-$(RELS)/install.sh:
- @echo '#!/bin/sh' > $@
- @echo "" >> $@
- @echo "if [ \$$# -eq 1 ];then" >> $@
- @echo " INSTALL_DIR=\$$1;" >> $@
- @echo "else" >> $@
- @echo " INSTALL_DIR=$(INSTALL_DIR);" >> $@
- @echo "fi" >> $@
- @echo "" >> $@
- @echo "function munge() {" >> $@
- @echo " sed -e \"s;%LOG_OTP%;\$$INSTALL_DIR/$(RELS)/log/$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%VAR_OTP%;\$$INSTALL_DIR/$(RELS)/var/$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%RELS%;$(RELS);g\" \\" >> $@
- @echo " -e \"s;%REL_VSN%;$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%USER%;$$USER;g\" \\" >> $@
- @echo " -e \"s;%HTDOC_ROOT%;\$$INSTALL_DIR/$(RELS)/var/$(REL_VSN)/www/htdocs;g\" \\" >> $@
- @echo " -e \"s;%MHOST%;\`hostname\`;g\" \\" >> $@
- @echo " -e \"s;%BROADCAST_ADDRESS%;$(BROADCAST_ADDRESS);g\" \\" >> $@
- @echo " -e \"s;%INSTALL_DIR%;\$$INSTALL_DIR;g\" \\" >> $@
- @echo " -e \"s;%CONTACT_NODE%;$(CONTACT_NODE);g\" \\" >> $@
- @echo " -e \"s;%HOSTNAME%;\`hostname --long\`;g\" \\" >> $@
- @echo " -e \"s;%APP_NAME%;$(APP_NAME);g\" \\" >> $@
- @echo " -e \"s;%APP_VERSION%;$(APP_VERSION);g\" \\" >> $@
- @echo ' $$1 > $$2' >> $@
- @echo "}" >> $@
- @echo "" >> $@
- @echo "munge stage/yaws.conf.src var/$(REL_VSN)/www/conf/yaws.conf;" >> $@
- @echo "munge stage/$(RELS).config.src release/$(REL_VSN)/$(RELS).config;" >> $@
- @echo "munge stage/$(RELS).sh.src release/$(REL_VSN)/$(RELS).sh;" >> $@
- @echo "munge stage/$(RELS).rel.src release/$(REL_VSN)/$(RELS).rel;" >> $@
- @echo "chmod +x release/$(REL_VSN)/$(RELS).sh;" >> $@
- @echo "" >> $@
- @echo "cd ..;" >> $@
- @echo "find $(RELS) | cpio -o > \$$INSTALL_DIR/$(RELS).cpio;" >> $@
- @echo "cd -;" >> $@
- @echo "cd \$$INSTALL_DIR; " >> $@
- @echo "echo -n \"Unpacked: \"" >> $@
- @echo "cpio -uid < $(RELS).cpio;" >> $@
- @echo "rm $(RELS).cpio;" >> $@
- @echo "" >> $@
- @echo "echo \"pwd is \`pwd\`\";" >> $@
- @echo "cd $(RELS);" >> $@
- @echo " erl -pz build/$(REL_VSN) \\" >> $@
- @echo " -noshell \\" >> $@
- @echo -n " -s fs_lib s_apply fs_boot_smithe make_script_and_boot \"[\\\"$(ERL_RUN_TOP)/*\\\", \\\"lib/\\\"]. \" " >> $@
- @echo -n "\"\\\"stage/$$(basename `pwd`).rel.src\\\". \" " >> $@
- @echo -n "\"[local]. \" " >> $@
- @echo "-s init stop | egrep '*terminate*|ERROR'" >> $@
- @echo "if [ \$$? -eq 0 ]; then" >> $@
- @echo "echo \"============================================\";" >> $@
- @echo "echo \"STAGE FAILURE \$$? - Silence the discord.\";" >> $@
- @echo "echo \"============================================\";" >> $@
- @echo "exit 1;" >> $@
- @echo "fi" >> $@
- @echo "" >> $@
- @echo "mv $(RELS).rel $(RELS).script $(RELS).boot release/$(REL_VSN);" >> $@
- @echo "" >> $@
- @echo "rm -r stage;" >> $@
- @echo "rm -r build;" >> $@
- @echo "cd -;" >> $@
- @echo "" >> $@
- @echo "chgrp -R erts $(RELS); " >> $@
- @echo "chmod -R 775 $(RELS); " >> $@
- @echo "cd -" >> $@
- @echo "" >> $@
- @echo "rm -f /usr/local/bin/$(APP_NAME);" >> $@
- @echo "ln -s \$$INSTALL_DIR/$(RELS)/release/$(REL_VSN)/$(RELS).sh /usr/local/bin/$(APP_NAME);" >> $@
- @echo "chgrp -R erts /usr/local/bin/$(APP_NAME); " >> $@
- @echo "chmod -R 775 /usr/local/bin/$(APP_NAME); " >> $@
- @echo "rm \$$INSTALL_DIR/$(RELS)/install.sh;" >> $@
- @echo "echo -n $$'\e[0;32m'" >> $@
- @echo "echo \"$(APP_NAME) installation to \$$INSTALL_DIR complete.\"" >> $@
- @echo "echo -n $$'\e[0m'" >> $@
- chmod +x $@
-
-
-stage: $(RELS)
- cd $(RELS); \
- ./install.sh; \
- cd -
-
-$(RELS)/var/$(REL_VSN)/www/conf/mime.types: ../../build/mime.types
- cp $< $@
-
-$(RELS)-$(LOCATION)-$(REL_VSN).tgz: $(RELS)
- tar -zcvf $@ $<
-
-$(RELS)/release/$(REL_VSN)/clean_release: ../../tools/utilities/clean_release
- cp $< $@
-
+++ /dev/null
-%%% -*- mode:erlang -*-
-%%% Parameter settings for apps on thrift
-%%% Warning - this config file *must* end with <dot><whitespace>
-
-%% write log files to sasl_dir
-[
- {sasl,
- [
- {sasl_error_logger, {file, "/data/users/cpiro/thrift/trunk/lib/erl/release/thrift_rel/local/log/1.0/sasl_log"}}
- ]},
-
-
- {gas,
- [
- {mod_specs, [{elwrap, {fs_elwrap_h, start_link}}]},
-
- % elwrap config.
- {err_log, "/data/users/cpiro/thrift/trunk/lib/erl/release/thrift_rel/local/log/1.0/err_log"},
- {err_log_wrap_info, {{err,5000000,10},{sasl,5000000,10}}},
- {err_log_tty, true} % Log to the screen
- ]},
-
- {thrift,
- [
- ]}
-].
+++ /dev/null
-#!/bin/sh
-cd /data/users/cpiro/thrift/trunk/lib/erl/release/thrift_rel/local
-erl -name cpiro_thrift_rel -boot thrift_rel -config thrift_rel.config $@
+++ /dev/null
-
-application/activemessage
-application/andrew-inset
-application/applefile
-application/atomicmail
-application/dca-rft
-application/dec-dx
-application/mac-binhex40 hqx
-application/mac-compactpro cpt
-application/macwriteii
-application/msword doc
-application/news-message-id
-application/news-transmission
-application/octet-stream bin dms lha lzh exe class
-application/oda oda
-application/pdf pdf
-application/postscript ai eps ps
-application/powerpoint ppt
-application/remote-printing
-application/rtf rtf
-application/slate
-application/wita
-application/wordperfect5.1
-application/x-bcpio bcpio
-application/x-cdlink vcd
-application/x-compress Z
-application/x-cpio cpio
-application/x-csh csh
-application/x-director dcr dir dxr
-application/x-dvi dvi
-application/x-gtar gtar
-application/x-gzip gz
-application/x-hdf hdf
-application/x-httpd-cgi cgi
-application/x-koan skp skd skt skm
-application/x-latex latex
-application/x-mif mif
-application/x-netcdf nc cdf
-application/x-sh sh
-application/x-shar shar
-application/x-stuffit sit
-application/x-sv4cpio sv4cpio
-application/x-sv4crc sv4crc
-application/x-tar tar
-application/x-tcl tcl
-application/x-tex tex
-application/x-texinfo texinfo texi
-application/x-troff t tr roff
-application/x-troff-man man
-application/x-troff-me me
-application/x-troff-ms ms
-application/x-ustar ustar
-application/x-wais-source src
-application/zip zip
-audio/basic au snd
-audio/mpeg mpga mp2
-audio/x-aiff aif aiff aifc
-audio/x-pn-realaudio ram
-audio/x-pn-realaudio-plugin rpm
-audio/x-realaudio ra
-audio/x-wav wav
-chemical/x-pdb pdb xyz
-image/gif gif
-image/ief ief
-image/jpeg jpeg jpg jpe
-image/png png
-image/tiff tiff tif
-image/x-cmu-raster ras
-image/x-portable-anymap pnm
-image/x-portable-bitmap pbm
-image/x-portable-graymap pgm
-image/x-portable-pixmap ppm
-image/x-rgb rgb
-image/x-xbitmap xbm
-image/x-xpixmap xpm
-image/x-xwindowdump xwd
-message/external-body
-message/news
-message/partial
-message/rfc822
-multipart/alternative
-multipart/appledouble
-multipart/digest
-multipart/mixed
-multipart/parallel
-text/html html htm
-text/x-server-parsed-html shtml
-text/plain txt
-text/richtext rtx
-text/tab-separated-values tsv
-text/x-setext etx
-text/x-sgml sgml sgm
-video/mpeg mpeg mpg mpe
-video/quicktime qt mov
-video/x-msvideo avi
-video/x-sgi-movie movie
-x-conference/x-cooltalk ice
-x-world/x-vrml wrl vrml
+++ /dev/null
-
-# conf for yaws
-
-
-# first we have a set of globals
-# That apply to all virtual servers
-
-
-# This is the directory where all logfiles for
-# all virtual servers will be written
-
-logdir = /var/log/yaws
-
-# This the path to a directory where additional
-# beam code can be placed. The daemon will add this
-# directory to its search path
-
-ebin_dir = /var/yaws/ebin
-
-
-# This is a directory where application specific .hrl
-# files can be placed. application specifig .yaws code can
-# then include these .hrl files
-
-include_dir = /var/yaws/include
-
-
-
-
-
-# This is a debug variable, possible values are http | traffic | false
-# It is also possible to set the trace (possibly to the tty) while
-# invoking yaws from the shell as in
-# yaws -i -T -x (see man yaws)
-
-trace = false
-
-
-
-
-
-# it is possible to have yaws start additional
-# application specific code at startup
-#
-# runmod = mymodule
-
-
-# By default yaws will copy the erlang error_log and
-# end write it to a wrap log called report.log (in the logdir)
-# this feature can be turned off. This would typically
-# be the case when yaws runs within another larger app
-
-copy_error_log = true
-
-
-# Logs are wrap logs
-
-log_wrap_size = 1000000
-
-
-# Possibly resolve all hostnames in logfiles so webalizer
-# can produce the nice geography piechart
-
-log_resolve_hostname = false
-
-
-
-# fail completely or not if yaws fails
-# to bind a listen socket
-fail_on_bind_err = true
-
-
-
-# If yaws is started as root, it can, once it has opened
-# all relevant sockets for listening, change the uid to a
-# user with lower accessrights than root
-
-# username = nobody
-
-
-# If HTTP auth is used, it is possible to have a specific
-# auth log.
-
-auth_log = true
-
-
-# When we're running multiple yaws systems on the same
-# host, we need to give each yaws system an individual
-# name. Yaws will write a number of runtime files under
-# /tmp/yaws/${id}
-# The default value is "default"
-
-
-# id = myname
-
-
-# earlier versions of Yaws picked the first virtual host
-# in a list of hosts with the same IP/PORT when the Host:
-# header doesn't match any name on any Host
-# This is often nice in testing environments but not
-# acceptable in real live hosting scenarios
-
-pick_first_virthost_on_nomatch = true
-
-
-# All unices are broken since it's not possible to bind to
-# a privileged port (< 1024) unless uid==0
-# There is a contrib in jungerl which makes it possible by means
-# of an external setuid root programm called fdsrv to listen to
-# to privileged port.
-# If we use this feature, it requires fdsrv to be properly installed.
-# Doesn't yet work with SSL.
-
-use_fdsrv = false
-
-
-
-
-# end then a set of virtual servers
-# First two virthosted servers on the same IP (0.0.0.0)
-# in this case, but an explicit IP can be given as well
-
-<server core.martinjlogan.com>
- port = 80
- listen = 0.0.0.0
- docroot = /var/yaws/www
- arg_rewrite_mod = pwr_arg_rewrite_mod
- appmods = <pwr, pwr_main_controller_appmod>
-</server>
-
-<server localhost>
- port = 80
- listen = 0.0.0.0
- docroot = /tmp
- dir_listings = true
- dav = true
- <auth>
- realm = foobar
- dir = /
- user = foo:bar
- user = baz:bar
- </auth>
-</server>
-
-
-
-# And then an ssl server
-
-<server core.martinjlogan.com>
- port = 443
- docroot = /tmp
- listen = 0.0.0.0
- dir_listings = true
- <ssl>
- keyfile = /usr/local/yaws/etc/yaws-key.pem
- certfile = /usr/local/yaws/etc/yaws-cert.pem
- </ssl>
-</server>
-
-
-
-
-
-
-
-
+++ /dev/null
-%%% -*- mode:erlang -*-
-%%% Parameter settings for apps on %APP_NAME%
-%%% Warning - this config file *must* end with <dot><whitespace>
-
-%% write log files to sasl_dir
-[
- {sasl,
- [
- {sasl_error_logger, {file, "%LOG_OTP%/sasl_log"}}
- ]},
-
-
- {gas,
- [
- {mod_specs, [{elwrap, {fs_elwrap_h, start_link}}]},
-
- % elwrap config.
- {err_log, "%LOG_OTP%/err_log"},
- {err_log_wrap_info, {{err,5000000,10},{sasl,5000000,10}}},
- {err_log_tty, true} % Log to the screen
- ]},
-
- {%APP_NAME%,
- [
- ]}
-].
+++ /dev/null
-%%% -*- mode:erlang -*-
-{release,
- {"thrift_rel", "%REL_VSN%"},
- erts,
- [
- kernel,
- stdlib,
- sasl,
- fslib,
- gas,
- thrift
- ]
-}.
-
+++ /dev/null
-%%% -*- mode:erlang -*-
-{release,
- {"thrift_rel", "1.0"},
- erts,
- [
- kernel,
- stdlib,
- sasl,
- fslib,
- gas,
- thrift
- ]
-}.
-
+++ /dev/null
-REL_VSN=1.0
+++ /dev/null
-
-# conf for yaws
-
-
-# first we have a set of globals
-# That apply to all virtual servers
-
-
-# This is the directory where all logfiles for
-# all virtual servers will be written
-
-logdir = /var/log/yaws
-
-# This the path to a directory where additional
-# beam code can be placed. The daemon will add this
-# directory to its search path
-
-ebin_dir = /var/yaws/ebin
-
-
-# This is a directory where application specific .hrl
-# files can be placed. application specifig .yaws code can
-# then include these .hrl files
-
-include_dir = /var/yaws/include
-
-
-
-
-
-# This is a debug variable, possible values are http | traffic | false
-# It is also possible to set the trace (possibly to the tty) while
-# invoking yaws from the shell as in
-# yaws -i -T -x (see man yaws)
-
-trace = false
-
-
-
-
-
-# it is possible to have yaws start additional
-# application specific code at startup
-#
-# runmod = mymodule
-
-
-# By default yaws will copy the erlang error_log and
-# end write it to a wrap log called report.log (in the logdir)
-# this feature can be turned off. This would typically
-# be the case when yaws runs within another larger app
-
-copy_error_log = true
-
-
-# Logs are wrap logs
-
-log_wrap_size = 1000000
-
-
-# Possibly resolve all hostnames in logfiles so webalizer
-# can produce the nice geography piechart
-
-log_resolve_hostname = false
-
-
-
-# fail completely or not if yaws fails
-# to bind a listen socket
-fail_on_bind_err = true
-
-
-
-# If yaws is started as root, it can, once it has opened
-# all relevant sockets for listening, change the uid to a
-# user with lower accessrights than root
-
-# username = nobody
-
-
-# If HTTP auth is used, it is possible to have a specific
-# auth log.
-
-auth_log = true
-
-
-# When we're running multiple yaws systems on the same
-# host, we need to give each yaws system an individual
-# name. Yaws will write a number of runtime files under
-# /tmp/yaws/${id}
-# The default value is "default"
-
-
-# id = myname
-
-
-# earlier versions of Yaws picked the first virtual host
-# in a list of hosts with the same IP/PORT when the Host:
-# header doesn't match any name on any Host
-# This is often nice in testing environments but not
-# acceptable in real live hosting scenarios
-
-pick_first_virthost_on_nomatch = true
-
-
-# All unices are broken since it's not possible to bind to
-# a privileged port (< 1024) unless uid==0
-# There is a contrib in jungerl which makes it possible by means
-# of an external setuid root programm called fdsrv to listen to
-# to privileged port.
-# If we use this feature, it requires fdsrv to be properly installed.
-# Doesn't yet work with SSL.
-
-use_fdsrv = false
-
-
-
-
-# end then a set of virtual servers
-# First two virthosted servers on the same IP (0.0.0.0)
-# in this case, but an explicit IP can be given as well
-
-<server core.martinjlogan.com>
- port = 80
- listen = 0.0.0.0
- docroot = /var/yaws/www
- arg_rewrite_mod = pwr_arg_rewrite_mod
- appmods = <pwr, pwr_main_controller_appmod>
-</server>
-
-<server localhost>
- port = 80
- listen = 0.0.0.0
- docroot = /tmp
- dir_listings = true
- dav = true
- <auth>
- realm = foobar
- dir = /
- user = foo:bar
- user = baz:bar
- </auth>
-</server>
-
-
-
-# And then an ssl server
-
-<server core.martinjlogan.com>
- port = 443
- docroot = /tmp
- listen = 0.0.0.0
- dir_listings = true
- <ssl>
- keyfile = /usr/local/yaws/etc/yaws-key.pem
- certfile = /usr/local/yaws/etc/yaws-cert.pem
- </ssl>
-</server>
-
-
-
-
-
-
-
-
# $Id: Makefile,v 1.3 2004/08/13 16:35:59 mlogan Exp $
#
-include ../../../ build/otp.mk
-include ../../../ build/colors.mk
-include ../../../ build/buildtargets.mk
+include ../build/otp.mk
+include ../build/colors.mk
+include ../build/buildtargets.mk
# ----------------------------------------------------
# Application version
all debug opt: $(EBIN) $(TARGET_FILES)
#$(EBIN)/rm_logger.beam: $(APP_NAME).hrl
-include ../../../ build/docs.mk
+include ../build/docs.mk
# Note: In the open-source build clean must not destroy the preloaded
# beam files.
+++ /dev/null
-MODULES = \
- src
-
-all clean docs:
- for dir in $(MODULES); do \
- (cd $$dir; ${MAKE} $@); \
- done
+++ /dev/null
-# $Id: Makefile,v 1.3 2004/08/13 16:35:59 mlogan Exp $
-#
-include ../../../build/otp.mk
-include ../../../build/colors.mk
-include ../../../build/buildtargets.mk
-
-# ----------------------------------------------------
-# Application version
-# ----------------------------------------------------
-
-include ../vsn.mk
-APP_NAME=%%APP_NAME%%
-PFX=%%PFX%%
-VSN=$(%%APP_NAME_UPPER_CASE%%_VSN)
-
-# ----------------------------------------------------
-# Install directory specification
-# WARNING: INSTALL_DIR the command to install a directory.
-# INSTALL_DST is the target directory
-# ----------------------------------------------------
-INSTALL_DST = $(ERLANG_OTP)/lib/$(APP_NAME)-$(VSN)
-
-# ----------------------------------------------------
-# Target Specs
-# ----------------------------------------------------
-
-
-MODULES = $(shell ls *.erl | sed s/.erl//)
-MODULES_COMMA = $(shell ls *.erl | sed s/\\.erl/,/)
-
-HRL_FILES=
-INTERNAL_HRL_FILES= $(APP_NAME).hrl
-ERL_FILES= $(MODULES:%=%.erl)
-DOC_FILES=$(ERL_FILES)
-
-APP_FILE= $(APP_NAME).app
-APPUP_FILE= $(APP_NAME).appup
-
-APP_SRC= $(APP_FILE).src
-APPUP_SRC= $(APPUP_FILE).src
-
-APP_TARGET= $(EBIN)/$(APP_FILE)
-APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
-
-BEAMS= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
-TARGET_FILES= $(BEAMS) $(APP_TARGET) $(APPUP_TARGET)
-
-WEB_TARGET=/var/yaws/www/$(APP_NAME)
-
-# ----------------------------------------------------
-# FLAGS
-# ----------------------------------------------------
-
-ERL_FLAGS +=
-ERL_COMPILE_FLAGS += -I../include -I../../fslib/include -I../../system_status/include
-
-# ----------------------------------------------------
-# Targets
-# ----------------------------------------------------
-
-all debug opt: $(EBIN) $(TARGET_FILES)
-
-#$(EBIN)/rm_logger.beam: $(APP_NAME).hrl
-include ../../../build/docs.mk
-
-# Note: In the open-source build clean must not destroy the preloaded
-# beam files.
-clean:
- rm -f $(TARGET_FILES)
- rm -f core
- rm -rf $(EBIN)
- rm -rf *html
-
-$(EBIN):
- mkdir $(EBIN)
-
-# ----------------------------------------------------
-# Special Build Targets
-# ----------------------------------------------------
-
-$(APP_TARGET): $(APP_SRC) ../vsn.mk $(BEAMS)
- sed -e 's;%VSN%;$(VSN);' \
- -e 's;%PFX%;$(PFX);' \
- -e 's;%APP_NAME%;$(APP_NAME);' \
- -e 's;%MODULES%;%MODULES%$(MODULES_COMMA);' \
- $< > $<".tmp"
- sed -e 's/%MODULES%\(.*\),/\1/' \
- $<".tmp" > $@
- rm $<".tmp"
-
-
-$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
- sed -e 's;%VSN%;$(VSN);' $< > $@
-
-$(WEB_TARGET): ../markup/*
- rm -rf $(WEB_TARGET)
- mkdir $(WEB_TARGET)
- cp -r ../markup/ $(WEB_TARGET)
- cp -r ../skins/ $(WEB_TARGET)
-
-# ----------------------------------------------------
-# Install Target
-# ----------------------------------------------------
-
-install: all $(WEB_TARGET)
-# $(INSTALL_DIR) $(INSTALL_DST)/src
-# $(INSTALL_DATA) $(ERL_FILES) $(INSTALL_DST)/src
-# $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(INSTALL_DST)/src
-# $(INSTALL_DIR) $(INSTALL_DST)/include
-# $(INSTALL_DATA) $(HRL_FILES) $(INSTALL_DST)/include
-# $(INSTALL_DIR) $(INSTALL_DST)/ebin
-# $(INSTALL_DATA) $(TARGET_FILES) $(INSTALL_DST)/ebin
+++ /dev/null
-%%%-------------------------------------------------------------------
-%%% @doc
-%%% @end
-%%%-------------------------------------------------------------------
--module(%%PFX%%_server).
-
--behaviour(gen_server).
-%%--------------------------------------------------------------------
-%% Include files
-%%--------------------------------------------------------------------
--include("%%APP_NAME%%.hrl").
-
-%%--------------------------------------------------------------------
-%% External exports
-%%--------------------------------------------------------------------
--export([
- start_link/0,
- stop/0
- ]).
-
-%%--------------------------------------------------------------------
-%% gen_server callbacks
-%%--------------------------------------------------------------------
--export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-
-%%--------------------------------------------------------------------
-%% record definitions
-%%--------------------------------------------------------------------
--record(state, {}).
-
-%%--------------------------------------------------------------------
-%% macro definitions
-%%--------------------------------------------------------------------
--define(SERVER, ?MODULE).
-
-%%====================================================================
-%% External functions
-%%====================================================================
-%%--------------------------------------------------------------------
-%% @doc Starts the server.
-%% @spec start_link() -> {ok, pid()} | {error, Reason}
-%% @end
-%%--------------------------------------------------------------------
-start_link() ->
- gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
-
-%%--------------------------------------------------------------------
-%% @doc Stops the server.
-%% @spec stop() -> ok
-%% @end
-%%--------------------------------------------------------------------
-stop() ->
- gen_server:cast(?SERVER, stop).
-
-%%====================================================================
-%% Server functions
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% Function: init/1
-%% Description: Initiates the server
-%% Returns: {ok, State} |
-%% {ok, State, Timeout} |
-%% ignore |
-%% {stop, Reason}
-%%--------------------------------------------------------------------
-init([]) ->
- {ok, #state{}}.
-
-%%--------------------------------------------------------------------
-%% Function: handle_call/3
-%% Description: Handling call messages
-%% Returns: {reply, Reply, State} |
-%% {reply, Reply, State, Timeout} |
-%% {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, Reply, State} | (terminate/2 is called)
-%% {stop, Reason, State} (terminate/2 is called)
-%%--------------------------------------------------------------------
-handle_call(Request, From, State) ->
- Reply = ok,
- {reply, Reply, State}.
-
-%%--------------------------------------------------------------------
-%% Function: handle_cast/2
-%% Description: Handling cast messages
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%--------------------------------------------------------------------
-handle_cast(stop, State) ->
- {stop, normal, State};
-handle_cast(Msg, State) ->
- {noreply, State}.
-
-%%--------------------------------------------------------------------
-%% Function: handle_info/2
-%% Description: Handling all non call/cast messages
-%% Returns: {noreply, State} |
-%% {noreply, State, Timeout} |
-%% {stop, Reason, State} (terminate/2 is called)
-%%--------------------------------------------------------------------
-handle_info(Info, State) ->
- {noreply, State}.
-
-%%--------------------------------------------------------------------
-%% Function: terminate/2
-%% Description: Shutdown the server
-%% Returns: any (ignored by gen_server)
-%%--------------------------------------------------------------------
-terminate(Reason, State) ->
- ok.
-
-%%--------------------------------------------------------------------
-%% Func: code_change/3
-%% Purpose: Convert process state when code is changed
-%% Returns: {ok, NewState}
-%%--------------------------------------------------------------------
-code_change(OldVsn, State, Extra) ->
- {ok, State}.
-
-%%====================================================================
-%%% Internal functions
-%%====================================================================
+++ /dev/null
-%%%-------------------------------------------------------------------
-%%% @doc
-%%% @end
-%%%-------------------------------------------------------------------
--module(%%PFX%%_sup).
-
--behaviour(supervisor).
-%%--------------------------------------------------------------------
-%% Include files
-%%--------------------------------------------------------------------
-
-%%--------------------------------------------------------------------
-%% External exports
-%%--------------------------------------------------------------------
--export([
- start_link/1
- ]).
-
-%%--------------------------------------------------------------------
-%% Internal exports
-%%--------------------------------------------------------------------
--export([
- init/1
- ]).
-
-%%--------------------------------------------------------------------
-%% Macros
-%%--------------------------------------------------------------------
--define(SERVER, ?MODULE).
-
-%%--------------------------------------------------------------------
-%% Records
-%%--------------------------------------------------------------------
-
-%%====================================================================
-%% External functions
-%%====================================================================
-%%--------------------------------------------------------------------
-%% @doc Starts the supervisor.
-%% @spec start_link(StartArgs) -> {ok, pid()} | Error
-%% @end
-%%--------------------------------------------------------------------
-start_link(StartArgs) ->
- supervisor:start_link({local, ?SERVER}, ?MODULE, []).
-
-%%====================================================================
-%% Server functions
-%%====================================================================
-%%--------------------------------------------------------------------
-%% Func: init/1
-%% Returns: {ok, {SupFlags, [ChildSpec]}} |
-%% ignore |
-%% {error, Reason}
-%%--------------------------------------------------------------------
-init([]) ->
- RestartStrategy = one_for_one,
- MaxRestarts = 1000,
- MaxTimeBetRestarts = 3600,
-
- SupFlags = {RestartStrategy, MaxRestarts, MaxTimeBetRestarts},
-
- ChildSpecs =
- [
- {%%PFX%%_server,
- {%%PFX%%_server, start_link, []},
- permanent,
- 1000,
- worker,
- [%%PFX%%_server]}
- ],
- {ok,{SupFlags, ChildSpecs}}.
-%%====================================================================
-%% Internal functions
-%%====================================================================
+++ /dev/null
-%%% -*- mode:erlang -*-
-{application, %APP_NAME%,
- [
- % A quick description of the application.
- {description, "An Erlang Application."},
-
- % The version of the applicaton
- {vsn, "%VSN%"},
-
- % All modules used by the application.
- {modules,
- [
- %MODULES%
- ]},
-
- % All of the registered names the application uses. This can be ignored.
- {registered, []},
-
- % Applications that are to be started prior to this one. This can be ignored
- % leave it alone unless you understand it well and let the .rel files in
- % your release handle this.
- {applications,
- [
- kernel,
- stdlib
- ]},
-
- % OTP application loader will load, but not start, included apps. Again
- % this can be ignored as well. To load but not start an application it
- % is easier to include it in the .rel file followed by the atom 'none'
- {included_applications, []},
-
- % configuration parameters similar to those in the config file specified
- % on the command line. can be fetched with gas:get_env
- {env, []},
-
- % The Module and Args used to start this application.
- {mod, {%APP_NAME%, []}}
- ]
-}.
-
+++ /dev/null
-{"%VSN%",[],[]}.
+++ /dev/null
-%%%-------------------------------------------------------------------
-%%% @doc
-%%% @end
-%%%-------------------------------------------------------------------
--module(%%APP_NAME%%).
-
--behaviour(application).
-%%--------------------------------------------------------------------
-%% Include files
-%%--------------------------------------------------------------------
--include("%%APP_NAME%%.hrl").
-
-%%--------------------------------------------------------------------
-%% External exports
-%%--------------------------------------------------------------------
--export([
- start/2,
- shutdown/0,
- stop/1
- ]).
-
-%%--------------------------------------------------------------------
-%% Macros
-%%--------------------------------------------------------------------
-
-%%--------------------------------------------------------------------
-%% Records
-%%--------------------------------------------------------------------
-
-%%====================================================================
-%% External functions
-%%====================================================================
-%%--------------------------------------------------------------------
-%% @doc The starting point for an erlang application.
-%% @spec start(Type, StartArgs) -> {ok, Pid} | {ok, Pid, State} | {error, Reason}
-%% @end
-%%--------------------------------------------------------------------
-start(Type, StartArgs) ->
- case %%PFX%%_sup:start_link(StartArgs) of
- {ok, Pid} ->
- {ok, Pid};
- Error ->
- Error
- end.
-
-%%--------------------------------------------------------------------
-%% @doc Called to shudown the %%APP_NAME%% application.
-%% @spec shutdown() -> ok
-%% @end
-%%--------------------------------------------------------------------
-shutdown() ->
- application:stop(%%APP_NAME%%).
-
-%%====================================================================
-%% Internal functions
-%%====================================================================
-
-%%--------------------------------------------------------------------
-%% Called upon the termintion of an application.
-%%--------------------------------------------------------------------
-stop(State) ->
- ok.
-
+++ /dev/null
-%%APP_NAME_UPPER_CASE%%_VSN=1.0
+++ /dev/null
-# ----------------------------------------------------
-# Make file for creating an otp release.
-# ----------------------------------------------------
-
-##
-# Basename of this release.
-##
-RELS=$(shell basename `pwd`)
-APP_NAME=$(shell echo $(RELS) | sed s/_rel$$//)
-
-include ../../build/otp.mk
-
-include ./vsn.mk
-
-#include $(ERL_TOP)/make/target.mk
-#include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-USR_LIBPATH=../../lib
-INSTALL_DIR=/usr/local/lib
-ABS_USER_LIBPATH=$(shell cd ../../lib;pwd)
-
-# ----------------------------------------------------
-# CREATE DIR STRUCTURE HERE
-# ----------------------------------------------------
-
-HTDOCS=$(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.html) \
- $(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.htm) \
- $(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.yaws)
-BUILD_FILES=fs_boot_smithe.beam fs_lists.beam fs_lib.beam
-
-LOCAL_DIR=local
-#LOCAL_DIR=$(shell cat $(RELS).rel.src |grep -m 1 '$(APP_NAME)' |awk -F '"' '{printf "%s-%s", $$2,$$4}')
-
-DIR_STRUCTURE= \
- $(LOCAL_DIR) \
- $(LOCAL_DIR)/log/$(REL_VSN) \
- $(LOCAL_DIR)/var/$(REL_VSN) \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/htdocs
-
-PRODUCTION_DIR_STRUCTURE= \
- $(RELS) \
- $(RELS)/release/$(REL_VSN) \
- $(RELS)/stage \
- $(RELS)/log/$(REL_VSN) \
- $(RELS)/var/$(REL_VSN) \
- $(RELS)/var/$(REL_VSN)/www \
- $(RELS)/var/$(REL_VSN)/www/htdocs \
- $(RELS)/var/$(REL_VSN)/www/conf
-
-# ----------------------------------------------------
-SCRIPT_AND_BOOT_FILES= \
- $(RELS).script \
- $(RELS).boot
-
-LOCAL_SCRIPT_AND_BOOT_FILES= \
- $(LOCAL_DIR)/$(RELS).script \
- $(LOCAL_DIR)/$(RELS).boot
-
-LOCAL_HTTP_CONF= \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types
-
-PRODUCTION_HTTP_CONF= \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types
-
-LOCAL_TARGET_FILES=$(LOCAL_HTTP_CONF) $(LOCAL_DIR)/$(RELS).config $(LOCAL_SCRIPT_AND_BOOT_FILES)
-
-LOCAL_TARGETS=$(LOCAL_DIR)/$(RELS).sh vsnit $(LOCAL_TARGET_FILES)
-
-PRODUCTION_TARGETS=$(RELS)/build/$(REL_VSN) \
- $(RELS)/lib \
- $(RELS)/stage/$(RELS).rel.src \
- $(RELS)/stage/$(RELS).config.src \
- $(RELS)/stage/yaws.conf.src \
- $(RELS)/stage/$(RELS).sh.src \
- $(RELS)/var/$(REL_VSN)/www/htdocs \
- $(RELS)/install.sh \
- $(RELS)/release/$(REL_VSN)/clean_release
-
-# ----------------------------------------------------
-# TARGETS
-# ----------------------------------------------------
-
-all debug opt instr script: $(DIR_STRUCTURE) $(LOCAL_TARGETS) $(PRODUCTION_DIR_STRUCTURE) $(PRODUCTION_TARGETS)
- @echo $(HTDOCS)
-
-install: stage
-
-tar: $(RELS)-$(LOCATION)-$(REL_VSN).tgz
-
-$(DIR_STRUCTURE):
- mkdir -p $@
-
-$(PRODUCTION_DIR_STRUCTURE):
- mkdir -p $@
-
-clean:
- $(RM) $(REL_SCRIPTS) $(TARGET_FILES)
- $(RM) -r $(LOCAL_DIR) $(PRODN_DIR)
- $(RM) $(RELS).rel
- $(RM) -r $(RELS)
- $(RM) $(RELS)*.tgz
- $(RM) $(RELS).rel.src.tmp
- $(RM) $(SCRIPT_AND_BOOT_FILES)
-
-docs:
-
-# ----------------------------------------------------
-# TARGETS FOR LOCAL MODE
-# ----------------------------------------------------
-
-# startup script for local mode
-$(LOCAL_DIR)/$(RELS).sh:
- @echo '#!/bin/sh' > $@
- @echo "cd $(CURDIR)/$(LOCAL_DIR)" >> $@
- @echo "erl -name $${USER}_$(RELS) -boot $(RELS) -config $(RELS).config \$$@" >> $@
- chmod +x $@
- @echo
- @echo "==== Start local node with \"sh $@\" ===="
- @echo
-
-# Create the config file for local mode.
-$(LOCAL_DIR)/$(RELS).config: $(RELS).config.src
- sed -e 's;%LOG_OTP%;$(CURDIR)/$(LOCAL_DIR)/log/$(REL_VSN);' \
- -e 's;%VAR_OTP%;$(CURDIR)/$(LOCAL_DIR)/var/$(REL_VSN);' \
- -e 's;%RELS%;$(RELS);g' \
- -e 's;%HOME%;$(HOME);g' \
- -e 's;%BROADCAST_ADDRESS%;$(BROADCAST_ADDRESS);g' \
- -e 's;%CONTACT_NODE%;$(CONTACT_NODE);g' \
- -e "s;%HOSTNAME%;`hostname --long`;" \
- -e 's;%APP_NAME%;$(APP_NAME);' \
- -e 's;%APP_VERSION%;$(APP_VERSION);g' \
- $< > $@
-
-# Create the httpd conf file for local mode.
-$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf: yaws.conf.src
- sed -e 's;%VAR_OTP%;$(CURDIR)/$(LOCAL_DIR)/var/$(REL_VSN);' \
- -e 's;%LOG_OTP%;$(CURDIR)/$(LOCAL_DIR)/log/$(REL_VSN);' \
- -e 's;%HTDOC_ROOT%;$(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs;' \
- -e 's;%APP_NAME%;$(APP_NAME);' \
- -e 's;%RELS%;$(RELS);' \
- -e 's;%USER%;$(USER);' \
- -e 's;%HTDOC_ROOT%;$(ABS_USER_LIBPATH);' \
- -e 's;%MHOST%;$(MHOST);' \
- $< > $@
-
-# Create the config file for local mode.
-vsnit: $(RELS).rel.src
- sed -e 's;%REL_VSN%;$(REL_VSN);' \
- $< > $<.tmp
-
-# Create and position script and boot files for local mode.
-$(LOCAL_SCRIPT_AND_BOOT_FILES):
- @ erl -pz $(USR_LIBPATH)/fslib/ebin \
- -noshell \
- -s fs_lib s_apply fs_boot_smithe make_script_and_boot "[\"$(ERL_RUN_TOP)/*\", \"$(USR_LIBPATH)\"]. " \
- \"$$(basename `pwd`)".rel.src.tmp\". " \
- "[local]. " \
- -s init stop
- cp $(SCRIPT_AND_BOOT_FILES) $(LOCAL_DIR)/
-
-$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types: ../../build/mime.types
- cp $< $@
-
-# ----------------------------------------------------
-# TARGETS FOR PRODUCTION MODE
-# ----------------------------------------------------
-$(RELS)/lib:
- # For some reason this will not happen if added to PRODUCTION_DIR_STRUCTURE
- mkdir $@
- @ erl -pz $(RELS)/build/$(REL_VSN) \
- -noshell \
- -s fs_lib s_apply fs_boot_smithe stage_from_relsrc "[\"$(USR_LIBPATH)\"]. " \
- \"$$(basename `pwd`)".rel.src\". " \
- \"$@\"". " \
- -s init stop
-
-# Move the htdocs from the local apps to the production htdoc root directory.
-$(RELS)/var/$(REL_VSN)/www/htdocs/: $(HTDOCS)
- @mkdir -p $(RELS)/var/$(REL_VSN)/www/htdocs; \
- for x in $(HTDOCS);do \
- cp $$x $@; \
- done
-
-# startup script for production mode
-$(RELS)/stage/$(RELS).sh.src:
- @echo '#!/bin/sh' > $@
- @echo "cd %INSTALL_DIR%/$(RELS)/release/$(REL_VSN)" >> $@
- @echo "erl -name $(RELS) -boot $(RELS) -config $(RELS).config -detached \$$@" >> $@
- chmod +x $@
-
-$(RELS)/build/$(REL_VSN): $(USR_LIBPATH)/fslib/ebin
- mkdir -p $(RELS)/build/$(REL_VSN)
- cp $</fs_boot_smithe.beam $@
- cp $</fs_lib.beam $@
- cp $</fs_lists.beam $@
-
-$(RELS)/stage/$(RELS).rel.src: $(RELS).rel.src.tmp
- cp $< $@
-
-$(RELS)/stage/$(RELS).config.src: $(RELS).config.src
- cp $< $@
-
-$(RELS)/stage/yaws.conf.src: yaws.conf.src
- cp $< $@
-
-$(RELS)/install.sh:
- @echo '#!/bin/sh' > $@
- @echo "" >> $@
- @echo "if [ \$$# -eq 1 ];then" >> $@
- @echo " INSTALL_DIR=\$$1;" >> $@
- @echo "else" >> $@
- @echo " INSTALL_DIR=$(INSTALL_DIR);" >> $@
- @echo "fi" >> $@
- @echo "" >> $@
- @echo "function munge() {" >> $@
- @echo " sed -e \"s;%LOG_OTP%;\$$INSTALL_DIR/$(RELS)/log/$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%VAR_OTP%;\$$INSTALL_DIR/$(RELS)/var/$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%RELS%;$(RELS);g\" \\" >> $@
- @echo " -e \"s;%REL_VSN%;$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%USER%;$$USER;g\" \\" >> $@
- @echo " -e \"s;%HTDOC_ROOT%;\$$INSTALL_DIR/$(RELS)/var/$(REL_VSN)/www/htdocs;g\" \\" >> $@
- @echo " -e \"s;%MHOST%;\`hostname\`;g\" \\" >> $@
- @echo " -e \"s;%BROADCAST_ADDRESS%;$(BROADCAST_ADDRESS);g\" \\" >> $@
- @echo " -e \"s;%INSTALL_DIR%;\$$INSTALL_DIR;g\" \\" >> $@
- @echo " -e \"s;%CONTACT_NODE%;$(CONTACT_NODE);g\" \\" >> $@
- @echo " -e \"s;%HOSTNAME%;\`hostname --long\`;g\" \\" >> $@
- @echo " -e \"s;%APP_NAME%;$(APP_NAME);g\" \\" >> $@
- @echo " -e \"s;%APP_VERSION%;$(APP_VERSION);g\" \\" >> $@
- @echo ' $$1 > $$2' >> $@
- @echo "}" >> $@
- @echo "" >> $@
- @echo "munge stage/yaws.conf.src var/$(REL_VSN)/www/conf/yaws.conf;" >> $@
- @echo "munge stage/$(RELS).config.src release/$(REL_VSN)/$(RELS).config;" >> $@
- @echo "munge stage/$(RELS).sh.src release/$(REL_VSN)/$(RELS).sh;" >> $@
- @echo "munge stage/$(RELS).rel.src release/$(REL_VSN)/$(RELS).rel;" >> $@
- @echo "chmod +x release/$(REL_VSN)/$(RELS).sh;" >> $@
- @echo "" >> $@
- @echo "cd ..;" >> $@
- @echo "find $(RELS) | cpio -o > \$$INSTALL_DIR/$(RELS).cpio;" >> $@
- @echo "cd -;" >> $@
- @echo "cd \$$INSTALL_DIR; " >> $@
- @echo "echo -n \"Unpacked: \"" >> $@
- @echo "cpio -uid < $(RELS).cpio;" >> $@
- @echo "rm $(RELS).cpio;" >> $@
- @echo "" >> $@
- @echo "echo \"pwd is \`pwd\`\";" >> $@
- @echo "cd $(RELS);" >> $@
- @echo " erl -pz build/$(REL_VSN) \\" >> $@
- @echo " -noshell \\" >> $@
- @echo -n " -s fs_lib s_apply fs_boot_smithe make_script_and_boot \"[\\\"$(ERL_RUN_TOP)/*\\\", \\\"lib/\\\"]. \" " >> $@
- @echo -n "\"\\\"stage/$$(basename `pwd`).rel.src\\\". \" " >> $@
- @echo -n "\"[local]. \" " >> $@
- @echo "-s init stop | egrep '*terminate*|ERROR'" >> $@
- @echo "if [ \$$? -eq 0 ]; then" >> $@
- @echo "echo \"============================================\";" >> $@
- @echo "echo \"STAGE FAILURE \$$? - Silence the discord.\";" >> $@
- @echo "echo \"============================================\";" >> $@
- @echo "exit 1;" >> $@
- @echo "fi" >> $@
- @echo "" >> $@
- @echo "mv $(RELS).rel $(RELS).script $(RELS).boot release/$(REL_VSN);" >> $@
- @echo "" >> $@
- @echo "rm -r stage;" >> $@
- @echo "rm -r build;" >> $@
- @echo "cd -;" >> $@
- @echo "" >> $@
- @echo "chgrp -R erts $(RELS); " >> $@
- @echo "chmod -R 775 $(RELS); " >> $@
- @echo "cd -" >> $@
- @echo "" >> $@
- @echo "rm -f /usr/local/bin/$(APP_NAME);" >> $@
- @echo "ln -s \$$INSTALL_DIR/$(RELS)/release/$(REL_VSN)/$(RELS).sh /usr/local/bin/$(APP_NAME);" >> $@
- @echo "chgrp -R erts /usr/local/bin/$(APP_NAME); " >> $@
- @echo "chmod -R 775 /usr/local/bin/$(APP_NAME); " >> $@
- @echo "rm \$$INSTALL_DIR/$(RELS)/install.sh;" >> $@
- @echo "echo -n $$'\e[0;32m'" >> $@
- @echo "echo \"$(APP_NAME) installation to \$$INSTALL_DIR complete.\"" >> $@
- @echo "echo -n $$'\e[0m'" >> $@
- chmod +x $@
-
-
-stage: $(RELS)
- cd $(RELS); \
- ./install.sh; \
- cd -
-
-$(RELS)/var/$(REL_VSN)/www/conf/mime.types: ../../build/mime.types
- cp $< $@
-
-$(RELS)-$(LOCATION)-$(REL_VSN).tgz: $(RELS)
- tar -zcvf $@ $<
-
-$(RELS)/release/$(REL_VSN)/clean_release: ../../tools/utilities/clean_release
- cp $< $@
-
+++ /dev/null
-%%% -*- mode:erlang -*-
-%%% Parameter settings for apps on %APP_NAME%
-%%% Warning - this config file *must* end with <dot><whitespace>
-
-%% write log files to sasl_dir
-[
- {sasl,
- [
- {sasl_error_logger, {file, "%LOG_OTP%/sasl_log"}}
- ]},
-
-
- {gas,
- [
- {mod_specs, [{elwrap, {fs_elwrap_h, start_link}}]},
-
- % elwrap config.
- {err_log, "%LOG_OTP%/err_log"},
- {err_log_wrap_info, {{err,5000000,10},{sasl,5000000,10}}},
- {err_log_tty, true} % Log to the screen
- ]},
-
- {%APP_NAME%,
- [
- ]}
-].
+++ /dev/null
-%%% -*- mode:erlang -*-
-{release,
- {"%%APP_NAME%%_rel", "%REL_VSN%"},
- erts,
- [
- kernel,
- stdlib,
- sasl,
- fslib,
- gas,
- %%APP_NAME%%
- ]
-}.
-
+++ /dev/null
-REL_VSN=1.0
+++ /dev/null
-
-# conf for yaws
-
-
-# first we have a set of globals
-# That apply to all virtual servers
-
-
-# This is the directory where all logfiles for
-# all virtual servers will be written
-
-logdir = /var/log/yaws
-
-# This the path to a directory where additional
-# beam code can be placed. The daemon will add this
-# directory to its search path
-
-ebin_dir = /var/yaws/ebin
-
-
-# This is a directory where application specific .hrl
-# files can be placed. application specifig .yaws code can
-# then include these .hrl files
-
-include_dir = /var/yaws/include
-
-
-
-
-
-# This is a debug variable, possible values are http | traffic | false
-# It is also possible to set the trace (possibly to the tty) while
-# invoking yaws from the shell as in
-# yaws -i -T -x (see man yaws)
-
-trace = false
-
-
-
-
-
-# it is possible to have yaws start additional
-# application specific code at startup
-#
-# runmod = mymodule
-
-
-# By default yaws will copy the erlang error_log and
-# end write it to a wrap log called report.log (in the logdir)
-# this feature can be turned off. This would typically
-# be the case when yaws runs within another larger app
-
-copy_error_log = true
-
-
-# Logs are wrap logs
-
-log_wrap_size = 1000000
-
-
-# Possibly resolve all hostnames in logfiles so webalizer
-# can produce the nice geography piechart
-
-log_resolve_hostname = false
-
-
-
-# fail completely or not if yaws fails
-# to bind a listen socket
-fail_on_bind_err = true
-
-
-
-# If yaws is started as root, it can, once it has opened
-# all relevant sockets for listening, change the uid to a
-# user with lower accessrights than root
-
-# username = nobody
-
-
-# If HTTP auth is used, it is possible to have a specific
-# auth log.
-
-auth_log = true
-
-
-# When we're running multiple yaws systems on the same
-# host, we need to give each yaws system an individual
-# name. Yaws will write a number of runtime files under
-# /tmp/yaws/${id}
-# The default value is "default"
-
-
-# id = myname
-
-
-# earlier versions of Yaws picked the first virtual host
-# in a list of hosts with the same IP/PORT when the Host:
-# header doesn't match any name on any Host
-# This is often nice in testing environments but not
-# acceptable in real live hosting scenarios
-
-pick_first_virthost_on_nomatch = true
-
-
-# All unices are broken since it's not possible to bind to
-# a privileged port (< 1024) unless uid==0
-# There is a contrib in jungerl which makes it possible by means
-# of an external setuid root programm called fdsrv to listen to
-# to privileged port.
-# If we use this feature, it requires fdsrv to be properly installed.
-# Doesn't yet work with SSL.
-
-use_fdsrv = false
-
-
-
-
-# end then a set of virtual servers
-# First two virthosted servers on the same IP (0.0.0.0)
-# in this case, but an explicit IP can be given as well
-
-<server core.martinjlogan.com>
- port = 80
- listen = 0.0.0.0
- docroot = /var/yaws/www
- arg_rewrite_mod = pwr_arg_rewrite_mod
- appmods = <pwr, pwr_main_controller_appmod>
-</server>
-
-<server localhost>
- port = 80
- listen = 0.0.0.0
- docroot = /tmp
- dir_listings = true
- dav = true
- <auth>
- realm = foobar
- dir = /
- user = foo:bar
- user = baz:bar
- </auth>
-</server>
-
-
-
-# And then an ssl server
-
-<server core.martinjlogan.com>
- port = 443
- docroot = /tmp
- listen = 0.0.0.0
- dir_listings = true
- <ssl>
- keyfile = /usr/local/yaws/etc/yaws-key.pem
- certfile = /usr/local/yaws/etc/yaws-cert.pem
- </ssl>
-</server>
-
-
-
-
-
-
-
-
+++ /dev/null
-#!/bin/sh
-
-if [ $# -eq 3 ]; then
- OLD_PREFIX=$1
- NEW_PREFIX=$2
- FILENAME=$3
- NEW_FILENAME=$(echo $FILENAME | sed -e "s/$OLD_PREFIX/$NEW_PREFIX/")
- echo "moving $FILENAME to $NEW_FILENAME"
- mv $FILENAME $NEW_FILENAME
- exit 0;
-fi
-
-
-if [ $# -eq 2 ]; then
- while read line;
- do
- OLD_PREFIX=$1
- NEW_PREFIX=$2
- NEW_FILENAME=$(echo ${line} | sed -e "s/$OLD_PREFIX/$NEW_PREFIX/")
- echo "moving ${line} to $NEW_FILENAME"
- mv ${line} $NEW_FILENAME
- done
- exit 0
-fi
-
+++ /dev/null
-#!/bin/sh
-
-
-if [ $# -lt 2 ]; then
- echo "usage: substitute.sh <variable to replace> <value to replace with> <filename | STDIN>"
- exit 1
-fi
-
-if [ $# -eq 3 ]; then
- VARIABLE=$1
- VALUE=$2
- FILENAME=$3
-
- echo "replacing $VARIABLE with $VALUE in $FILENAME"
- sed -e "s/$VARIABLE/$VALUE/" $FILENAME > "$FILENAME"_tmp
- mv "$FILENAME"_tmp $FILENAME
- exit 0
-fi
-
-if [ $# -eq 2 ]; then
- while read line;
- do
- VARIABLE=$1
- VALUE=$2
- FILENAME=${line}
-
- echo "replacing $VARIABLE with $VALUE in $FILENAME"
- sed -e "s/$VARIABLE/$VALUE/" $FILENAME > "$FILENAME"_tmp
- mv "$FILENAME"_tmp $FILENAME
- done
- exit 0
-fi
-
+++ /dev/null
-# ----------------------------------------------------
-# Make file for creating an otp release.
-# ----------------------------------------------------
-
-##
-# Basename of this release.
-##
-RELS=$(shell basename `pwd`)
-APP_NAME=$(shell echo $(RELS) | sed s/_rel$$//)
-
-include ../../build/otp.mk
-
-include ./vsn.mk
-
-#include $(ERL_TOP)/make/target.mk
-#include $(ERL_TOP)/make/$(TARGET)/otp.mk
-
-USR_LIBPATH=../../lib
-INSTALL_DIR=/usr/local/lib
-ABS_USER_LIBPATH=$(shell cd ../../lib;pwd)
-
-# ----------------------------------------------------
-# CREATE DIR STRUCTURE HERE
-# ----------------------------------------------------
-
-HTDOCS=$(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.html) \
- $(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.htm) \
- $(wildcard $(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs/*.yaws)
-BUILD_FILES=fs_boot_smithe.beam fs_lists.beam fs_lib.beam
-
-LOCAL_DIR=local
-#LOCAL_DIR=$(shell cat $(RELS).rel.src |grep -m 1 '$(APP_NAME)' |awk -F '"' '{printf "%s-%s", $$2,$$4}')
-
-DIR_STRUCTURE= \
- $(LOCAL_DIR) \
- $(LOCAL_DIR)/log/$(REL_VSN) \
- $(LOCAL_DIR)/var/$(REL_VSN) \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/htdocs
-
-PRODUCTION_DIR_STRUCTURE= \
- $(RELS) \
- $(RELS)/release/$(REL_VSN) \
- $(RELS)/stage \
- $(RELS)/log/$(REL_VSN) \
- $(RELS)/var/$(REL_VSN) \
- $(RELS)/var/$(REL_VSN)/www \
- $(RELS)/var/$(REL_VSN)/www/htdocs \
- $(RELS)/var/$(REL_VSN)/www/conf
-
-# ----------------------------------------------------
-SCRIPT_AND_BOOT_FILES= \
- $(RELS).script \
- $(RELS).boot
-
-LOCAL_SCRIPT_AND_BOOT_FILES= \
- $(LOCAL_DIR)/$(RELS).script \
- $(LOCAL_DIR)/$(RELS).boot
-
-LOCAL_HTTP_CONF= \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types
-
-PRODUCTION_HTTP_CONF= \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf \
- $(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types
-
-LOCAL_TARGET_FILES=$(LOCAL_HTTP_CONF) $(LOCAL_DIR)/$(RELS).config $(LOCAL_SCRIPT_AND_BOOT_FILES)
-
-LOCAL_TARGETS=$(LOCAL_DIR)/$(RELS).sh vsnit $(LOCAL_TARGET_FILES)
-
-PRODUCTION_TARGETS=$(RELS)/build/$(REL_VSN) \
- $(RELS)/lib \
- $(RELS)/stage/$(RELS).rel.src \
- $(RELS)/stage/$(RELS).config.src \
- $(RELS)/stage/yaws.conf.src \
- $(RELS)/stage/$(RELS).sh.src \
- $(RELS)/var/$(REL_VSN)/www/htdocs \
- $(RELS)/install.sh \
- $(RELS)/release/$(REL_VSN)/clean_release
-
-# ----------------------------------------------------
-# TARGETS
-# ----------------------------------------------------
-
-all debug opt instr script: $(DIR_STRUCTURE) $(LOCAL_TARGETS) $(PRODUCTION_DIR_STRUCTURE) $(PRODUCTION_TARGETS)
- @echo $(HTDOCS)
-
-install: stage
-
-tar: $(RELS)-$(LOCATION)-$(REL_VSN).tgz
-
-$(DIR_STRUCTURE):
- mkdir -p $@
-
-$(PRODUCTION_DIR_STRUCTURE):
- mkdir -p $@
-
-clean:
- $(RM) $(REL_SCRIPTS) $(TARGET_FILES)
- $(RM) -r $(LOCAL_DIR) $(PRODN_DIR)
- $(RM) $(RELS).rel
- $(RM) -r $(RELS)
- $(RM) $(RELS)*.tgz
- $(RM) $(RELS).rel.src.tmp
- $(RM) $(SCRIPT_AND_BOOT_FILES)
-
-docs:
-
-# ----------------------------------------------------
-# TARGETS FOR LOCAL MODE
-# ----------------------------------------------------
-
-# startup script for local mode
-$(LOCAL_DIR)/$(RELS).sh:
- @echo '#!/bin/sh' > $@
- @echo "cd $(CURDIR)/$(LOCAL_DIR)" >> $@
- @echo "erl -name $${USER}_$(RELS) -boot $(RELS) -config $(RELS).config \$$@" >> $@
- chmod +x $@
- @echo
- @echo "==== Start local node with \"sh $@\" ===="
- @echo
-
-# Create the config file for local mode.
-$(LOCAL_DIR)/$(RELS).config: $(RELS).config.src
- sed -e 's;%LOG_OTP%;$(CURDIR)/$(LOCAL_DIR)/log/$(REL_VSN);' \
- -e 's;%VAR_OTP%;$(CURDIR)/$(LOCAL_DIR)/var/$(REL_VSN);' \
- -e 's;%RELS%;$(RELS);g' \
- -e 's;%HOME%;$(HOME);g' \
- -e 's;%BROADCAST_ADDRESS%;$(BROADCAST_ADDRESS);g' \
- -e 's;%CONTACT_NODE%;$(CONTACT_NODE);g' \
- -e "s;%HOSTNAME%;`hostname --long`;" \
- -e 's;%APP_NAME%;$(APP_NAME);' \
- -e 's;%APP_VERSION%;$(APP_VERSION);g' \
- $< > $@
-
-# Create the httpd conf file for local mode.
-$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/yaws.conf: yaws.conf.src
- sed -e 's;%VAR_OTP%;$(CURDIR)/$(LOCAL_DIR)/var/$(REL_VSN);' \
- -e 's;%LOG_OTP%;$(CURDIR)/$(LOCAL_DIR)/log/$(REL_VSN);' \
- -e 's;%HTDOC_ROOT%;$(ABS_USER_LIBPATH)/$(APP_NAME)/htdocs;' \
- -e 's;%APP_NAME%;$(APP_NAME);' \
- -e 's;%RELS%;$(RELS);' \
- -e 's;%USER%;$(USER);' \
- -e 's;%HTDOC_ROOT%;$(ABS_USER_LIBPATH);' \
- -e 's;%MHOST%;$(MHOST);' \
- $< > $@
-
-# Create the config file for local mode.
-vsnit: $(RELS).rel.src
- sed -e 's;%REL_VSN%;$(REL_VSN);' \
- $< > $<.tmp
-
-# Create and position script and boot files for local mode.
-$(LOCAL_SCRIPT_AND_BOOT_FILES):
- @ erl -pz $(USR_LIBPATH)/fslib/ebin \
- -noshell \
- -s fs_lib s_apply fs_boot_smithe make_script_and_boot "[\"$(ERL_RUN_TOP)/*\", \"$(USR_LIBPATH)\"]. " \
- \"$$(basename `pwd`)".rel.src.tmp\". " \
- "[local]. " \
- -s init stop
- cp $(SCRIPT_AND_BOOT_FILES) $(LOCAL_DIR)/
-
-$(LOCAL_DIR)/var/$(REL_VSN)/www/conf/mime.types: ../../build/mime.types
- cp $< $@
-
-# ----------------------------------------------------
-# TARGETS FOR PRODUCTION MODE
-# ----------------------------------------------------
-$(RELS)/lib:
- # For some reason this will not happen if added to PRODUCTION_DIR_STRUCTURE
- mkdir $@
- @ erl -pz $(RELS)/build/$(REL_VSN) \
- -noshell \
- -s fs_lib s_apply fs_boot_smithe stage_from_relsrc "[\"$(USR_LIBPATH)\"]. " \
- \"$$(basename `pwd`)".rel.src\". " \
- \"$@\"". " \
- -s init stop
-
-# Move the htdocs from the local apps to the production htdoc root directory.
-$(RELS)/var/$(REL_VSN)/www/htdocs/: $(HTDOCS)
- @mkdir -p $(RELS)/var/$(REL_VSN)/www/htdocs; \
- for x in $(HTDOCS);do \
- cp $$x $@; \
- done
-
-# startup script for production mode
-$(RELS)/stage/$(RELS).sh.src:
- @echo '#!/bin/sh' > $@
- @echo "cd %INSTALL_DIR%/$(RELS)/release/$(REL_VSN)" >> $@
- @echo "erl -name $(RELS) -boot $(RELS) -config $(RELS).config -detached \$$@" >> $@
- chmod +x $@
-
-$(RELS)/build/$(REL_VSN): $(USR_LIBPATH)/fslib/ebin
- mkdir -p $(RELS)/build/$(REL_VSN)
- cp $</fs_boot_smithe.beam $@
- cp $</fs_lib.beam $@
- cp $</fs_lists.beam $@
-
-$(RELS)/stage/$(RELS).rel.src: $(RELS).rel.src.tmp
- cp $< $@
-
-$(RELS)/stage/$(RELS).config.src: $(RELS).config.src
- cp $< $@
-
-$(RELS)/stage/yaws.conf.src: yaws.conf.src
- cp $< $@
-
-$(RELS)/install.sh:
- @echo '#!/bin/sh' > $@
- @echo "" >> $@
- @echo "if [ \$$# -eq 1 ];then" >> $@
- @echo " INSTALL_DIR=\$$1;" >> $@
- @echo "else" >> $@
- @echo " INSTALL_DIR=$(INSTALL_DIR);" >> $@
- @echo "fi" >> $@
- @echo "" >> $@
- @echo "function munge() {" >> $@
- @echo " sed -e \"s;%LOG_OTP%;\$$INSTALL_DIR/$(RELS)/log/$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%VAR_OTP%;\$$INSTALL_DIR/$(RELS)/var/$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%RELS%;$(RELS);g\" \\" >> $@
- @echo " -e \"s;%REL_VSN%;$(REL_VSN);g\" \\" >> $@
- @echo " -e \"s;%USER%;$$USER;g\" \\" >> $@
- @echo " -e \"s;%HTDOC_ROOT%;\$$INSTALL_DIR/$(RELS)/var/$(REL_VSN)/www/htdocs;g\" \\" >> $@
- @echo " -e \"s;%MHOST%;\`hostname\`;g\" \\" >> $@
- @echo " -e \"s;%BROADCAST_ADDRESS%;$(BROADCAST_ADDRESS);g\" \\" >> $@
- @echo " -e \"s;%INSTALL_DIR%;\$$INSTALL_DIR;g\" \\" >> $@
- @echo " -e \"s;%CONTACT_NODE%;$(CONTACT_NODE);g\" \\" >> $@
- @echo " -e \"s;%HOSTNAME%;\`hostname --long\`;g\" \\" >> $@
- @echo " -e \"s;%APP_NAME%;$(APP_NAME);g\" \\" >> $@
- @echo " -e \"s;%APP_VERSION%;$(APP_VERSION);g\" \\" >> $@
- @echo ' $$1 > $$2' >> $@
- @echo "}" >> $@
- @echo "" >> $@
- @echo "munge stage/yaws.conf.src var/$(REL_VSN)/www/conf/yaws.conf;" >> $@
- @echo "munge stage/$(RELS).config.src release/$(REL_VSN)/$(RELS).config;" >> $@
- @echo "munge stage/$(RELS).sh.src release/$(REL_VSN)/$(RELS).sh;" >> $@
- @echo "munge stage/$(RELS).rel.src release/$(REL_VSN)/$(RELS).rel;" >> $@
- @echo "chmod +x release/$(REL_VSN)/$(RELS).sh;" >> $@
- @echo "" >> $@
- @echo "cd ..;" >> $@
- @echo "find $(RELS) | cpio -o > \$$INSTALL_DIR/$(RELS).cpio;" >> $@
- @echo "cd -;" >> $@
- @echo "cd \$$INSTALL_DIR; " >> $@
- @echo "echo -n \"Unpacked: \"" >> $@
- @echo "cpio -uid < $(RELS).cpio;" >> $@
- @echo "rm $(RELS).cpio;" >> $@
- @echo "" >> $@
- @echo "echo \"pwd is \`pwd\`\";" >> $@
- @echo "cd $(RELS);" >> $@
- @echo " erl -pz build/$(REL_VSN) \\" >> $@
- @echo " -noshell \\" >> $@
- @echo -n " -s fs_lib s_apply fs_boot_smithe make_script_and_boot \"[\\\"$(ERL_RUN_TOP)/*\\\", \\\"lib/\\\"]. \" " >> $@
- @echo -n "\"\\\"stage/$$(basename `pwd`).rel.src\\\". \" " >> $@
- @echo -n "\"[local]. \" " >> $@
- @echo "-s init stop | egrep '*terminate*|ERROR'" >> $@
- @echo "if [ \$$? -eq 0 ]; then" >> $@
- @echo "echo \"============================================\";" >> $@
- @echo "echo \"STAGE FAILURE \$$? - Silence the discord.\";" >> $@
- @echo "echo \"============================================\";" >> $@
- @echo "exit 1;" >> $@
- @echo "fi" >> $@
- @echo "" >> $@
- @echo "mv $(RELS).rel $(RELS).script $(RELS).boot release/$(REL_VSN);" >> $@
- @echo "" >> $@
- @echo "rm -r stage;" >> $@
- @echo "rm -r build;" >> $@
- @echo "cd -;" >> $@
- @echo "" >> $@
- @echo "chgrp -R erts $(RELS); " >> $@
- @echo "chmod -R 775 $(RELS); " >> $@
- @echo "cd -" >> $@
- @echo "" >> $@
- @echo "rm -f /usr/local/bin/$(APP_NAME);" >> $@
- @echo "ln -s \$$INSTALL_DIR/$(RELS)/release/$(REL_VSN)/$(RELS).sh /usr/local/bin/$(APP_NAME);" >> $@
- @echo "chgrp -R erts /usr/local/bin/$(APP_NAME); " >> $@
- @echo "chmod -R 775 /usr/local/bin/$(APP_NAME); " >> $@
- @echo "rm \$$INSTALL_DIR/$(RELS)/install.sh;" >> $@
- @echo "echo -n $$'\e[0;32m'" >> $@
- @echo "echo \"$(APP_NAME) installation to \$$INSTALL_DIR complete.\"" >> $@
- @echo "echo -n $$'\e[0m'" >> $@
- chmod +x $@
-
-
-stage: $(RELS)
- cd $(RELS); \
- ./install.sh; \
- cd -
-
-$(RELS)/var/$(REL_VSN)/www/conf/mime.types: ../../build/mime.types
- cp $< $@
-
-$(RELS)-$(LOCATION)-$(REL_VSN).tgz: $(RELS)
- tar -zcvf $@ $<
-
-$(RELS)/release/$(REL_VSN)/clean_release: ../../tools/utilities/clean_release
- cp $< $@
-
+++ /dev/null
-%%% -*- mode:erlang -*-
-%%% Parameter settings for apps on %APP_NAME%
-%%% Warning - this config file *must* end with <dot><whitespace>
-
-%% write log files to sasl_dir
-[
- {sasl,
- [
- {sasl_error_logger, {file, "%LOG_OTP%/sasl_log"}}
- ]},
-
-
- {gas,
- [
- {mod_specs, [{elwrap, {fs_elwrap_h, start_link}}]},
-
- % elwrap config.
- {err_log, "%LOG_OTP%/err_log"},
- {err_log_wrap_info, {{err,5000000,10},{sasl,5000000,10}}},
- {err_log_tty, true} % Log to the screen
- ]},
-
- {%APP_NAME%,
- [
- ]}
-].
+++ /dev/null
-%%% -*- mode:erlang -*-
-{release,
- {"thrift_rel", "%REL_VSN%"},
- erts,
- [
- kernel,
- stdlib,
- sasl,
- fslib,
- gas,
- thrift
- ]
-}.
-
+++ /dev/null
-REL_VSN=1.0
+++ /dev/null
-
-# conf for yaws
-
-
-# first we have a set of globals
-# That apply to all virtual servers
-
-
-# This is the directory where all logfiles for
-# all virtual servers will be written
-
-logdir = /var/log/yaws
-
-# This the path to a directory where additional
-# beam code can be placed. The daemon will add this
-# directory to its search path
-
-ebin_dir = /var/yaws/ebin
-
-
-# This is a directory where application specific .hrl
-# files can be placed. application specifig .yaws code can
-# then include these .hrl files
-
-include_dir = /var/yaws/include
-
-
-
-
-
-# This is a debug variable, possible values are http | traffic | false
-# It is also possible to set the trace (possibly to the tty) while
-# invoking yaws from the shell as in
-# yaws -i -T -x (see man yaws)
-
-trace = false
-
-
-
-
-
-# it is possible to have yaws start additional
-# application specific code at startup
-#
-# runmod = mymodule
-
-
-# By default yaws will copy the erlang error_log and
-# end write it to a wrap log called report.log (in the logdir)
-# this feature can be turned off. This would typically
-# be the case when yaws runs within another larger app
-
-copy_error_log = true
-
-
-# Logs are wrap logs
-
-log_wrap_size = 1000000
-
-
-# Possibly resolve all hostnames in logfiles so webalizer
-# can produce the nice geography piechart
-
-log_resolve_hostname = false
-
-
-
-# fail completely or not if yaws fails
-# to bind a listen socket
-fail_on_bind_err = true
-
-
-
-# If yaws is started as root, it can, once it has opened
-# all relevant sockets for listening, change the uid to a
-# user with lower accessrights than root
-
-# username = nobody
-
-
-# If HTTP auth is used, it is possible to have a specific
-# auth log.
-
-auth_log = true
-
-
-# When we're running multiple yaws systems on the same
-# host, we need to give each yaws system an individual
-# name. Yaws will write a number of runtime files under
-# /tmp/yaws/${id}
-# The default value is "default"
-
-
-# id = myname
-
-
-# earlier versions of Yaws picked the first virtual host
-# in a list of hosts with the same IP/PORT when the Host:
-# header doesn't match any name on any Host
-# This is often nice in testing environments but not
-# acceptable in real live hosting scenarios
-
-pick_first_virthost_on_nomatch = true
-
-
-# All unices are broken since it's not possible to bind to
-# a privileged port (< 1024) unless uid==0
-# There is a contrib in jungerl which makes it possible by means
-# of an external setuid root programm called fdsrv to listen to
-# to privileged port.
-# If we use this feature, it requires fdsrv to be properly installed.
-# Doesn't yet work with SSL.
-
-use_fdsrv = false
-
-
-
-
-# end then a set of virtual servers
-# First two virthosted servers on the same IP (0.0.0.0)
-# in this case, but an explicit IP can be given as well
-
-<server core.martinjlogan.com>
- port = 80
- listen = 0.0.0.0
- docroot = /var/yaws/www
- arg_rewrite_mod = pwr_arg_rewrite_mod
- appmods = <pwr, pwr_main_controller_appmod>
-</server>
-
-<server localhost>
- port = 80
- listen = 0.0.0.0
- docroot = /tmp
- dir_listings = true
- dav = true
- <auth>
- realm = foobar
- dir = /
- user = foo:bar
- user = baz:bar
- </auth>
-</server>
-
-
-
-# And then an ssl server
-
-<server core.martinjlogan.com>
- port = 443
- docroot = /tmp
- listen = 0.0.0.0
- dir_listings = true
- <ssl>
- keyfile = /usr/local/yaws/etc/yaws-key.pem
- certfile = /usr/local/yaws/etc/yaws-cert.pem
- </ssl>
-</server>
-
-
-
-
-
-
-
-
+++ /dev/null
-;; erlang-start.el --- Load this file to initialize the Erlang package.
-
-;; Copyright (C) 1998 Ericsson Telecom AB
-
-;; Author: Anders Lindgren
-;; Version: 2.3
-;; Keywords: erlang, languages, processes
-;; Created: 1996-09-18
-;; Date: 1998-03-16
-
-;;; Commentary:
-
-;; Introduction:
-;; ------------
-;;
-;; This package provides support for the programming language Erlang.
-;; The package provides an editing mode with lots of bells and
-;; whistles, compilation support, and it makes it possible for the
-;; user to start Erlang shells that run inside Emacs.
-;;
-;; See the Erlang distribution for full documentation of this package.
-
-;; Installation:
-;; ------------
-;;
-;; Place this file in Emacs load path, byte-compile it, and add the
-;; following line to the appropriate init file:
-;;
-;; (require 'erlang-start)
-;;
-;; The full documentation contains much more extensive description of
-;; the installation procedure.
-
-;; Reporting Bugs:
-;; --------------
-;;
-;; Please send bug reports to the following email address:
-;; support@erlang.ericsson.se
-;;
-;; Please state as exactly as possible:
-;; - Version number of Erlang Mode (see the menu), Emacs, Erlang,
-;; and of any other relevant software.
-;; - What the expected result was.
-;; - What you did, preferably in a repeatable step-by-step form.
-;; - A description of the unexpected result.
-;; - Relevant pieces of Erlang code causing the problem.
-;; - Personal Emacs customisations, if any.
-;;
-;; Should the Emacs generate an error, please set the emacs variable
-;; `debug-on-error' to `t'. Repeat the error and enclose the debug
-;; information in your bug-report.
-;;
-;; To set the variable you can use the following command:
-;; M-x set-variable RET debug-on-error RET t RET
-;;; Code:
-
-;;
-;; Declare functions in "erlang.el".
-;;
-
-(autoload 'erlang-mode "erlang" "Major mode for editing Erlang code." t)
-(autoload 'erlang-version "erlang"
- "Return the current version of Erlang mode." t)
-(autoload 'erlang-shell "erlang" "Start a new Erlang shell." t)
-(autoload 'run-erlang "erlang" "Start a new Erlang shell." t)
-
-(autoload 'erlang-compile "erlang"
- "Compile Erlang module in current buffer." t)
-
-(autoload 'erlang-man-module "erlang"
- "Find manual page for MODULE." t)
-(autoload 'erlang-man-function "erlang"
- "Find manual page for NAME, where NAME is module:function." t)
-
-(autoload 'erlang-find-tag "erlang"
- "Like `find-tag'. Capable of retreiving Erlang modules.")
-(autoload 'erlang-find-tag-other-window "erlang"
- "Like `find-tag-other-window'. Capable of retreiving Erlang modules.")
-
-
-;;
-;; Associate files extensions ".erl" and ".hrl" with Erlang mode.
-;;
-
-(let ((a '("\\.erl\\'" . erlang-mode))
- (b '("\\.hrl\\'" . erlang-mode)))
- (or (assoc (car a) auto-mode-alist)
- (setq auto-mode-alist (cons a auto-mode-alist)))
- (or (assoc (car b) auto-mode-alist)
- (setq auto-mode-alist (cons b auto-mode-alist))))
-
-
-;;
-;; Ignore files ending in ".jam", ".vee", and ".beam" when performing
-;; file completion.
-;;
-
-(let ((erl-ext '(".jam" ".vee" ".beam")))
- (while erl-ext
- (let ((cie completion-ignored-extensions))
- (while (and cie (not (string-equal (car cie) (car erl-ext))))
- (setq cie (cdr cie)))
- (if (null cie)
- (setq completion-ignored-extensions
- (cons (car erl-ext) completion-ignored-extensions))))
- (setq erl-ext (cdr erl-ext))))
-
-
-;;
-;; The end.
-;;
-
-(provide 'erlang-start)
-
-;; erlang-start.el ends here.
+++ /dev/null
Content-type: text/html
Supwisdom Source - common/thrift.git/commitdiff
500 - Internal Server Error
Unknown encoding 'gb18030' at /usr/local/share/gitweb/gitweb.cgi line 1539