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