summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/Makefile b/src/Makefile
index 31dd5da..52c47a6 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -21,7 +21,7 @@ PREFIX ?= /usr
DATADIR = $(PREFIX)/share/mozilla-devscripts
-mk_files = \
+subst_files = \
firefox-3.0.mk \
firefox-3.0-full.mk \
firefox-3.1.mk \
@@ -36,21 +36,29 @@ mk_files = \
xulrunner-1.9.1.mk \
xulrunner-2.0.mk \
mozclient.mk \
+ mozclient.pl \
compare.mk \
minefield-packager.mk \
$(NULL)
-extra_mk_files = \
+extra_files = \
remove.binonly.sh \
xpi.mk \
lp-locale-export.mk \
$(NULL)
-extra_mk_dirs = \
- patches \
+extra_dirs = \
+ mozclient \
+ mozclient/patches \
minefield-packager/debian \
$(NULL)
+%.pl: %.pl.in
+ cat $< | sed \
+ -e "s|^\(my \$$mozclient_dir[[:space:]]*= '\)@DATADIR@\(';.*\)|\1$(DATADIR)/\2|" \
+ > $@
+ chmod 755 $@
+
%.mk: %.mk.in
cat $< | sed \
-e "s|^\(include\) \(.*\)\.in|\1 $(DATADIR)/\2|" \
@@ -60,15 +68,15 @@ extra_mk_dirs = \
> $@
chmod 644 $@
-build: $(mk_files)
+build: $(subst_files)
-install: $(mk_files) $(extra_mk_files) $(foreach dir,$(extra_mk_dirs),$(wildcard $(dir)/*))
- install -m 755 -d $(DESTDIR)$(DATADIR) $(foreach dir,$(extra_mk_dirs),$(DESTDIR)$(DATADIR)/$(dir))
- install -m 644 $(mk_files) $(extra_mk_files) $(DESTDIR)$(DATADIR)
+install: $(subst_files) $(extra_files) $(foreach dir,$(extra_dirs),$(wildcard $(dir)/*))
+ install -m 755 -d $(DESTDIR)$(DATADIR) $(foreach dir,$(extra_dirs),$(DESTDIR)$(DATADIR)/$(dir))
+ install -m 644 $(subst_files) $(extra_files) $(DESTDIR)$(DATADIR)
chmod 755 $(DESTDIR)$(DATADIR)/*.sh
- for dir in $(extra_mk_dirs) ; do \
+ for dir in $(extra_dirs) ; do \
install -m 644 `echo $$dir/*` $(DESTDIR)$(DATADIR)/$$dir ; \
done
clean:
- rm -f $(mk_files)
+ rm -f $(subst_files)