Permalink
Browse files

Move gen-yaws-generated to src/

  • Loading branch information...
1 parent 0a80ec3 commit c7ba9b422e6f94741a0cad31412b887e209b8201 @oliv3 committed Jun 27, 2011
Showing with 28 additions and 24 deletions.
  1. +2 −0 Makefile.am
  2. +0 −14 scripts/gen-yaws-generated
  3. +1 −1 scripts/rebar-pre-script
  4. +11 −9 src/Makefile.am
  5. +14 −0 src/gen-yaws-generated
View
@@ -98,3 +98,5 @@ dialyzer: yaws.plt
# .PHONY: test
# test:
# cd test && $(MAKE) all setup test
+
+EXTRA_DIST = scripts/Subst
View
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-# Used by src/Makefile and scripts/rebar-pre-script to create the
-# yaws_generated.erl file
-
-set -e
-
-cat yaws_generated.template | \
- ../scripts/Subst %VSN% "${YAWS_VSN}" | \
- ../scripts/Subst %VARDIR% "${VARDIR}" | \
- ../scripts/Subst %localinstall% $1 | \
- ../scripts/Subst %ETCDIR% "${ETCDIR}"
-
-exit 0
View
@@ -59,7 +59,7 @@ if [ ! -f yaws_configure.hrl ]; then
fi
tmpgen=`mktemp /tmp/${script}.XXXXXX` || fail
YAWS_VSN=$YAWS_VSN VARDIR="$YAWS_VARDIR" ETCDIR="$YAWS_ETCDIR" \
- ../scripts/gen-yaws-generated $YAWS_LOCALINSTALL >$tmpgen || fail
+ ../src/gen-yaws-generated $YAWS_LOCALINSTALL >$tmpgen || fail
keep_or_replace yaws_generated.erl $tmpgen
[ -d "$YAWS_VARDIR" ] || mkdir "$YAWS_VARDIR" || fail
[ -d "$YAWS_ETCDIR" ] || mkdir "$YAWS_ETCDIR" || fail
View
@@ -20,7 +20,6 @@ MODULES=yaws \
yaws_ctl \
yaws_cgi \
yaws_zlib \
- yaws_generated \
mime_types \
yaws_session_server \
yaws_outmod \
@@ -54,15 +53,15 @@ APPSCRIPT = '$$vsn=shift; $$mods=""; while(@ARGV){ $$_=shift; s/^([A-Z].*)$$/\'\
# Targets
yaws.app: yaws.app.src
- perl -e $(APPSCRIPT) "$(YAWS_VSN)" $(MODULES) < $< > $@
+ perl -e $(APPSCRIPT) "$(YAWS_VSN)" $(MODULES) yaws_generated < $< > $@
yaws.appup: yaws.appup.src
sed -e "s/%VSN%/$(YAWS_VSN)/g" < $< > $@
.erl.beam:
$(ERLC) $(ERLCFLAGS) $<
-EBIN_MODULES = $(MODULES:%=%.beam)
+EBIN_MODULES = $(MODULES:%=%.beam) yaws_generated.beam
EBIN_FILES = $(EBIN_MODULES) yaws.app yaws.appup mime_type_c.beam
ERLCFLAGS += -I$(srcdir)/../include
@@ -78,7 +77,7 @@ $(EBIN_FILES): ../include/yaws.hrl ../include/yaws_api.hrl
yaws_generated.erl: yaws_generated.template
YAWS_VSN='$(YAWS_VSN)' VARDIR='$(VARDIR)' ETCDIR='$(ETCDIR)' SRCDIR='$(srcdir)' \
- $(srcdir)/../scripts/gen-yaws-generated true > yaws_generated.erl
+ $(srcdir)/gen-yaws-generated true > yaws_generated.erl
yaws_configure.hrl:
if HAVE_SENDFILE
@@ -97,7 +96,7 @@ endif
# .PHONY: regen
regen:
YAWS_VSN='$(YAWS_VSN)' VARDIR='$(VARDIR)' ETCDIR='$(ETCDIR)' SRCDIR='$(srcdir)' \
- $(srcdir)/../scripts/gen-yaws-generated false > yaws_generated.erl
+ $(srcdir)/gen-yaws-generated false > yaws_generated.erl
charset.def:
if [ -n "$(DEFAULT_CHARSET)" ]; then \
@@ -130,11 +129,12 @@ install-exec-local: regen all
$(INSTALL) -d $(DESTDIR)$(prefix)/lib/yaws/priv
$(INSTALL) -d $(DESTDIR)$(VARDIR)/log/yaws
# $(INSTALL) -d $(DESTDIR)$(VARDIR)/yaws/ebin
- (cd ..; tar cf - ebin ) | (cd $(DESTDIR)$(prefix)/lib/yaws; tar xf - )
+# (cd ..; tar cf - ebin ) | (cd $(DESTDIR)$(prefix)/lib/yaws; tar xf - )
$(INSTALL) -m 644 $(EBIN_MODULES) $(DESTDIR)$(prefix)/lib/yaws/ebin
$(INSTALL) -m 644 yaws.app yaws.appup $(DESTDIR)$(prefix)/lib/yaws/ebin
- (cd ..; tar cf - include ) | (cd $(DESTDIR)$(prefix)/lib/yaws; tar xf - )
- (cd ..; tar cf - priv/*.xsd ) | (cd $(DESTDIR)$(prefix)/lib/yaws; tar xf - )
+# oliv3 FIXME
+# (cd ..; tar cf - include ) | (cd $(DESTDIR)$(prefix)/lib/yaws; tar xf - )
+# (cd ..; tar cf - priv/*.xsd ) | (cd $(DESTDIR)$(prefix)/lib/yaws; tar xf - )
# docsinstall:
# $(INSTALL) -d $(DESTDIR)$(VARDIR)/yaws/www
@@ -146,8 +146,10 @@ install-exec-local: regen all
# xref:
# erl -noshell -pa ../ebin -s yaws_debug xref ../ebin
-EXTRA_DIST = $(MODULES:%=%.erl) mime_type_c.erl yaws_generated.template \
+EXTRA_DIST = $(MODULES:%=%.erl) mime_type_c.erl \
+ gen-yaws-generated yaws_generated.template \
../include yaws_debug.hrl mime.types yaws.app.src yaws.appup.src
+CLEANFILES = yaws.app yaws.appup
uninstall-local:
rm -rf $(DESTDIR)$(prefix)/lib/yaws/ebin
View
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# Used by src/Makefile and scripts/rebar-pre-script to create the
+# yaws_generated.erl file
+
+set -e
+
+cat ${SRCDIR}/yaws_generated.template | \
+ ${SRCDIR}/../scripts/Subst %VSN% "${YAWS_VSN}" | \
+ ${SRCDIR}/../scripts/Subst %VARDIR% "${VARDIR}" | \
+ ${SRCDIR}/../scripts/Subst %localinstall% $1 | \
+ ${SRCDIR}/../scripts/Subst %ETCDIR% "${ETCDIR}"
+
+exit 0

0 comments on commit c7ba9b4

Please sign in to comment.