Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added patches written by tobbe to support autoconf
- Loading branch information
Filippo Pacini
committed
May 2, 2007
1 parent
1a752d6
commit 16148cb
Showing
6 changed files
with
163 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
MK_INCLUDE=include.mk | ||
|
||
all: config.status $(MK_INCLUDE) | ||
|
||
config.status: configure | ||
./configure | ||
|
||
configure: configure.ac | ||
autoconf | ||
|
||
clean: | ||
-rm -rf config.cache config.log config.status configure $(MK_INCLUDE) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
AC_INIT(sgte, 0.4, pacini@sgconsulting.it, sgte) | ||
AC_PREREQ(2.59c) | ||
AC_COPYRIGHT(Copyright (C) 2006-2007 S.G. Consulting) | ||
|
||
EBLOG_DIR=$(dirname `pwd`) | ||
AC_SUBST(EBLOG_DIR) | ||
|
||
AC_ERLANG_NEED_ERL | ||
AC_ERLANG_NEED_ERLC | ||
|
||
AC_ERLANG_SUBST_ROOT_DIR | ||
|
||
dnl C support | ||
|
||
AC_PROG_CC | ||
|
||
case "$target_os" in | ||
*cygwin*) | ||
: | ||
dnl fix this later | ||
;; | ||
linux*) | ||
AC_DEFINE(LINUX,,LINUX) | ||
LD_SHARED="ld -shared" | ||
;; | ||
*bsd*) | ||
AC_DEFINE(BSD,,BSD) | ||
LD_SHARED="ld -Bshareable" | ||
;; | ||
*solaris*) | ||
AC_DEFINE(SOLARIS,,SOLARIS) | ||
LD_SHARED="ld -G" | ||
;; | ||
*darwin*) | ||
AC_DEFINE([DARWIN], [], [Description]) | ||
LD_SHARED="cc -bundle -flat_namespace -undefined suppress" | ||
;; | ||
*) | ||
LD_SHARED="ld -shared" | ||
;; | ||
esac | ||
|
||
AC_SUBST(LD_SHARED) | ||
|
||
|
||
define(OUTPUT_FILES, | ||
include.mk) | ||
|
||
AC_OUTPUT(OUTPUT_FILES, | ||
[ | ||
])dnl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
###-*-makefile-*- ; force emacs to enter makefile-mode | ||
|
||
###################################################################### | ||
## C | ||
|
||
CC := @CC@ | ||
CFLAGS := @CFLAGS@ @DEFS@ | ||
LD_SHARED := @LD_SHARED@ | ||
###################################################################### | ||
|
||
|
||
PREFIX = @prefix@ | ||
prefix = ${PREFIX} | ||
ETCDIR = @sysconfdir@ | ||
VARDIR = @localstatedir@ | ||
|
||
ERL=@ERL@ | ||
ERLC=@ERLC@ | ||
|
||
ERLDIR=@ERLANG_ROOT_DIR@ | ||
ERL_C_INCLUDE_DIR=$(ERLDIR)/usr/include | ||
|
||
EMULATOR=beam | ||
ifdef debug | ||
ERLC_FLAGS+=-Ddebug | ||
endif | ||
|
||
ifdef trace | ||
ERLC_FLAGS=+trace | ||
endif | ||
|
||
ifdef export_all | ||
ERLC_FLAGS+=-Dexport_all | ||
endif | ||
|
||
# Hmm, don't know if you are supposed to like this better... ;-) | ||
APPSCRIPT = '$$vsn=shift; $$mods=""; while(@ARGV){ $$_=shift; s/^([A-Z].*)$$/\'\''$$1\'\''/; $$mods.=", " if $$mods; $$mods .= $$_; } while(<>) { s/%VSN%/$$vsn/; s/%MODULES%/$$mods/; print; }' | ||
|
||
# Targets | ||
|
||
../ebin/%.app: %.app.src ../vsn.mk Makefile | ||
perl -e $(APPSCRIPT) "$(VSN)" $(MODULES) < $< > $@ | ||
|
||
../ebin/%.appup: %.appup | ||
cp $< $@ | ||
|
||
../ebin/%.$(EMULATOR): %.erl $(wildcard $(YAWSDIR)/lib/*/*/*.hrl) | ||
"$(ERLC)" $(ERLC_FLAGS) -o ../ebin $< | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
include ../conf/include.mk | ||
|
||
EBIN_FILES = ../ebin/sgte.beam \ | ||
../ebin/sgte_render.beam \ | ||
../ebin/sgte_parse.beam | ||
|
||
|
||
all: $(EBIN_FILES) | ||
|
||
clean: | ||
rm -f ../ebin/*.beam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
include ../../conf/include.mk | ||
|
||
EBIN_FILES = ../ebin/sgte_test_compile.beam \ | ||
../ebin/sgte_test_render.beam \ | ||
../ebin/sgte_test_map.beam \ | ||
../ebin/gettext_test.beam \ | ||
../ebin/sgeunit.beam \ | ||
../ebin/run_tests.beam | ||
|
||
|
||
all: $(EBIN_FILES) | ||
|
||
clean: | ||
rm -f ../ebin/*.beam |