summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorFabien Tassin <fta@sofaraway.org>2008-06-02 14:02:07 +0200
committerFabien Tassin <fta@sofaraway.org>2008-06-02 14:02:07 +0200
commit68c81fa9645d3cde57e775dae4ee28c99476ea1f (patch)
tree3d5a72c74271439f5c5a2097910cacb8c2585b2a /src/Makefile
parent3df66ad3d14674a57c881e1c7b696388276676e8 (diff)
* [mozclient] Full refactoring of mozclient. It is now written in object-oriented Perl.
The makefile version was getting difficult to extend and to maintain. We now have a base class and a set of VCS classes inheriting for it. - add src/mozclient.pl.in - add src/mozclient/${projects}.conf - move src/patches to src/mozclient/patches - update src/${projects}.mk.in - update src/Makefile - update README * [mozclient] nspr and nss are now using a dynamic tag. They used to fetch HEAD which made them tricky to distribute. Now, we take NSPR_CO_TAG and NSS_CO_TAG from mozilla/client.mk (from HEAD or from a tag) and we assign a version like nss-3.12.0.3+1.9~cvs without trailling cvs date (as it's a taggued nss), or nss-3.12.0.3+1.9 when using a taggued mozilla/client.mk - update src/mozclient.pl.in - update src/mozclient/{nspr,nss}.conf
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)