summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2009-06-21 19:33:35 +0000
committerSimon Howard2009-06-21 19:33:35 +0000
commit8777a9672ecaf308d974a9c36f6edab6ee65bf4b (patch)
treedf3012e2d1d6d2874f567485903ec0c360027713
parent4981903f7c4f6d1e7dba74782afe1624ecb95685 (diff)
downloadchocolate-doom-8777a9672ecaf308d974a9c36f6edab6ee65bf4b.tar.gz
chocolate-doom-8777a9672ecaf308d974a9c36f6edab6ee65bf4b.tar.bz2
chocolate-doom-8777a9672ecaf308d974a9c36f6edab6ee65bf4b.zip
Add Makefile for building CAB files, dependency calculation.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1607
-rw-r--r--configure.in1
-rw-r--r--pkg/wince/.gitignore3
-rw-r--r--pkg/wince/Makefile.am10
-rwxr-xr-xpkg/wince/wince-cabgen19
4 files changed, 30 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index 5a1dfab2..4b29cee5 100644
--- a/configure.in
+++ b/configure.in
@@ -107,6 +107,7 @@ setup/Makefile
man/Makefile
src/Makefile
pcsound/Makefile
+pkg/wince/Makefile
src/resource.rc
src/doom-screensaver.desktop
setup/setup-res.rc
diff --git a/pkg/wince/.gitignore b/pkg/wince/.gitignore
new file mode 100644
index 00000000..285c4716
--- /dev/null
+++ b/pkg/wince/.gitignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+*.cab
diff --git a/pkg/wince/Makefile.am b/pkg/wince/Makefile.am
new file mode 100644
index 00000000..13b48d2e
--- /dev/null
+++ b/pkg/wince/Makefile.am
@@ -0,0 +1,10 @@
+
+DEPS=$(shell ./wince-cabgen -d $(CONFIG_FILE))
+CONFIG_FILE=wince-cab.cfg
+OUTPUT_FILE=@PACKAGE_TARNAME@-@PACKAGE_VERSION@.cab
+
+noinst_DATA = $(OUTPUT_FILE)
+
+$(OUTPUT_FILE) : $(CONFIG_FILE) $(DEPS)
+ ./wince-cabgen $< $@
+
diff --git a/pkg/wince/wince-cabgen b/pkg/wince/wince-cabgen
index e8820d8c..97cba132 100755
--- a/pkg/wince/wince-cabgen
+++ b/pkg/wince/wince-cabgen
@@ -648,12 +648,25 @@ def read_config_file(filename):
return result
+# List the files that the output CAB depends on.
+
+def print_dependencies(filename):
+ config = read_config_file(filename)
+
+ files_list = config["files"]
+
+ for dest, source_file in files_list.items():
+ print source_file
+
if len(sys.argv) < 3:
print "Usage: %s <config file> <output file>" % sys.argv[0]
sys.exit(0)
-config = read_config_file(sys.argv[1])
+if sys.argv[1] == "-d":
+ print_dependencies(sys.argv[2])
+else:
+ config = read_config_file(sys.argv[1])
-cab_file = CabFile(config)
-cab_file.write(sys.argv[2])
+ cab_file = CabFile(config)
+ cab_file.write(sys.argv[2])