git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 1.5.7.
[libguestfs.git]
/
haskell
/
Makefile.am
diff --git
a/haskell/Makefile.am
b/haskell/Makefile.am
index
dcaf18a
..
2524617
100644
(file)
--- a/
haskell/Makefile.am
+++ b/
haskell/Makefile.am
@@
-15,9
+15,15
@@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-EXTRA_DIST = *.hs run-bindtests
+include $(top_srcdir)/subdir-rules.mk
-CLEANFILES = *~
+generator_built = \
+ Guestfs.hs \
+ Bindtests.hs
+
+# $(generator_built) isn't redundant below as the wildcard rule won't match, and
+# therefore won't generate, the files if they haven't been created yet
+EXTRA_DIST = $(generator_built) *.hs run-bindtests
if HAVE_HASKELL
if HAVE_HASKELL
@@
-32,16
+38,26
@@
check_DATA = Bindtests
GHCFLAGS = -I$(top_builddir)/src -L$(top_builddir)/src/.libs
GHCFLAGS = -I$(top_builddir)/src -L$(top_builddir)/src/.libs
-Bindtests: Bindtests.hs Guestfs.hs
+all_targets = Bindtests Guestfs005Load Guestfs010Launch Guestfs050LVCreate
+$(all_targets): $(top_builddir)/src/libguestfs.la
+
+all: $(all_targets)
+
+Guestfs.o: Guestfs.hs
+ $(GHC) $(GHCFLAGS) -c $<
+
+Bindtests: Bindtests.hs Guestfs.o
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
-Guestfs005Load: Guestfs005Load.hs Guestfs.
hs
+Guestfs005Load: Guestfs005Load.hs Guestfs.
o
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
-Guestfs010Launch: Guestfs010Launch.hs Guestfs.
hs
+Guestfs010Launch: Guestfs010Launch.hs Guestfs.
o
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
-Guestfs050LVCreate: Guestfs050LVCreate.hs Guestfs.
hs
+Guestfs050LVCreate: Guestfs050LVCreate.hs Guestfs.
o
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
$(GHC) $(GHCFLAGS) -main-is $(shell basename $@) --make -o $@ $< -lguestfs
+CLEANFILES = $(all_targets) *~ Guestfs.o
+
endif
endif