Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 #
2 # This Source Code Form is subject to the terms of the Mozilla Public
3 # License, v. 2.0. If a copy of the MPL was not distributed with this
4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 SHELL = /bin/sh
7 .SUFFIXES:
8 .SUFFIXES: .c .o .h .in .a .so
10 srcdir = @srcdir@
11 VPATH = @srcdir@
12 prefix = @prefix@
13 exec_prefix = @exec_prefix@
14 includedir = @includedir@
15 bindir = @bindir@
16 @SET_MAKE@
17 INSTALL = @INSTALL@
18 RANLIB = @RANLIB@
19 AR = @AR@
20 CC = @CC@
21 LD = @LD@
22 RM = @RM@
23 TAR = @TAR@
25 CPPFLAGS = @CPPFLAGS@
26 CFLAGS = @CFLAGS@
27 LDFLAGS = @LDFLAGS@
28 LIBS = @LIBS@
30 INSTALL_PROGRAM = $(INSTALL) -m 0500
32 all:: program
34 # Standard Netscape/Mozilla targets:
35 # import import_xp export private_export libs program install all clobber
36 # clobber_all release release_xp alltags
38 # Standard GNU targets:
39 # all install uninstall install-strip clean distclean mostlyclean
40 # maintainer-clean TAGS info dvi dist check installcheck installdirs
42 # === The actual targets and the real commands that make them ===
43 program:: trivial
45 trivial: trivial.c config.h Makefile
46 $(CC) -I. -I${srcdir} $(CFLAGS) $(CPPFLAGS) $< -o $@ $(LDFLAGS) $(LIBS)
48 # Now, various standard targets, some that do stuff, some that are no-ops
50 import::
52 export:: install
54 private_export::
56 program::
58 clobber:: clean
60 clobber_all:: maintainer-clean
62 alltags:: TAGS
64 RESULTS = \
65 $(DESTDIR)$(bindir)/trivial \
66 $(NULL)
68 install:: $(RESULTS)
70 $(DESTDIR)$(bindir)/trivial: trivial
71 $(INSTALL_PROGRAM) trivial $(DESTDIR)$(bindir)/trivial
73 # "rm -f" with no arguments bites on some platforms.
74 # There should be an autoconf check and maybe a more
75 # general $(FORCEDREMOVE) command
77 uninstall::
78 $(RM) -f $(RESULTS)
80 install-strip::
81 $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s ' install
83 clean::
84 $(RM) -f *~ core trivial.o trivial
86 distclean:: clean
87 $(RM) -f Makefile config.cache config.h config.log config.status stamp-h stamp-h.in
89 mostlyclean:: clean
91 maintainer-clean:: distclean
92 $(RM) -f TAGS trivial*.tar.gz
94 TAGS::
96 DISTFILES = \
97 .cvsignore \
98 README.txt \
99 Makefile.in \
100 acconfig.h \
101 config.h.in \
102 configure \
103 configure.in \
104 install-sh \
105 trivial.c \
106 $(NULL)
108 dist:: trivial.tar.gz
110 # There must be an easier and more portable way of doing this..
111 trivial.tar.gz: $(DISTFILES)
112 echo $(DISTFILES) | tr ' ' '\n' | sed "s^.*^`( cd ${srcdir}; pwd ) | xargs basename`/&^" | xargs tar czf $@ -C ${srcdir}/..
114 # other "standard" but irrelevant targets
115 info::
117 dvi::
119 check::
121 installcheck::
123 installdirs::
125 # Include dependancies
128 # autoheader might not change config.h.in, so touch a stamp file
129 ${srcdir}/config.h.in: stamp-h.in
130 ${srcdir}/stamp-h.in: configure.in acconfig.h
131 cd ${srcdir} && autoheader
132 echo timestamp > ${srcdir}/stamp-h.in
134 # Remake the configuration
135 ${srcdir}/configure: configure.in
136 cd ${srcdir} && autoconf
138 config.h: stamp-h
139 stamp-h: config.h.in config.status
140 ./config.status
142 Makefile: Makefile.in config.status
143 ./config.status
145 config.status: configure
146 ./config.status --recheck