Guile example makefiles tweaks for consistency with other languages. 'make check' still incomplete.

This commit is contained in:
William S Fulton 2013-04-15 22:13:27 +01:00
commit 2e48e5b852
9 changed files with 43 additions and 38 deletions

View file

@ -19,7 +19,7 @@ SO = @SO@
all:
for d in $(subdirs) ; do (cd $$d ; $(MAKE)) ; done
clean::
clean:
for d in $(subdirs) ; do (cd $$d ; $(MAKE) clean) ; done
rm -f *~ .~*
@ -29,11 +29,11 @@ guile_clean:
# This is meant to be used w/ "make -f ../Makefile" from subdirs.
# Doesn't make sense to use it from here.
sub-all::
sub-all:
$(SWIG) -guile $(SWIGOPT) $(IFILE)
$(CC) $(CFLAGS) -o $(TARGET) $(SRCS) $(WRAP) $(GUILEINCLUDE) $(GUILELINK)
sub-all-cxx::
sub-all-cxx:
$(SWIG) -c++ -guile $(SWIGOPT) $(IFILE)
$(CXX) $(CFLAGS) -o $(TARGET) $(SRCS) $(CXXWRAP) $(GUILEINCLUDE) $(GUILELINK)

View file

@ -3,15 +3,15 @@ TARGET = my-guile
IFILE = example.i
MKDIR = ..
all::
check: build
./my-guile -s constants.scm
build:
$(MAKE) -f $(MKDIR)/Makefile \
SRCS='$(SRCS)' \
TARGET=$(TARGET) \
IFILE=$(IFILE) \
sub-all
clean::
clean:
$(MAKE) -f $(MKDIR)/Makefile TARGET='$(TARGET)' guile_clean
check: all
./my-guile -s constants.scm

View file

@ -3,8 +3,9 @@ TARGET = matrix
IFILE = package.i
MKDIR = ..
check: build
all::
build:
$(MAKE) -f $(MKDIR)/Makefile \
SRCS='$(SRCS)' \
TARGET=$(TARGET) \
@ -12,7 +13,5 @@ all::
MODULE=$(MODULE) \
sub-all
clean::
clean:
$(MAKE) -f $(MKDIR)/Makefile TARGET='$(TARGET)' guile_clean
check: all

View file

@ -4,15 +4,15 @@ SRCS = example.c
TARGET = example
INTERFACE = example.i
all::
check: build
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='my-guile' INTERFACE='$(INTERFACE)' guile_static
clean::
clean:
$(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
check: all

View file

@ -4,15 +4,15 @@ SRCS = example.c
TARGET = example
INTERFACE = example.i
all::
check: build
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='my-guile' INTERFACE='$(INTERFACE)' guile_static
clean::
clean:
$(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
check: all

View file

@ -3,8 +3,9 @@ TARGET = port
IFILE = port.i
MKDIR = ..
check: build
all::
build:
$(MAKE) -f $(MKDIR)/Makefile \
SRCS='$(SRCS)' \
TARGET=$(TARGET) \
@ -12,7 +13,5 @@ all::
MODULE=$(MODULE) \
sub-all
clean::
clean:
$(MAKE) -f $(MKDIR)/Makefile TARGET='$(TARGET)' guile_clean
check: all

View file

@ -3,7 +3,10 @@ TARGET = my-guile
IFILE = example.i
MKDIR = ..
all: $(TARGET)
check: $(TARGET)
./$(TARGET) -s example.scm
build: $(TARGET)
$(TARGET):
$(MAKE) -f $(MKDIR)/Makefile \
@ -12,8 +15,5 @@ $(TARGET):
IFILE=$(IFILE) \
sub-all
clean::
clean:
$(MAKE) -f $(MKDIR)/Makefile TARGET='$(TARGET)' guile_clean
check: $(TARGET)
./$(TARGET) -s example.scm > /dev/null

View file

@ -4,15 +4,15 @@ SRCS =
TARGET = example
INTERFACE = example.i
all::
check: build
build:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' guile_cpp
static::
static:
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
TARGET='my-guile' INTERFACE='$(INTERFACE)' guile_static_cpp
clean::
clean:
$(MAKE) -f $(TOP)/Makefile TARGET='$(TARGET)' guile_clean
check: all