Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Makefile corrected. Scripts for generating TAGS (for my emacs) as wel…

…l as EDoc generation
  • Loading branch information...
commit 5b9631332c946d6e2e388835a98565b6d511bfea 1 parent 44714d4
Ralf Weinbrecher authored
View
12 .gitignore
@@ -1,2 +1,12 @@
*.beam
-.DS_Store
+*.tmproj
+dectsrv.tmproj
+*.#*
+temp
+.DS_Store
+edoc-info
+*.html
+*.css
+*.png
+*.dump
+TAGS
View
4 scripts/createtags.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd ../src
+etags ../include/*.hrl *.erl
View
3  scripts/gendoc.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+erl -noshell -s edoc files $* -s init stop
View
48 src/Makefile
@@ -1,19 +1,39 @@
-# Do not change anything below this line.
-ifeq ($(DEBUG),true)
-DEBUG_FLAGS = -DDEBUG
-else
-DEBUG_FLAGS =
-endif
+#Compiles the code into a ebin dir. relative to the source dir.
+EBIN = ../ebin
+DOC = ../doc
+ERL = erl
+ERLC = erlc
+GEN = beam
+#Where include files are stored ".hrl"
+EFLAGS = -I../include
+SOURCE = xmlrpc.erl xmlrpc_decode.erl xmlrpc_encode.erl xmlrpc_http.erl xmlrpc_util.erl tcp_serv.erl
+TARGETS = $(SOURCE:%.erl=$(EBIN)/%.beam)
-ERLC=erlc
-ERLC_FLAGS=-W $(DEBUG_FLAGS) -o ../ebin
-MODULES=xmlrpc xmlrpc_decode xmlrpc_encode xmlrpc_http xmlrpc_util tcp_serv
-EBIN_FILES=$(MODULES:%=../ebin/%.beam)
+CODE = $(SOURCE:%.erl=$(EBIN)/%.beam)
-all: $(EBIN_FILES)
+$(EBIN)/%.beam: %.erl
+ $(ERLC) -W -b beam -o $(EBIN) $(EFLAGS) $(WAIT) $<
-../ebin/%.beam: %.erl log.hrl
- $(ERLC) $(ERLC_FLAGS) $<
+all: dirs $(TARGETS)
+
+dirs:
+ mkdir -p $(EBIN)
+ mkdir -p $(DOC)
+
+tags:
+ ../scripts/createtags.sh
clean:
- rm -f $(EBIN_FILES)
+ \rm -f $(CODE)
+
+doc:
+ rm -f ../doc/*.html
+ rm -f ../doc/*.css
+ rm -f ../doc/*.png
+ rm -f ../doc/edoc-info
+ ../scripts/gendoc.sh $(SOURCE)
+ mv *.html $(DOC)
+ mv *.css $(DOC)
+ mv *.png $(DOC)
+ mv edoc-info $(DOC)
+ open ../doc/index.html
Please sign in to comment.
Something went wrong with that request. Please try again.