-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile.am
78 lines (65 loc) · 2.24 KB
/
Makefile.am
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
SUBDIRS = src debian
my_images = $(shell find images -not -name .\*)
my_data = $(shell find data -not -name .\*)
my_utilities = $(shell find utilities -not -name .\*)
my_examples = $(shell find examples -not -name .\*)
bin_SCRIPTS = pyflag pyflash pyflag_launch src/pyflag/conf.py
pkgdata_DATA = $(my_data) \
data/magic.mgc data/magic.mime.mgc
pkgpython_PYTHON = src/pyflag/conf.py
nobase_pkgdata_DATA = $(my_images) $(my_utilities) $(my_examples)
man_MANS = pyflag.1
EXTRA_DIST = pyflag.in pyflash.in \
pyflag_launch.in $(nobase_pkgdata_DATA) $(pkgdata_DATA) $(man_MANS) \
src/pyflag/conf.py.in autogen.sh
# perform subs in scripts and config files
edit = sed \
-e 's,@datadir\@,$(pkgdatadir),gi' \
-e 's,@sysconfdir\@,$(sysconfdir),gi' \
-e 's,@pkgpyexec\@,$(pkgpyexecdir),gi' \
-e 's,@pkgpythondir\@,$(pkgpythondir),gi' \
-e 's,@pythondir\@,$(pythondir),gi' \
-e 's,@prefix\@,$(prefix),gi' \
-e 's,@bin\@,$(bindir),gi' \
-e 's,@VERSION\@,$(VERSION),gi' \
-e 's,@ploticus\@,@PLOTICUS@,gi' \
-e 's,@mysql\@,@MYSQL@,gi' \
-e 's,@magic\@,@magic@,gi' \
-e 's,@python\@,$(PYTHON),gi'
src/pyflag/%.py: $(top_srcdir)/src/pyflag/%.py.in Makefile
rm -f $@ [email protected]
$(edit) $< > [email protected]
chmod +x [email protected]
mv [email protected] $@
utilities/%: $(top_srcdir)/utilities/%.in Makefile
rm -f $@ [email protected]
$(edit) $< > [email protected]
chmod +x [email protected]
mv [email protected] $@
%: $(top_srcdir)/%.in Makefile
rm -f $@ [email protected]
$(edit) $< > [email protected]
chmod +x [email protected]
mv [email protected] $@
clean-local:
-rm -rf $(bin_SCRIPTS) $(sysconf_DATA)
deb-pkg:
chmod 744 debian/rules
dpkg-buildpackage -rfakeroot
data/magic.mgc: data/magic
cd data && file -C -m magic
data/magic.mime.mgc: data/magic.mime
cd data && file -C -m magic.mime
.la.pyd:
cp index.la index.pyd
# This will not be installed automatically - it will be installed
# using the install-data-hook below only if it does not already exist.
# sysconf_DATA = pyflagrc
#DEFAULT_CONFIG_FILE = $(sysconfdir)/pyflagrc
#install-data-hook: pyflagrc
# @if test -f $(DESTDIR)$(DEFAULT_CONFIG_FILE) ; then \
# echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CONFIG_FILE)" ; \
# else \
# echo "$(INSTALL_DATA) -D pyflagrc $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \
# $(INSTALL_DATA) -D pyflagrc $(DESTDIR)$(DEFAULT_CONFIG_FILE); \
# fi