]> git.lyx.org Git - features.git/blob - src/frontends/xforms/forms/makefile
more FILMagain stuff
[features.git] / src / frontends / xforms / forms / makefile
1 ###/* This file is part of
2 ###* ======================================================
3 ###*
4 ###*           LyX, the High Level Word Processor
5 ###*
6 ###*           Copyright 1995 Matthias Ettrich
7 ###*           Copyright 1995-2000 The LyX Team
8 ###*
9 ###*======================================================*/
10 ###
11 ###
12 ### Makefile by Lars Gullik Bjønnes (larsbj@ifi.uio.no)
13 ### Modified by Allan Rae <rae@lyx.org>
14 ###
15
16 SHELL = /bin/sh
17 .SUFFIXES: .fd .c
18
19 # Various commands
20 FDESIGN = fdesign
21
22 SRCS := form_copyright.fd \
23         form_preferences.fd \
24         form_print.fd
25
26
27 OBJS := $(SRCS:.fd=.c)
28
29 COBJS := $(SRCS:.fd=.C)
30
31 all:
32         @echo "This is a makefile intended for the maintainer only."
33         @echo "Only run it if you are absolutely sure about what you"
34         @echo "are doing."
35
36 c: $(OBJS)
37
38 d: c $(COBJS)
39
40
41 # -e 's/\([^ ]* \*\)\([^ ]*\)/\1 \2/'
42 #
43 # Make declarations like "void *cdata;" into "void * cdata;"
44 #
45 e: c
46         for hfil in *.h ; do \
47                 if [ -f "$$hfil.patch" ] ; then \
48                         (echo "Patching $$hfil with $$hfil.patch" ; \
49                         patch -s $$hfil < $$hfil.patch) \
50                 fi; \
51                 sed < $$hfil > $$hfil.tmp \
52                         -e 's/\(extern \)\(.*\)/\1 "C" \2/' \
53                         -e '/create_form_/d' ; \
54                 mv $$hfil.tmp $$hfil; \
55         done
56
57 updatesrc: d e
58         @echo >&2
59         @echo "Everythings been generated now.">&2
60         @echo "It's up to you to actually merge it into the respective">&2
61         @echo "implementations in the parent directory.  Most of the work">&2
62         @echo "simply involves cutting and pasting the FormXxxx::build()">&2
63         @echo "code into that forms FormXxxx.C file.  You'll also want to">&2
64         @echo "copy the FD_form... declaration from the header into the">&2
65         @echo "classes header file.">&2
66         @echo >&2
67
68 .fd.c:
69         $(FDESIGN) -convert $<
70
71 .c.C:
72         ./fdfix.sh $< $@
73
74 clean:
75         rm -f *.[hcC] *.bak
76
77 distclean: clean
78         rm -f *.orig *.rej *~
79
80 install: updatesrc
81         cp *.C *.h ..