forked from texmacs/texmacs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
626 lines (518 loc) · 21.5 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
###############################################################################
# MODULE : main TeXmacs make file
# COPYRIGHT : (C) 1999-2008 Joris van der Hoeven
###############################################################################
# This software falls under the GNU general public license version 3 or later.
# It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
# in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
###############################################################################
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
libdir = @libdir@
bindir = @bindir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
tmdir = @tmdir@
tmbin = @tmbin@
tmdata = @tmdata@
verinfo = ${tmdir}/verinfo.txt
tm_devel_version = @DEVEL_VERSION@
tm_devel = @tm_devel@
tm_devel_release = @tm_devel_release@
tm_debian_name_devel = @tm_debian_name_devel@
tm_stable = @tm_stable@
tm_stable_release = @tm_stable_release@
tm_underscore_stable = @tm_underscore_stable@
tm_suffix = @CONFIG_OS_SUFFIX@
so = @CONFIG_SO@
#new path and pkg location if tmsdk is used
@REPOPATH@
@PKGPATH@
DESTDIR =
MKDIR = mkdir -p
RM = rm -f
CP = @CONFIG_CP@
MV = mv -f
LN = ln -f
CHMOD = @CONFIG_CHMOD@
GZIP = gzip -f
STRIP = @CONFIG_STRIP@
TOUCH = touch
SIGN = misc/admin/sign_update
.NOTPARALLEL:
###############################################################################
# Main makes
###############################################################################
TEXMACS: EMPTY_DIRS @MKGUILE@
if test "$(TEXMACS_DEPS)" != "no"; then \
cd src; $(MAKE) -f makefile deps; \
fi
cd src; $(MAKE) -r -f makefile link=shared
$(MAKE) -f Makefile PLUGINS
$(MAKE) -f Makefile EX_PLUGINS
$(CP) misc/scripts/fig2ps $(tmdir)/bin
$(CP) misc/scripts/texmacs $(tmdir)/bin
$(CP) misc/scripts/tm_gs $(tmdir)/bin
$(CHMOD) 755 $(tmdir)/bin/*
$(CHMOD) 755 plugins/*/bin/*
$(RM) -r $(tmdir)/plugins
$(CP) plugins $(tmdir)/
@echo ----------------------------------------------------
@echo dynamic TeXmacs has been successfully compiled
STATIC_TEXMACS: EMPTY_DIRS
if test "$(TEXMACS_DEPS)" != "no"; then \
cd src; $(MAKE) -f makefile deps; \
fi
cd src; $(MAKE) -r -f makefile link=static CFLAGS=-D__TMSTATIC__
$(MAKE) -f Makefile PLUGINS
$(MAKE) -f Makefile EX_PLUGINS
$(CP) misc/scripts/fig2ps $(tmdir)/bin
$(CP) misc/scripts/texmacs $(tmdir)/bin
$(CP) misc/scripts/tm_gs $(tmdir)/bin
$(CHMOD) 755 $(tmdir)/bin/*
$(CHMOD) 755 plugins/*/bin/*
$(RM) -r $(tmdir)/plugins
$(CP) plugins $(tmdir)/plugins
@echo ----------------------------------------------------
@echo static TeXmacs has been successfully compiled
@MKGUILE@: @GUILE_EMBEDDED_DIR@
cd @DIRGUILE@ && make -j1 && make -j1 install
DEPS: EMPTY_DIRS
cd src; $(MAKE) -f makefile deps
EMPTY_DIRS:
$(MKDIR) src/Deps
$(MKDIR) src/Objects
$(MKDIR) TeXmacs/bin
$(MKDIR) TeXmacs/lib
GLUE:
cd src; $(MAKE) -f makefile GLUE
.PHONY: TEXMACS STATIC_TEXMACS DEPS GLUE EXPERIMENTAL
deps: DEPS
install: INSTALL
uninstall: UNINSTALL
clean: CLEAN
distclean: DISTCLEAN
.PHONY: deps install uninstall clean distclean
###############################################################################
# Plugins
###############################################################################
PLUGINS_ALL := $(wildcard plugins/*)
PLUGINS_MAKEFILE := $(wildcard plugins/*/Makefile)
PLUGINS_COMPILE := $(patsubst %Makefile,%COMPILE,$(PLUGINS_MAKEFILE))
PLUGINS_CLEAN := $(patsubst %Makefile,%CLEAN,$(PLUGINS_MAKEFILE))
plugins/%/COMPILE:
$(MKDIR) plugins/$*/bin
cd plugins/$*; $(MAKE) -i -f Makefile CC="@CC@" CXX="@CXX@"
plugins/%/CLEAN:
cd plugins/$*; $(MAKE) -i -f Makefile clean
PLUGINS: $(PLUGINS_COMPILE)
CLEAN_PLUGINS: $(PLUGINS_CLEAN)
.PHONY: PLUGINS CLEAN_PLUGINS
EX_PLUGINS_PRG := $(wildcard TeXmacs/examples/plugins/*/progs)
EX_PLUGINS_BIN := $(patsubst %/progs,%/bin,$(EX_PLUGINS_PRG))
TeXmacs/examples/plugins/%/bin:
$(MKDIR) TeXmacs/examples/plugins/$*/bin
EX_PLUGINS: $(EX_PLUGINS_BIN)
$(MKDIR) TeXmacs/examples/plugins/dynlink/lib
.PHONY: EX_PLUGINS
###############################################################################
# Installing and removing TeXmacs (for system administrators)
###############################################################################
INSTALL:
$(MKDIR) $(DESTDIR)$(tmbin)
$(MKDIR) $(DESTDIR)$(tmbin)/bin
$(MKDIR) $(DESTDIR)$(tmbin)/lib
$(CP) $(tmdir)/bin/texmacs.bin $(DESTDIR)$(tmbin)/bin
$(CP) $(tmdir)/bin/tm_gs $(DESTDIR)$(tmbin)/bin
$(CP) $(tmdir)/plugins/*/bin/* $(DESTDIR)$(tmbin)/bin
$(CP) $(tmdir)/plugins/*/lib/*.$(so) \
$(DESTDIR)$(tmbin)/lib 2>/dev/null || :
$(CP) $(tmdir)/lib/*.$(so) $(DESTDIR)$(tmbin)/lib 2>/dev/null || :
$(CHMOD) 755 $(DESTDIR)$(tmbin)/bin/*
$(CHMOD) 755 $(DESTDIR)$(tmbin)/lib/*.$(so) 2>/dev/null || :
$(RM) $(DESTDIR)$(tmbin)/lib/*.a
@echo installed TeXmacs executables in $(DESTDIR)$(tmbin)
$(MKDIR) $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/LICENSE $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/doc $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/examples $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/fonts $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/langs $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/misc $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/packages $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/progs $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/styles $(DESTDIR)$(tmdata)
$(CP) $(tmdir)/texts $(DESTDIR)$(tmdata)
$(CHMOD) -R go=rX $(DESTDIR)$(tmdata)
@echo installed TeXmacs data in $(DESTDIR)$(tmdata)
$(CP) plugins $(DESTDIR)$(tmdata)
$(RM) $(DESTDIR)$(tmdata)/plugins/*/Makefile
$(RM) -r $(DESTDIR)$(tmdata)/plugins/*/src
$(RM) -r $(DESTDIR)$(tmdata)/plugins/*/bin
$(RM) -r $(DESTDIR)$(tmdata)/plugins/*/lib
@echo installed TeXmacs plugins data in $(DESTDIR)$(tmdata)/plugins
$(MKDIR) $(DESTDIR)$(datadir)/pixmaps
$(CP) $(tmdir)/misc/pixmaps/TeXmacs.xpm $(DESTDIR)$(datadir)/pixmaps
packages/linux/icons.sh install $(tmdir)/misc/images texmacs text-x-texmacs
packages/linux/mime.sh install $(tmdir)/misc/mime
$(MKDIR) $(DESTDIR)$(bindir)
$(CHMOD) 755 $(tmdir)/bin/*
$(CP) $(tmdir)/bin/fig2ps $(DESTDIR)$(bindir)
$(CP) $(tmdir)/bin/texmacs $(DESTDIR)$(bindir)
@echo installed TeXmacs startup scripts in $(DESTDIR)$(bindir)
$(MKDIR) $(DESTDIR)$(includedir)
$(CP) $(tmdir)/include/TeXmacs.h $(DESTDIR)$(includedir)
$(CHMOD) go=rX $(DESTDIR)$(includedir)/TeXmacs.h
@echo installed TeXmacs include files in $(DESTDIR)$(includedir)
$(MKDIR) $(DESTDIR)$(mandir)
$(MKDIR) $(DESTDIR)$(mandir)/man1
$(CP) misc/man/fig2ps.1 $(DESTDIR)$(mandir)/man1
$(CP) misc/man/texmacs.1 $(DESTDIR)$(mandir)/man1
$(GZIP) $(DESTDIR)$(mandir)/man1/fig2ps.1
$(GZIP) $(DESTDIR)$(mandir)/man1/texmacs.1
$(CHMOD) go=rX $(DESTDIR)$(mandir)/man1/fig2ps.1.gz
$(CHMOD) go=rX $(DESTDIR)$(mandir)/man1/texmacs.1.gz
@echo installed TeXmacs manual pages in $(DESTDIR)$(mandir)
@echo ----------------------------------------------------
@echo TeXmacs has been successfully installed
UNINSTALL:
$(RM) -r $(tmbin)
@echo removed TeXmacs executables from $(tmbin)
$(RM) -r $(tmdata)
@echo removed TeXmacs data from $(tmdata)
$(RM) $(datadir)/pixmaps/TeXmacs.xpm
packages/linux/mime.sh uninstall $(tmdir)/misc/mime
packages/linux/icons.sh uninstall $(tmdir)/misc/images texmacs text-x-texmacs
$(RM) $(includedir)/TeXmacs.h
@echo removed TeXmacs include files from $(includedir)
$(RM) $(bindir)/fig2ps
$(RM) $(bindir)/texmacs
@echo removed TeXmacs startup scripts from $(bindir)
$(RM) $(mandir)/man1/fig2ps.1.gz
$(RM) $(mandir)/man1/texmacs.1.gz
@echo removed TeXmacs manual pages from $(mandir)
@echo ----------------------------------------------------
@echo TeXmacs has been successfully removed
.PHONY: INSTALL UNINSTALL
###############################################################################
# Subtargets for the production of packages
###############################################################################
BUILD_DIR = ../distr/build/$(tm_devel)
BUILD_TGZ = ../distr/build/$(tm_devel).tar.gz
COPY_SOURCES:
$(MKDIR) ../distr
$(RM) -r ../distr/build
$(MKDIR) ../distr/build
$(MKDIR) $(BUILD_DIR)
$(CP) * $(BUILD_DIR)/.
cd $(BUILD_DIR); make ACCESS_FLAGS
cd $(BUILD_DIR); make DISTR_CLEAN
COPY_SOURCES_TGZ: COPY_SOURCES COPY_GUILE
cd ../distr/build; tar -czf $(tm_devel).tar.gz $(tm_devel)
COPY_GUILE:
GUILE_LOAD_PATH=`find @GUILE_DATA_PATH@ -type d | grep ice-9`; \
export GUILE_LOAD_PATH; \
for I in $$GUILE_LOAD_PATH ; \
do $(CP) $$I $(BUILD_DIR)/TeXmacs/progs/ ; done
$(CHMOD) -R go=rX $(BUILD_DIR)/TeXmacs/progs/ice-9
###############################################################################
# Make a source package
###############################################################################
SRC_PACKAGE_DIR = ../distr/source
SRC_PACKAGE: COPY_SOURCES
$(MV) $(BUILD_DIR) ../distr/build/$(tm_devel)-src
cd ../distr/build; tar -czf $(tm_devel)-src.tar.gz $(tm_devel)-src
$(MKDIR) $(SRC_PACKAGE_DIR)
$(MV) ../distr/build/$(tm_devel)-src.tar.gz $(SRC_PACKAGE_DIR)/.
$(RM) -r ../distr/build
.PHONY: SRC_PACKAGE
###############################################################################
# Make generic static binary packages
###############################################################################
PACKAGE: @CONFIG_PACKAGE@
BUNDLE: @CONFIG_BUNDLE@
.PHONY: PACKAGE BUNDLE
GENERIC_PACKAGE_DIR = ../distr/generic
STATIC_QT = $(tm_devel)-$(tm_suffix)
STATIC_X11 = $(tm_devel)-x11-$(tm_suffix)
GENERIC_PACKAGE: TEXMACS STRIP
$(MKDIR) $(GENERIC_PACKAGE_DIR)
-find @GUILE_DATA_PATH@ -type d -name ice-9 -exec $(CP) {} $(tmdir)/progs \; && \
$(CP) $(tmdir) $(STATIC_QT) && \
tar --exclude .svn --mode go=rX -czhf $(GENERIC_PACKAGE_DIR)/$(STATIC_QT)-@[email protected] $(STATIC_QT)
$(RM) -r $(tmdir)/progs/ice-9 $(STATIC_QT)
GENERIC_X11_PACKAGE: COPY_SOURCES COPY_GUILE
cd $(BUILD_DIR); ./configure --disable-qt --disable-pdf-renderer
cd $(BUILD_DIR); make STATIC_TEXMACS
cd $(BUILD_DIR); make ACCESS_FLAGS
$(MV) $(BUILD_DIR)/TeXmacs $(BUILD_DIR)/$(STATIC_X11)
cd $(BUILD_DIR); tar -czf $(STATIC_X11).tar.gz $(STATIC_X11)
$(MKDIR) $(GENERIC_PACKAGE_DIR)
$(MV) $(BUILD_DIR)/$(STATIC_X11).tar.gz $(GENERIC_PACKAGE_DIR)
$(RM) -r ../distr/build
.PHONY: GENERIC_PACKAGE GENERIC_X11_PACKAGE
###############################################################################
# Make a CentOs package
###############################################################################
CENTOS_PACKAGE_SRC = packages/centos
CENTOS_PACKAGE_DIR = ../distr/centos
CENTOS_PACKAGE: COPY_SOURCES_TGZ
mkdir -p $(HOME)/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
if test ! -f ~/.rpmmacros; then \
echo '%_topdir %(echo $$HOME)/rpmbuild' > ~/.rpmmacros; \
fi
$(CP) $(CENTOS_PACKAGE_SRC)/TeXmacs.spec $(HOME)/rpmbuild/SPECS/.
$(CP) $(BUILD_TGZ) $(HOME)/rpmbuild/SOURCES/.
cd $(HOME); rpmbuild -ba rpmbuild/SPECS/TeXmacs.spec
$(MV) $(HOME)/rpmbuild/RPMS/*/TeXmacs* $(CENTOS_PACKAGE_DIR)
$(MV) $(HOME)/rpmbuild/SRPMS/TeXmacs* $(CENTOS_PACKAGE_DIR)
$(RM) -r ../distr/build
.PHONY: CENTOS_PACKAGE
###############################################################################
# Make a Debian package
###############################################################################
DEBIAN_PACKAGE_SRC = packages/debian
DEBIAN_PACKAGE_DIR = ../distr/debian
DEBIAN_PACKAGE: COPY_SOURCES_TGZ
$(CP) $(BUILD_TGZ) ../distr/build/$(tm_debian_name_devel).orig.tar.gz
$(MKDIR) $(BUILD_DIR)/debian ;
$(CP) $(DEBIAN_PACKAGE_SRC)/* $(BUILD_DIR)/debian
cd $(BUILD_DIR) && dh_shlibdeps;debuild -us -uc
cd $(CURDIR)
$(MKDIR) $(DEBIAN_PACKAGE_DIR)
$(MV) ../distr/build/*.deb $(DEBIAN_PACKAGE_DIR)
$(RM) -fr ../distr/build
.PHONY: DEBIAN_PACKAGE
###############################################################################
# Make a Fedora package
###############################################################################
FEDORA_PACKAGE_SRC = packages/fedora
FEDORA_PACKAGE_DIR = ../distr/fedora
FEDORA_PACKAGE: COPY_SOURCES_TGZ
rpmdev-setuptree;
$(CP) $(FEDORA_PACKAGE_SRC)/TeXmacs.spec $(HOME)/rpmbuild/SPECS/.
$(CP) $(BUILD_TGZ) $(HOME)/rpmbuild/SOURCES/.
cd $(HOME); rpmbuild -ba rpmbuild/SPECS/TeXmacs.spec
$(MV) $(HOME)/rpmbuild/RPMS/*/TeXmacs* $(FEDORA_PACKAGE_DIR)
$(MV) $(HOME)/rpmbuild/SRPMS/TeXmacs* $(FEDORA_PACKAGE_DIR)
$(RM) -r ../distr/build
.PHONY: FEDORA_PACKAGE
###############################################################################
# Make a Mandriva package
###############################################################################
MANDRIVA_PACKAGE_SRC = packages/mandriva
MANDRIVA_PACKAGE_DIR = ../distr/mandriva
MANDRIVA_PACKAGE: COPY_SOURCES_TGZ
mkdir -p $(HOME)/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
if test ! -f ~/.rpmmacros; then \
echo '%_topdir %(echo $$HOME)/rpmbuild' > ~/.rpmmacros; \
fi
$(CP) $(MANDRIVA_PACKAGE_SRC)/TeXmacs.spec $(HOME)/rpmbuild/SPECS/.
$(CP) $(BUILD_TGZ) $(HOME)/rpmbuild/SOURCES/.
cd $(HOME); rpmbuild -ba rpmbuild/SPECS/TeXmacs.spec
$(MV) $(HOME)/rpmbuild/RPMS/*/TeXmacs* $(MANDRIVA_PACKAGE_DIR)
$(MV) $(HOME)/rpmbuild/SRPMS/TeXmacs* $(MANDRIVA_PACKAGE_DIR)
$(RM) -r ../distr/build
.PHONY: MANDRIVA_PACKAGE
###############################################################################
# Make a RedHat package
###############################################################################
REDHAT_PACKAGE_SRC = packages/redhat
REDHAT_PACKAGE_DIR = ../distr/redhat
REDHAT_PACKAGE: COPY_SOURCES_TGZ
mkdir -p $(HOME)/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
if test ! -f ~/.rpmmacros; then \
echo '%_topdir %(echo $$HOME)/rpmbuild' > ~/.rpmmacros; \
fi
$(CP) $(REDHAT_PACKAGE_SRC)/TeXmacs.spec $(HOME)/rpmbuild/SPECS/.
$(CP) $(BUILD_TGZ) $(HOME)/rpmbuild/SOURCES/.
cd $(HOME); rpmbuild -ba rpmbuild/SPECS/TeXmacs.spec
$(MKDIR) $(REDHAT_PACKAGE_DIR)
$(MV) $(HOME)/rpmbuild/RPMS/*/TeXmacs* $(REDHAT_PACKAGE_DIR)
$(MV) $(HOME)/rpmbuild/SRPMS/TeXmacs* $(REDHAT_PACKAGE_DIR)
$(RM) -r ../distr/build
.PHONY: REDHAT_PACKAGE
###############################################################################
# Make a Ubuntu package
###############################################################################
UBUNTU_PACKAGE_SRC = packages/debian
UBUNTU_PACKAGE_DIR = ../distr/ubuntu
UBUNTU_PACKAGE: COPY_SOURCES_TGZ
$(CP) $(BUILD_TGZ) ../distr/build/$(tm_debian_name_devel).orig.tar.gz
$(MKDIR) $(BUILD_DIR)/debian ;
$(CP) $(UBUNTU_PACKAGE_SRC)/* $(BUILD_DIR)/debian
cd $(BUILD_DIR); debuild -us -uc
$(CP) ../distr/build/*.deb $(UBUNTU_PACKAGE_DIR)
$(RM) -r ../distr/build
.PHONY: UBUNTU_PACKAGE
###############################################################################
# Make Mac OS X bundles and diskimages
###############################################################################
QT_FRAMEWORKS_PATH = @QT_FRAMEWORKS_PATH@
QT_PLUGINS_PATH = @QT_PLUGINS_PATH@
QT_PLUGINS_LIST = @QT_PLUGINS_LIST@
SPARKLE_FRAMEWORK_PATH = @SPARKLE_FRAMEWORK_PATH@
MACOS_PACKAGE_SRC = packages/macos
MACOS_PACKAGE_DIR = ../distr/macos
MACOS_PACKAGE_APP := $$(pwd)/../distr/TeXmacs.app
MACOS_PACKAGE_DMG = ../distr/$(tm_devel)@REVISION@@[email protected]
MACOS_PACKAGE_ZIP = ../distr/$(tm_devel).zip
MACOS_PACKAGE_CONTENTS = $(MACOS_PACKAGE_APP)/Contents
MACOS_PACKAGE_RESOURCES = $(MACOS_PACKAGE_CONTENTS)/Resources
MACOS_PACKAGE_TEXMACS = $(MACOS_PACKAGE_RESOURCES)/share/TeXmacs
MACOS_BUNDLE: TEXMACS
$(MKDIR) ../distr
$(RM) -r $(MACOS_PACKAGE_APP)
$(MKDIR) $(MACOS_PACKAGE_APP) $(MACOS_PACKAGE_CONTENTS) $(MACOS_PACKAGE_RESOURCES)
$(MKDIR) $(MACOS_PACKAGE_CONTENTS)/Frameworks $(MACOS_PACKAGE_CONTENTS)/Plugins \
$(MACOS_PACKAGE_CONTENTS)/MacOS
$(MKDIR) $(MACOS_PACKAGE_RESOURCES)/bin $(MACOS_PACKAGE_RESOURCES)/lib \
$(MACOS_PACKAGE_RESOURCES)/share
$(CP) $(MACOS_PACKAGE_SRC)/Info.plist $(MACOS_PACKAGE_CONTENTS)
$(CP) $(MACOS_PACKAGE_SRC)/PkgInfo $(MACOS_PACKAGE_CONTENTS)
$(CP) TeXmacs/bin/texmacs.bin $(MACOS_PACKAGE_CONTENTS)/MacOS/TeXmacs
$(CP) $(MACOS_PACKAGE_SRC)/TeXmacs.icns $(MACOS_PACKAGE_RESOURCES)
$(CP) $(MACOS_PACKAGE_SRC)/TeXmacs-document.icns \
$(MACOS_PACKAGE_RESOURCES)
$(CP) src/Plugins/Cocoa/English.lproj $(MACOS_PACKAGE_RESOURCES)
$(CP) misc/admin/texmacs_updates_dsa_pub.pem $(MACOS_PACKAGE_RESOURCES)
$(CP) TeXmacs $(MACOS_PACKAGE_RESOURCES)/share
$(RM) $(MACOS_PACKAGE_TEXMACS)/bin/texmacs.bin
if test -n "@GS_EXE@";then $(CP) @GS_EXE@ $(MACOS_PACKAGE_TEXMACS)/bin/;fi
find @GUILE_DATA_PATH@ -type d -name ice-9 -exec $(CP) {} $(MACOS_PACKAGE_TEXMACS)/progs/ \;
$(CHMOD) -R go=rX $(MACOS_PACKAGE_TEXMACS)/progs/ice-9
find -d $(MACOS_PACKAGE_TEXMACS) -name .svn -exec rm -rf {} \;
@echo Deploying libraries into application bundle.
QT_PLUGINS_PATH="$(QT_PLUGINS_PATH)" QT_PLUGINS_LIST="$(QT_PLUGINS_LIST)" \
QT_FRAMEWORKS_PATH="$(QT_FRAMEWORKS_PATH)" \
$(MACOS_PACKAGE_SRC)/bundle-libs.sh $(MACOS_PACKAGE_CONTENTS)/MacOS/TeXmacs
@echo ----------------------------------------------------
@echo TeXmacs has been bundled in $(MACOS_PACKAGE_APP)
@if test -n "@SIGNID@";then \
codesign --timestamp --deep -s @SIGNID@ $(MACOS_PACKAGE_APP) &&\
echo "Bundle successfully signed" || echo "Signing failed"; fi
MACOS_PACKAGE: MACOS_BUNDLE
$(RM) $(MACOS_PACKAGE_DMG)
hdiutil create -srcfolder $(MACOS_PACKAGE_APP) $(MACOS_PACKAGE_DMG)
$(MKDIR) $(MACOS_PACKAGE_DIR)
$(MV) $(MACOS_PACKAGE_DMG) $(MACOS_PACKAGE_DIR)
$(RM) -r $(MACOS_PACKAGE_APP)
MACOS_RELEASE: MACOS_BUNDLE
$(RM) $(MACOS_PACKAGE_ZIP)
(cd ../distr; zip -r9Tq $(tm_devel).zip $MACOS_PACKAGE_APP)
$(SIGN) $(MACOS_PACKAGE_ZIP) @SVNREV@ $(tm_devel_version)
.PHONY: MACOS_BUNDLE MACOS_PACKAGE MACOS_RELEASE
###############################################################################
# Make a Windows installer
###############################################################################
WINSPARKLE_DLL = @WINSPARKLE_DLL@
WINSPARKLE_PATH = @WINSPARKLE_PATH@
WINDOWS_PACKAGE_SRC = packages/windows
WINDOWS_PACKAGE_DIR = ../distr/windows
WINDOWS_BUILD_DIR = ../distr/TeXmacs-Windows
WINDOWS_BUILD_BIN_DIR = $(WINDOWS_BUILD_DIR)/bin
UN_QT_P = $(shell cygpath -u $(QT_PLUGINS_PATH))
WINDOWS_PBD: TEXMACS
if [test -n "@CV2PDB@"]; then @CV2PDB@ $(WINDOWS_BUILD_BIN_DIR)/texmacs.exe; fi
WINDOWS_BUNDLE: TEXMACS WINDOWS_PBD
$(MKDIR) ../distr
$(MKDIR) $(WINDOWS_BUILD_DIR)
$(RM) -r $(WINDOWS_BUILD_BIN_DIR)/{texmacs,texmacs.bin,texmacs.exe}
$(CP) -u TeXmacs/* $(WINDOWS_BUILD_DIR)/.
$(RM) $(WINDOWS_BUILD_BIN_DIR)/texmacs
$(MV) $(WINDOWS_BUILD_BIN_DIR)/texmacs.bin $(WINDOWS_BUILD_BIN_DIR)/texmacs.exe
if test -n "@SIGNID@"; then @SIGNID@ $(WINDOWS_BUILD_BIN_DIR)/texmacs.exe; fi
if test "@XTRA_CMD@" != @'XTRA_CMD'@; then $(CP) -u "@XTRA_CMD@/"* $(WINDOWS_BUILD_BIN_DIR)/; fi
if test "@ASPELL_CMD@" != @'ASPELL_CMD'@; then $(CP) -u "@ASPELL_CMD@" $(WINDOWS_BUILD_DIR)/plugins; fi
if test -x "@GS_EXE@"; then $(CP) @GS_EXE@ $(WINDOWS_BUILD_BIN_DIR)/;fi
for f in $(WINDOWS_BUILD_BIN_DIR)/*.exe;do $(WINDOWS_PACKAGE_SRC)/copydll.sh $$f;done
$(CP) misc/admin/texmacs_updates_dsa_pub.pem $(WINDOWS_BUILD_DIR)/bin
find @GUILE_DATA_PATH@ -type d -name ice-9 -exec $(CP) {} $(WINDOWS_BUILD_DIR)/progs/ \;
if test -d "$(QT_PLUGINS_PATH)";then $(CP) -u $$(cygpath -u $(QT_PLUGINS_PATH)/*) $(WINDOWS_BUILD_BIN_DIR);fi
WINDOWS_PACKAGE: WINDOWS_BUNDLE
$(MKDIR) $(WINDOWS_PACKAGE_DIR)
iscc $(WINDOWS_PACKAGE_SRC)/TeXmacs.iss
if test -n "@SIGNID@"; then @SIGNID@ $(WINDOWS_PACKAGE_DIR)/*-installer.exe; fi
.PHONY: WINDOWS_BUNDLE WINDOWS_PACKAGE
###############################################################################
# Cleaning and backups
###############################################################################
RDISTR:
-$(RM) $(tmdir)/TEX_PATHS
find . -name '*~' -o -name core -delete
-$(RM) $(tmdir)/lib/*.a
-$(RM) $(tmdir)/fonts/error/* 2>/dev/null
-$(RM) -r autom*.cache
DISTR: RDISTR
cd src; $(MAKE) -f makefile DISTR
RCLEAN: RDISTR
$(RM) $(tmdir)/examples/plugins/bin/* 2>/dev/null || :
$(RM) -r $(tmdir)/plugins
$(RM) $(tmdir)/lib/* 2>/dev/null || :
$(RM) $(tmdir)/bin/* 2>/dev/null || :
$(RM) -r $(tmdir)/misc/images/.xvpics
$(RM) -r $(tmdir)/progs/ice-9
$(RM) -r X11
SCLEAN:
cd src; $(MAKE) -f makefile CLEAN
CLEAN: SCLEAN RCLEAN CLEAN_PLUGINS
DISTCLEAN: CLEAN @CLNGUILE@
$(RM) src/Objects/* 2>/dev/null || :
$(RM) misc/doxygen/Doxyfile
$(RM) misc/man/texmacs.1
$(RM) misc/scripts/fig2ps
$(RM) misc/scripts/texmacs
$(RM) src/System/config.h
$(RM) src/System/tm_configure.hpp
$(RM) src/makefile
$(RM) TeXmacs/examples/plugins/dynlink/Makefile
$(RM) config.cache config.log config.status
$(RM) Makefile ${verinfo} misc/admin/appcast.xml
$(RM) -r $(WINDOWS_BUILD_DIR)
SVN_CLEAN:
$(RM) -r .svn
$(RM) -r */.svn
$(RM) -r */*/.svn
$(RM) -r */*/*/.svn
$(RM) -r */*/*/*/.svn
$(RM) -r */*/*/*/*/.svn
$(RM) -r */*/*/*/*/*/.svn
$(RM) -r */*/*/*/*/*/*/.svn
$(RM) -r */*/*/*/*/*/*/*/.svn
DISTR_CLEAN: DISTCLEAN SVN_CLEAN
.PHONY: CLEAN_DOC RDISTR DISTR RCLEAN SCLEAN DISTCLEAN SVN_CLEAN DISTR_CLEAN
CLNGUILE:
-cd @DIRGUILE@ && make uninstall
-cd @DIRGUILE@ && make distclean
-cd @DIRGUILE@ && rm -rf build
###############################################################################
# Miscellaneous targets
###############################################################################
TOUCH:
$(TOUCH) */*.make
$(TOUCH) */*/*.hpp
$(TOUCH) */*/*/*.hpp
$(TOUCH) */*.cpp
$(TOUCH) */*/*.cpp
$(TOUCH) */*/*/*.cpp
$(TOUCH) */*/*/*/*.cpp
STRIP:
$(STRIP) $(tmdir)/bin/texmacs.bin
$(STRIP) $(tmdir)/lib/*.$(so) 2>/dev/null || >/dev/null
$(STRIP) $(tmdir)/plugins/*/bin/* 2>/dev/null || >/dev/null
ACCESS_FLAGS:
$(MKDIR) -p $(tmdir)/bin
$(MKDIR) -p $(tmdir)/lib
$(CHMOD) -R go+rX *
$(CHMOD) -R go+x $(tmdir)/bin
$(CHMOD) -R go+x $(tmdir)/lib
VERINFO:
@{ date; uname -srvn ; printf "\nRevision $SVNREV@ "; \
egrep '\$$.+configure' config.log; \
gcc --version; \
svn -v st | misc/admin/verinfo.sh; \
printf "\n**** DIFF ****\n\n"; \
svn diff; }> ${verinfo}
.PHONY: TOUCH STRIP ACCESS_FLAGS