File: Makefile

package info (click to toggle)
pdfedit 0.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 15,220 kB
  • ctags: 17,436
  • sloc: cpp: 156,708; xml: 8,973; makefile: 1,003; sh: 704; ansic: 688; perl: 669; yacc: 589; python: 236; lisp: 51
file content (109 lines) | stat: -rw-r--r-- 3,451 bytes parent folder | download
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
99
100
101
102
103
104
105
106
107
108
109
# top-level makefile for PDF editor

.PHONY: distclean clean doc-dist source install install-no all uninstall \
	uninstall-no install-gui uninstall-gui doc-dist-install \
	doc-dist-uninstall check-configure

# includes basic building rules
include Makefile.rules

# make PDF editor - source and documentation
all: check-configure source 

check-configure: configure

configure: configure.in
	@echo configure script is outdated. You should do autoconf and
	@echo rerun ./configure script 
	exit 1

# Common install target. It depends on configuration which specific 
# installation target will be used.
install:  $(INSTALL_TARGET) doc-dist-install 

install-no:
	@echo There is no installation target defined!!! You probably have
	@echo not configured PDFedit with installation target. 
	exit 1

# Installs gui part
install-gui: source 
	cd $(GUIROOT) && $(MAKE) -f Makefile.gui install

# TODO - maybe we can create install-dev target too later when we can 
# extract also some functionality from gui (e.g. scripting layer)

# Installs core development package consisting of header files and
# configuration script for 3rd party applications depending on kernel
# (non-GUI) functionality
install-core-dev: pdfedit-core-dev
	$(MKDIR) $(INSTALL_ROOT)$(INCLUDE_PATH)
	$(MKDIR) $(INSTALL_ROOT)$(LIB_PATH)
	cd $(XPDFROOT) && $(MAKE) install-dev
	cd $(UTILSROOT) && $(MAKE) install-dev
	cd $(KERNELROOT) && $(MAKE) install-dev
	cd $(OSROOT) && $(MAKE) install-dev


# Common uninstall target. It depends on configuration which specific
# uninstallation target will be used
uninstall:  $(UNINSTALL_TARGET) uninstall-gui doc-dist-uninstall

uninstall-no:
	@echo There is no uninstallation target defined!!! You probably have
	@echo not configured PDFedit with installation target so that 
	@echo uninstallation is neither evailable. 
	exit 1

# Uninstalls gui part
uninstall-gui:
	cd $(GUIROOT) && $(MAKE) -f Makefile.gui uninstall

# TODO - maybe we can create uninstall-dev target too later when we can 
# extract also some functionality from gui (e.g. scripting layer)

# Uninstalls core dev packages
# DEL_DIR here is just to be super-sure that we don't forget anything.
# In fact we should put some assert here that those directories don't
# exist because if all dedicated uninstall-devs are correct there 
# shouldn't be nothing left
uninstall-core-dev:
	cd $(XPDFROOT) && $(MAKE) uninstall-dev
	cd $(UTILSROOT) && $(MAKE) uninstall-dev
	cd $(KERNELROOT) && $(MAKE) uninstall-dev
	cd $(OSROOT) && $(MAKE) uninstall-dev
	$(DEL_DIR) $(INSTALL_ROOT)$(INCLUDE_PATH) || true
	$(DEL_DIR) $(INSTALL_ROOT)$(LIB_PATH) || true

# Target for distributed documentation. 
doc-dist:
	cd $(DOCROOT) && $(MAKE) doc_dist

# Target for distributed documentation (un)installation 
doc-dist-install: doc-dist
	cd $(DOCROOT) && $(MAKE) doc_dist_install

doc-dist-uninstall:
	cd $(DOCROOT) && $(MAKE) doc_dist_uninstall

# make application
source: 
	cd $(SRCROOT) && $(MAKE)

# make all static libraries for pdfedit-core-dev package
pdfedit-core-dev:
	cd $(SRCROOT) && $(MAKE) pdfedit-core-dev

# cleanup
clean:
	cd $(DOCROOT) && $(MAKE) clean || true
	cd $(SRCROOT) && $(MAKE) clean || true
	$(DEL_FILE) config.log

# dist cleanup
distclean:
	cd $(DOCROOT) && $(MAKE) clean || true
	cd $(SRCROOT) && $(MAKE) distclean || true
	$(DEL_FILE) config.status config.log Makefile.flags Makefile.rules|| true
	$(DEL_FILE) autom4te.cache/* || true
	$(DEL_DIR) autom4te.cache || true