]> git.lyx.org Git - lyx.git/blob - forms/makefile
FILMagain changes (will need some work)
[lyx.git] / forms / makefile
1 ###/* This file is part of
2 ###* ======================================================
3 ###*
4 ###*           LyX, the High Level Word Processor
5 ###*
6 ###*           Copyright (C) 1995-99 The LyX Team
7 ###*
8 ###*======================================================*/
9 ###
10 ###
11 ### Makefile by Lars Gullik Bjønnes (larsbj@ifi.uio.no)
12 ###  
13
14 SHELL = /bin/sh
15 .SUFFIXES: .fd .c
16
17 # Various commands
18 FDESIGN = fdesign
19
20 SRCS = bullet_forms.fd cite.fd credits_form.fd form1.fd \
21         latexoptions.fd layout_forms.fd lyx.fd lyx_sendfax.fd math_forms.fd \
22         print_form.fd sp_form.fd
23
24 OBJS = bullet_forms.c cite.c credits_form.c form1.c \
25         latexoptions.c layout_forms.c lyx.c lyx_sendfax.c math_forms.c \
26         print_form.c sp_form.c
27
28 COBJS = bullet_forms.C cite.C credits_form.C form1.C \
29         latexoptions.C layout_forms.C lyx.C lyx_sendfax.C math_forms.C \
30         print_form.C sp_form.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/\(extern\) \(void.*FL_OBJECT\)/\1 "C" \2/'
43 #
44 # We need the callbacks to all be declared as:  extern "C" void
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\) \(void.*FL_OBJECT\)/\1 "C" \2/' ; \
54                 mv $$hfil.tmp $$hfil; \
55         done
56
57 updatesrc: d e
58         @echo
59         @echo "Beware some files may be installed in the wrong directory!" >&2
60         @echo "In particular be careful with gui-indep forms.  Make sure">&2
61         @echo "they have been removed from the files here otherwise we'll">&2
62         @echo "get junk code and errors at compile time.">&2
63         for fil in *.C *.h ; do \
64                 if [ $$fil = "math_forms.C" -o $$fil = "math_forms.h" ]; then \
65                         cp $$fil ../src/mathed ; \
66                 else \
67                         cp $$fil ../src ; \
68                 fi \
69         done
70
71 .fd.c:
72         $(FDESIGN) -convert $<
73
74 .c.C:
75         ./fdfix.sh $< $@
76
77 clean:
78         rm -f *.[hcC] *.bak
79
80 distclean: clean
81         rm -f *.orig *.rej *~