we need to add utils/pwd to a binary distribution
authorSimon Marlow <simonmar@microsoft.com>
Tue, 21 Aug 2007 15:12:05 +0000 (15:12 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 21 Aug 2007 15:12:05 +0000 (15:12 +0000)
aclocal.m4
utils/Makefile
utils/pwd/Makefile

index 7fd96fe..e5aed8a 100644 (file)
@@ -1099,13 +1099,15 @@ AC_MSG_CHECKING(for path to top of build tree)
 dnl This would be
 dnl     make -C utils/pwd clean && make -C utils/pwd
 dnl except we don't want to have to know what make is called. Sigh.
 dnl This would be
 dnl     make -C utils/pwd clean && make -C utils/pwd
 dnl except we don't want to have to know what make is called. Sigh.
-cd utils/pwd
-rm -f *.o
-rm -f *.hi
-rm -f pwd
-rm -f pwd.exe
-$WithGhc -v0 --make pwd -o pwd
-cd ../..
+if test ! -e utils/pwd/pwd && ! -e utils/pwd/pwd.exe; then
+  cd utils/pwd
+  rm -f *.o
+  rm -f *.hi
+  rm -f pwd
+  rm -f pwd.exe
+  $WithGhc -v0 --make pwd -o pwd
+  cd ../..
+fi
 
 hardtop=`utils/pwd/pwd forwardslash`
 
 
 hardtop=`utils/pwd/pwd forwardslash`
 
index 801769e..e679dfa 100644 (file)
@@ -3,7 +3,7 @@ include $(TOP)/mk/boilerplate.mk
 
 ifeq "$(DOING_BIN_DIST)" "YES"
 # We're doing a binary-dist, descend into a subset of the dirs.
 
 ifeq "$(DOING_BIN_DIST)" "YES"
 # We're doing a binary-dist, descend into a subset of the dirs.
-SUBDIRS = mkdirhier ghc-pkg hasktags hp2ps hsc2hs parallel prof unlit runghc hpc
+SUBDIRS = mkdirhier ghc-pkg hasktags hp2ps hsc2hs parallel prof unlit runghc hpc pwd
 else
 ifeq "$(BootingFromHc)" "YES"
 SUBDIRS = mkdependC mkdirhier runstdtest genapply genprimopcode ghc-pkg unlit
 else
 ifeq "$(BootingFromHc)" "YES"
 SUBDIRS = mkdependC mkdirhier runstdtest genapply genprimopcode ghc-pkg unlit
index 326c707..f8fea45 100644 (file)
@@ -1,18 +1,11 @@
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
 
 
-# We don't include any of the boilerplate Makefiles as we are used
-# by configure. GHC should be overridden on the command line to the
-# GHC that you want to use.
+HS_PROG=pwd
 
 
-GHC=ghc
-
-.PHONY: all clean
-
-all:
-       $(GHC) --make pwd
-
-clean:
-       rm -f *.o
-       rm -f *.hi
-       rm -f pwd
-       rm -f pwd.exe
+binary-dist:
+       $(INSTALL_DIR)                      $(BIN_DIST_DIR)/utils/pwd
+       $(INSTALL_DATA)    Makefile         $(BIN_DIST_DIR)/utils/pwd/
+       $(INSTALL_PROGRAM) pwd$(exeext)     $(BIN_DIST_DIR)/utils/pwd/
 
 
+include $(TOP)/mk/target.mk