[MLton-commit] r6799

Wesley Terpstra wesley at mlton.org
Sun Aug 24 16:39:01 PDT 2008


Install will now work even if pdfs were not generated.
MinGW docs don't go into /shared

----------------------------------------------------------------------

U   mlton/trunk/Makefile

----------------------------------------------------------------------

Modified: mlton/trunk/Makefile
===================================================================
--- mlton/trunk/Makefile	2008-08-24 16:31:09 UTC (rev 6798)
+++ mlton/trunk/Makefile	2008-08-24 23:39:00 UTC (rev 6799)
@@ -362,18 +362,12 @@
 # puts them.
 DESTDIR := $(CURDIR)/install
 PREFIX := /usr
-ifeq ($(TARGET_OS), darwin)
+ifeq ($(findstring $(TARGET_OS), darwin freebsd solaris), $(TARGET_OS))
 PREFIX := /usr/local
 endif
-ifeq ($(TARGET_OS), freebsd)
-PREFIX := /usr/local
-endif
 ifeq ($(TARGET_OS), mingw)
 PREFIX := /mingw
 endif
-ifeq ($(TARGET_OS), solaris)
-PREFIX := /usr/local
-endif
 prefix := $(PREFIX)
 MAN_PREFIX_EXTRA :=
 TBIN := $(DESTDIR)$(prefix)/bin
@@ -381,7 +375,7 @@
 TLIB := $(DESTDIR)$(prefix)/$(ULIB)
 TMAN := $(DESTDIR)$(prefix)$(MAN_PREFIX_EXTRA)/man/man1
 TDOC := $(DESTDIR)$(prefix)/share/doc/mlton
-ifeq ($(TARGET_OS), solaris)
+ifeq ($(findstring $(TARGET_OS), solaris mingw), $(TARGET_OS))
 TDOC := $(DESTDIR)$(prefix)/doc/mlton
 endif
 TEXM := $(TDOC)/examples
@@ -447,7 +441,7 @@
 		$(CP) changelog examples guide license README "$(TDOC)/"	\
 	)
 	if [ -r "$(TDOC)/guide/mlton-guide.pdf" ]; then 		\
-		mv "$(TDOC)/guide/mlton-guide.pdf" "$(TDOC)/";		\
+		cp "$(TDOC)/guide/mlton-guide.pdf" "$(TDOC)/";		\
 	fi
 	(								\
 		cd "$(SRC)/util" &&					\
@@ -458,8 +452,12 @@
 		; do 							\
 		$(CP) "$(SRC)/regression/$$f.sml" "$(TEXM)/"; 		\
 	done
-	$(CP) $(LEX)/$(LEX).pdf $(TDOC)
-	$(CP) $(YACC)/$(YACC).pdf $(TDOC)
+	if test -r $(LEX)/$(LEX).pdf; then                              \
+		$(CP) $(LEX)/$(LEX).pdf $(TDOC);                        \
+	fi
+	if test -r $(YACC)/$(YACC).pdf; then                            \
+		$(CP) $(YACC)/$(YACC).pdf $(TDOC);                      \
+	fi
 	find "$(TDOC)/" -name .svn -type d | xargs rm -rf
 	find "$(TDOC)/" -name .ignore -type f | xargs rm -rf
 	find "$(TEXM)/" -name .svn -type d | xargs rm -rf




More information about the MLton-commit mailing list