File: Makefile.in

package info (click to toggle)
ocaml-magic 0.7.3-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, squeeze, stretch, wheezy
  • size: 312 kB
  • ctags: 79
  • sloc: ansic: 219; ml: 120; makefile: 101; sh: 3
file content (65 lines) | stat: -rw-r--r-- 1,767 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# $Id: Makefile.in,v 1.7 2008/03/23 21:11:33 chris_77 Exp $

PKG_NAME := ocaml-magic
DISTFILES := ChangeLog INSTALL LICENSE README \
	bootstrap configure.ac configure Makefile.in OCamlMakefile \
	src/*.ml src/*.mli src/*.c src/Makefile.in src/META.in \
	examples/*.ml examples/Makefile.in
VERSION = @VERSION@
PKG_TARBALL = $(PKG_NAME)-$(VERSION).tar.gz

# Web site locally and on sourceforge:
SRC_WEB		= web
SF_WEB		= /home/groups/o/oc/ocaml-magic/htdocs

.PHONY: all byte opt install uninstall examples
all byte opt install uninstall:
	$(MAKE) -C src $@

examples: all
	$(MAKE) -C examples all

distclean: clean
	$(MAKE) -C examples clean


.PHONY: dist doc
doc:
	$(MAKE) -C src htdoc
	mkdir -p doc
	$(RM) -r doc/html
	mv src/doc/magic/html doc
	$(RM) -r src/doc

dist:
	-$(RM) -r $(PKG_NAME)-$(VERSION)
	mkdir $(PKG_NAME)-$(VERSION)
	cp -r --preserve --parents $(DISTFILES) $(PKG_NAME)-$(VERSION)
	tar zcvf $(PKG_TARBALL) $(PKG_NAME)-$(VERSION)
	$(RM) -rf $(PKG_NAME)-$(VERSION)

# Release a Sourceforge tarball and publish the HTML doc 
.PHONY: web upload
web: doc
	@if [ -d doc ] ; then \
	  scp -r doc/ shell.sf.net:$(SF_WEB)/ \
	  && echo "--- Published documentation on SF" ; \
	fi
	@ if [ -d $(SRC_WEB)/ ] ; then \
	  scp $(SRC_WEB)/*.html $(SRC_WEB)/*.jpg LICENSE \
	    shell.sf.net:$(SF_WEB) \
	  && echo "--- Published web site (in $(SRC_WEB)/) on SF" ; \
	fi

upload: dist
	@ if [ -z "$(PKG_TARBALL)" ]; then \
		echo "PKG_TARBALL not defined"; exit 1; fi
	echo -e "bin\ncd incoming\nput $(PKG_TARBALL)" \
	  | ncftp -p chris_77@users.sf.net upload.sourceforge.net \
	  && echo "--- Uploaded $(PKG_TARBALL) to SF"

clean::
	$(RM) *~ config.log config.status $(PKG_TARBALL) 
	$(RM) -r autom4te.cache/ doc/
	$(MAKE) -C src clean
	$(MAKE) -C examples clean