Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3618c14

Browse files
committed
Use a common definition for $(SUBMAKE) instead of repeating everything
all over the place.
1 parent aa1afa8 commit 3618c14

1 file changed

Lines changed: 16 additions & 19 deletions

File tree

Doc/tools/sgmlconv/Makefile

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ TOOLSDIR=$(TOPDIR)/tools
1111

1212
SGMLRULES=../$(TOOLSDIR)/sgmlconv/make.rules
1313
SUBDIRS=api ext lib mac ref tut
14+
SUBMAKE=$(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR)
1415

1516
all: sgml
1617

@@ -19,45 +20,41 @@ all: sgml
1920

2021
sgml:
2122
for DIR in $(SUBDIRS) ; do \
22-
(cd $$DIR; \
23-
$(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR) sgml) || exit $$?; \
24-
done
23+
(cd $$DIR; $(SUBMAKE) sgml) || exit $$? ; done
2524

2625
xml:
2726
for DIR in $(SUBDIRS) ; do \
28-
(cd $$DIR; \
29-
$(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR) xml) || exit $$?; \
30-
done
27+
(cd $$DIR; $(SUBMAKE) xml) || exit $$? ; done
28+
29+
esis:
30+
for DIR in $(SUBDIRS) ; do \
31+
(cd $$DIR; $(SUBMAKE) esis) || exit $$? ; done
3132

3233
tarball: sgml
33-
tar cf - sgml tools/sgmlconv */*.sgml | gzip -9 >sgml-1.5.2b1.tgz
34+
tar cf - sgml tools/sgmlconv */*.sgml | gzip -9 >sgml-1.5.2b2.tgz
3435

3536
api:
36-
cd api; $(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR)
37+
cd api; $(SUBMAKE)
3738

3839
ext:
39-
cd ext; $(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR)
40+
cd ext; $(SUBMAKE)
4041

4142
lib:
42-
cd lib; $(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR)
43+
cd lib; $(SUBMAKE)
4344

4445
mac:
45-
cd mac; $(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR)
46+
cd mac; $(SUBMAKE)
4647

4748
ref:
48-
cd ref; $(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR)
49+
cd ref; $(SUBMAKE)
4950

5051
tut:
51-
cd tut; $(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR)
52+
cd tut; $(SUBMAKE)
5253

5354
clean:
5455
for DIR in $(SUBDIRS) ; do \
55-
(cd $$DIR; \
56-
$(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR) clean) \
57-
done
56+
(cd $$DIR; $(SUBMAKE) clean) ; done
5857

5958
clobber:
6059
for DIR in $(SUBDIRS) ; do \
61-
(cd $$DIR; \
62-
$(MAKE) -f $(SGMLRULES) TOOLSDIR=../$(TOOLSDIR) clobber) \
63-
done
60+
(cd $$DIR; $(SUBMAKE) clobber) ; done

0 commit comments

Comments
 (0)