]> git.lyx.org Git - features.git/blob - src/frontends/xforms/forms/makefile
Anguses patch + some modifications for smart? inset-update.
[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_citation.fd \
23         form_copyright.fd \
24         form_preferences.fd \
25         form_print.fd
26
27
28 OBJS := $(SRCS:.fd=.c)
29
30 COBJS := $(SRCS:.fd=.C)
31
32 all:
33         @echo "This is a makefile intended for the maintainer only."
34         @echo "Only run it if you are absolutely sure about what you"
35         @echo "are doing."
36
37 c: $(OBJS)
38
39 d: c $(COBJS)
40
41
42 # -e 's/\([^ ]* \*\)\([^ ]*\)/\1 \2/'
43 #
44 # Make declarations like "void *cdata;" into "void * cdata;"
45 #
46 e: c
47         for hfil in *.h ; do \
48                 if [ -f "$$hfil.patch" ] ; then \
49                         (echo "Patching $$hfil with $$hfil.patch" ; \
50                         patch -s $$hfil < $$hfil.patch) \
51                 fi; \
52                 sed < $$hfil > $$hfil.tmp \
53                         -e 's/\(extern \)\(.*\)/\1 "C" \2/' \
54                         -e '/create_form_/d' ; \
55                 mv $$hfil.tmp $$hfil; \
56         done
57
58 updatesrc: d e
59         @echo >&2
60         @echo "Everythings been generated now.">&2
61         @echo "It's up to you to actually merge it into the respective">&2
62         @echo "implementations in the parent directory.  Most of the work">&2
63         @echo "simply involves cutting and pasting the FormXxxx::build()">&2
64         @echo "code into that forms FormXxxx.C file.  You'll also want to">&2
65         @echo "copy the FD_form... declaration from the header into the">&2
66         @echo "classes header file.">&2
67         @echo >&2
68
69 .fd.c:
70         $(FDESIGN) -convert $<
71
72 .c.C:
73         ./fdfix.sh $< $@
74
75 clean:
76         rm -f *.[hcC] *.bak
77
78 distclean: clean
79         rm -f *.orig *.rej *~
80
81 install: updatesrc
82         cp *.C *.h ..