File: GNUmakefile.in

package info (click to toggle)
graphthing 1.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 856 kB
  • ctags: 700
  • sloc: cpp: 7,716; yacc: 209; sh: 206; lex: 188; makefile: 11
file content (98 lines) | stat: -rw-r--r-- 2,591 bytes parent folder | download | duplicates (4)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@SET_MAKE@

PACKAGE = graphthing
VERSION = @PACKAGE_VERSION@

SUBDIRS = src
prefix = @prefix@

DISTFILES = COPYING CREDITS FeatureLog GNUmakefile.in README TODO \
	graphthing.1.in \
	aclocal.m4 configure configure.in install-sh mkinstalldirs


all:
	@dlist='$(SUBDIRS)' ; \
	for subdir in $$dlist ; do \
		(cd $$subdir && $(MAKE) all) ; \
	done
	@echo "---------------------------------------------------"
	@echo "  GraphThing is now compiled. It can be executed"
	@echo "  by running it directly as:"
	@echo "        src/graphthing@EXEEXT@"
	@echo "  or by installing it:"
	@echo "        $(MAKE) install"
	@echo "  Installing may require superuser privileges."
	@echo ""
	@echo "  Alternatively, for Mac OSX, create an App bundle:"
	@echo "        $(MAKE) bundle"
	@echo "---------------------------------------------------"

install:
	@dlist='$(SUBDIRS)' ; \
	for subdir in $$dlist ; do \
		(cd $$subdir && $(MAKE) install) ; \
	done
	@INSTALL@ -d @mandir@/man1/
	@INSTALL@ -c -m 644 graphthing.1 @mandir@/man1/
	@echo "---------------------------------------------------"
	@echo "  GraphThing is now installed. It can be executed"
	@echo "  by running:"
	@echo "        @prefix@/bin/graphthing@EXEEXT@"
	@echo "---------------------------------------------------"

# For Mac OSX
bundle:
	@mkdir -p GraphThing.app/Contents/MacOS
	@cp src/graphthing@EXEEXT@ GraphThing.app/Contents/MacOS/GraphThing
	@ls -ld GraphThing.app

# For Win32
zipdir = $(PACKAGE)-$(VERSION)
zip:
	rm -rf $(zipdir)
	mkdir $(zipdir)
	for file in COPYING CREDITS FeatureLog README ; do \
		cat $$file | unix2dos > $(zipdir)/$$file.txt; \
	done
	cp -p src/graphthing.exe $(zipdir)
	strip $(zipdir)/graphthing.exe
	zip -9r $(zipdir)-win32.zip $(zipdir)
	rm -rf $(zipdir)

clean:
	@dlist='$(SUBDIRS)' ; \
	for subdir in $$dlist ; do \
		(cd $$subdir && $(MAKE) clean) ; \
	done

distclean:
	@dlist='$(SUBDIRS)' ; \
	for subdir in $$dlist ; do \
		(cd $$subdir && $(MAKE) distclean) ; \
	done
	rm GNUmakefile graphthing.1

dep:
	@dlist='$(SUBDIRS)' ; \
	for subdir in $$dlist ; do \
		(cd $$subdir && $(MAKE) dep) ; \
	done

distdir = $(PACKAGE)-$(VERSION)
dist:	GNUmakefile
	rm -rf $(distdir)
	mkdir $(distdir)
	chmod 777 $(distdir)
	for file in $(DISTFILES) ; do \
		ln $$file $(distdir) 2>/dev/null || \
			cp -p $$file $(distdir); \
	done
	for subdir in $(SUBDIRS) ; do \
		mkdir $(distdir)/$$subdir || exit 1; \
		chmod 777 $(distdir)/$$subdir; \
		(cd $$subdir && $(MAKE) $@) || exit 1; \
	done
	tar zchf $(distdir).tar.gz $(distdir)
	gunzip -c $(distdir).tar.gz | bzip2 -9 > $(distdir).tar.bz2
	rm -rf $(distdir)