diff options
author | Matthew Booth <mbooth@redhat.com> | 2009-11-19 16:10:01 +0000 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-11-19 16:40:22 +0000 |
commit | 8b3e75a3c78064a9dcf4952c50fe631442313743 (patch) | |
tree | 18f405f39c69fe07a7118f93c421dd44184460db /haskell | |
parent | c477e2fb78347728aaacbbc89666dcda1481a4b9 (diff) | |
download | libguestfs-8b3e75a3c78064a9dcf4952c50fe631442313743.tar.gz libguestfs-8b3e75a3c78064a9dcf4952c50fe631442313743.tar.xz libguestfs-8b3e75a3c78064a9dcf4952c50fe631442313743.zip |
build: Fix parallel build of haskell bindings
ghc isn't clever enough not to stomp on itself when building dependencies. This
change makes the 1 dependency explicit.
It also adds a dependency on src/libguestfs.la.
Diffstat (limited to 'haskell')
-rw-r--r-- | haskell/Makefile.am | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/haskell/Makefile.am b/haskell/Makefile.am index 1836a147..2524617a 100644 --- a/haskell/Makefile.am +++ b/haskell/Makefile.am @@ -25,8 +25,6 @@ generator_built = \ # therefore won't generate, the files if they haven't been created yet EXTRA_DIST = $(generator_built) *.hs run-bindtests -CLEANFILES = *~ - if HAVE_HASKELL TESTS_ENVIRONMENT = \ @@ -40,18 +38,26 @@ check_DATA = Bindtests GHCFLAGS = -I$(top_builddir)/src -L$(top_builddir)/src/.libs -all: Bindtests Guestfs005Load Guestfs010Launch Guestfs050LVCreate +all_targets = Bindtests Guestfs005Load Guestfs010Launch Guestfs050LVCreate +$(all_targets): $(top_builddir)/src/libguestfs.la + +all: $(all_targets) -Bindtests: Bindtests.hs Guestfs.hs +Guestfs.o: Guestfs.hs + $(GHC) $(GHCFLAGS) -c $< + +Bindtests: Bindtests.hs Guestfs.o $(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 -Guestfs010Launch: Guestfs010Launch.hs Guestfs.hs +Guestfs010Launch: Guestfs010Launch.hs Guestfs.o $(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 +CLEANFILES = $(all_targets) *~ Guestfs.o + endif |