File: Makefile

package info (click to toggle)
latex-make 2.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 576 kB
  • sloc: sh: 309; makefile: 237
file content (52 lines) | stat: -rw-r--r-- 1,140 bytes parent folder | download | duplicates (9)
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

include Makefile.config

PACKAGES=latex-make.pkg uninstall-latex-make.pkg

DISK=LaTeX-Make-rw.dmg
FINALDISK=LaTeX-Make-$(VERSION)-$(PACKAGE_SUBVER).dmg
VOLUME=LaTeX Make

SUBDIRS=$(basename $(PACKAGES))

all: $(FINALDISK)

.PHONY: distclean clean all
.PHONY: $(addsuffix -distclean,$(SUBDIRS)) $(addsuffix -clean,$(SUBDIRS))

$(addsuffix -distclean,$(SUBDIRS)): %-distclean:
	$(MAKE) -C $* distclean

$(addsuffix -clean,$(SUBDIRS)): %-clean:
	$(MAKE) -C $* clean

distclean:: clean $(addsuffix -distclean,$(SUBDIRS))

distclean::
	$(RM) -r $(FINALDISK)

clean:: $(addsuffix -clean,$(SUBDIRS))

clean::
	$(RM) $(DISK) $(PACKAGES)

$(PACKAGES): %.pkg:
	$(MAKE) -C $* $@
	ln -s $*/$@ $@

$(DISK): $(PACKAGES)
	-$(RM) $@
	hdiutil create -size 5m -fs HFS+ -volname "$(VOLUME)" $@
	hdiutil attach $@
	DEST=$$(hdiutil attach $@ | sed -e '/Apple_HFS/s/.*Apple_HFS[[:space:]]*//p;d') ; \
	cp ../COPYING "$$DEST" && \
	cp -r $(PACKAGES) "$$DEST"
	DEV=$$(hdiutil attach $@ | sed -e '1s/[[:space:]].*//p;d') ; \
	hdiutil detach $$DEV

$(FINALDISK): $(DISK)
	-$(RM) $@
	hdiutil convert $< -format UDZO -o $@
	hdiutil internet-enable -yes $@
	cp $@ ..