X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=forms%2Fmakefile;h=a13a6856680753f883cbf59a57a104668368af54;hb=8b52cd10224640b473ec839c2885574e1f3ac2ef;hp=85f06e9cd69a0b6b8ae83f3dddf7146784e245e0;hpb=474b65cd25930b5745dc7aca27f346cd5766ddd9;p=lyx.git diff --git a/forms/makefile b/forms/makefile index 85f06e9cd6..a13a685668 100644 --- a/forms/makefile +++ b/forms/makefile @@ -17,17 +17,11 @@ SHELL = /bin/sh # Various commands FDESIGN = fdesign -SRCS = bullet_forms.fd cite.fd credits_form.fd form1.fd \ - latexoptions.fd layout_forms.fd lyx.fd lyx_sendfax.fd math_forms.fd \ - print_form.fd sp_form.fd +SRCS = figure_form.fd print_form.fd -OBJS = bullet_forms.c cite.c credits_form.c form1.c \ - latexoptions.c layout_forms.c lyx.c lyx_sendfax.c math_forms.c \ - print_form.c sp_form.c +OBJS = figure_form.c print_form.c -COBJS = bullet_forms.C cite.C credits_form.C form1.C \ - latexoptions.C layout_forms.C lyx.C lyx_sendfax.C math_forms.C \ - print_form.C sp_form.C +COBJS = figure_form.C print_form.C all: @echo "This is a makefile intended for the maintainer only." @@ -38,16 +32,36 @@ c: $(OBJS) d: c $(COBJS) +# +# -e 's/\(extern\) \(void.*FL_OBJECT\)/\1 "C" \2/' +# +# We need the callbacks to all be declared as: extern "C" void +# +# -e 's,\(generated with fdesign\)\(.*\)\(\*\*/\),\1 \3,';\ +# +# Clean up the line with the date in it. This means we'll have fewer false +# updates (where the only thing that changed was the date). +# e: c for hfil in *.h ; do \ if [ -f "$$hfil.patch" ] ; then \ (echo "Patching $$hfil with $$hfil.patch" ; \ - patch -s $$hfil < $$hfil.patch) \ + patch $$hfil < $$hfil.patch) \ fi; \ + sed < $$hfil > $$hfil.tmp \ + -e 's/\(extern\) \(void.*FL_OBJECT\)/\1 "C" \2/' \ + -e 's,\(generated with fdesign\)\(.*\)\(\*\*/\),\1 \3,';\ + mv $$hfil.tmp $$hfil; \ done updatesrc: d e - for fil in *.C *.h ; do cp $$fil ../src ; done + @echo + @echo "Be careful with gui-indep forms. Make sure they have been">&2 + @echo "removed from the files here otherwise we'll get junk code ">&2 + @echo "and errors at compile time.">&2 + for fil in *.C *.h ; do \ + cmp -s $$fil ../src/$$fil || cp $$fil ../src ; \ + done .fd.c: $(FDESIGN) -convert $<