This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Populate metaconfig branch.
[metaconfig.git] / U.check / Makefile.SH
CommitLineData
959f3c4c
JH
1case $CONFIG in
2'')
3 if test -f config.sh; then TOP=.;
4 elif test -f ../config.sh; then TOP=..;
5 elif test -f ../../config.sh; then TOP=../..;
6 elif test -f ../../../config.sh; then TOP=../../..;
7 elif test -f ../../../../config.sh; then TOP=../../../..;
8 else
9 echo "Can't find config.sh."; exit 1
10 fi
11 . $TOP/config.sh
12 ;;
13esac
14: This forces SH files to create target in same directory as SH file.
15: This is so that make DEPEND always knows where to find SH derivatives.
16case "$0" in
17*/*) cd `expr X$0 : 'X\(.*\)/'` ;;
18esac
19echo "Extracting Makefile (with variable substitutions)"
20: This section of the file will have variable substitutions done on it.
21: Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
22: Protect any dollar signs and backticks that you do not want interpreted
23: by putting a backslash in front. You may delete these comments.
24$spitshell >Makefile <<!GROK!THIS!
25CC = $cc
26CCFLAGS = $ccflags
27OPTIMIZE = $optimize
28CPPFLAGS = $cppflags
29MKDEP = $NONONOmkdep
30!GROK!THIS!
31
32: In the following dollars and backticks do not need the extra backslash.
33$spitshell >>Makefile <<'!NO!SUBS!'
34
35all: dummy main
36 ./dummy
37 ./main
38
39main: try1.o try2.o main.o
40 $(CC) -o main main.o try1.o try2.o
41test:
42 ./main
43clean:
44 rm -f dummy config.h core config.sh
45 rm -f try try?.o main.o main core
46
47realclean: clean
48 rm -f Wanted Obsolete check.extra check.wanted build.log
49 rm -f Makefile
50
51try1.o: try1.c config.h
52
53try2.o: try2.c config.h
54
55main.o: main.c config.h
56
57DEPEND:
58 $(MKDEP) $(CPPFLAGS) -- try1.c try2.c main.c
59!NO!SUBS!
60chmod 755 Makefile
61$eunicefix Makefile