summaryrefslogtreecommitdiff
path: root/source3/aparser/Makefile
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-05-12 14:35:13 +0000
committerAndrew Tridgell <tridge@samba.org>2000-05-12 14:35:13 +0000
commit5c3588c430557d091683de7b7cc6f9d9534ca397 (patch)
treedef09d40d13f78cb378cf32fae8d21188ead04a6 /source3/aparser/Makefile
parent54a447f9b862eedfe0d7d2a0fb441e3f88a52e4e (diff)
downloadsamba-5c3588c430557d091683de7b7cc6f9d9534ca397.tar.gz
samba-5c3588c430557d091683de7b7cc6f9d9534ca397.tar.bz2
samba-5c3588c430557d091683de7b7cc6f9d9534ca397.zip
this is a awk based code generator. Very primitive at the moment, but
it was sufficient to generate info level 6 of the add printer driver for spoolss It has two capabilities: 1) generate the header and C code for parsing a structure, given a *.struct file that describes the structure. Evetually I hope to make *.struct compatible with MIDL. 2) it provides a harness that can read a binary data file from prs_dump() which contains real data from a client and display the parse of it from the output of the awk parser. This allows you to "play" with the structure definition until it comes out right, it takes just a few mimutes of playing with the .struct file to work out the right layout. all this is very primitive right now. I hope next to completely replace the spoolss parser with a single .struct file that describes all the structures, and auto-generates working code. That will require quite a bit more work. (This used to be commit 7bc87d20ea47ba25851512cc6f9de6076ce1cec8)
Diffstat (limited to 'source3/aparser/Makefile')
-rw-r--r--source3/aparser/Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/aparser/Makefile b/source3/aparser/Makefile
new file mode 100644
index 0000000000..e9ff8ad010
--- /dev/null
+++ b/source3/aparser/Makefile
@@ -0,0 +1,20 @@
+CFLAGS=-Wall -g
+CC=gcc
+
+%.h : %.struct
+ awk -f parser.awk < $*.struct > $*.h
+
+OBJ = harness.o parser.o
+
+all: test.h harness
+
+test.h : test.struct
+
+harness: test.h $(OBJ)
+ $(CC) $(CFLAGS) -o harness $(OBJ)
+
+clean:
+ rm -f *.o test.h
+
+test: harness
+ ./harness test.dat > test.out