rh

Check-in [9489e73bdd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Simplify Makefile, too much hair.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:9489e73bdded7399cfd8f3ef46d2e5fe18d277c18f1e65b377eec91dbfea260b
User & Date: ajv-899-334-8894@vsta.org 2016-08-10 20:59:34
Context
2016-08-10
21:01
Merge branch 'master' of https://github.com/vandys/rh check-in: f7d115da53 user: ajv-899-334-8894@vsta.org tags: master, trunk
20:59
Simplify Makefile, too much hair. check-in: 9489e73bdd user: ajv-899-334-8894@vsta.org tags: master, trunk
20:58
Bring rest of changes into git check-in: 74a2587607 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Makefile.

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
# rcsid: $Id: Makefile,v 1.4 2012/01/10 00:03:46 vandys Exp vandys $

PROGRAM = rh

CFLAGS=-O
CC=gcc

# Possible C preprocessor flags:
#	-DBSD			    BSD directory handling
#	-DSUNOS_4		    compiling on SunOS 4.1.x
#	-DPOSIX_DIRECTORY_LIBRARY   POSIX directory handling
#
# If neither -DBSD or -DPOSIX_DIRECTORY_LIBRARY is specified then System V
# directory handling will be used.
#

CPPFLAGS= -DBSD -D_FILE_OFFSET_BITS=64 -DSUNOS_4 $(DEBUG_CPPFLAGS)
CPP=gcc -E


YACC=byacc

LEX = flex
LFLAGS = $(DEBUG_LFLAGS) -s

DEPENDS = $(PROGRAM).depends

SRCS =			\
	alloc.c		\
	errmsg.c	\
	getdate.c	\
	resname.c	\
	rh.c		\
	rhcmds.c	\
	rhdata.c	\
	rhdir.c		\
	rhgram.c	\
	rhlex.c		\
	strtol.c	\
	strtoul.c	\
	sysinfo.c	\
	wildmat.c	\
	$(DEBUG_SRCS)

# strtol.o and strtoul.o can be removed from the object files list
# if they work correctly on your system
# NOTE: strtol() is broken under SunOS. It doesn't always set the
# 'end' pointer. Also, strtoul() does not exist under SunOS 4.1.x.

OBJS =			\
	alloc.o		\
	errmsg.o	\
	getdate.o	\
	resname.o	\
	rh.o		\
	rhcmds.o	\
	rhdata.o	\
	rhdir.o		\
	rhgram.o	\
	rhlex.o		\
	strtol.o	\
	strtoul.o	\
	sysinfo.o	\


	wildmat.o	\
	$(DEBUG_OBJS)

all: debug

$(PROGRAM): $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o $(PROGRAM)

insight:
	$(MAKE) DEBUG_YFLAGS=-t DEBUG_LFLAGS=-d		\
		DEBUG_SRCS=dump.c DEBUG_OBJS=dump.o	\
		DEBUG_CPPFLAGS="-DDEBUG"		\
		CC=insight $(PROGRAM)

purify: $(OBJS)
	purify -logfile=purify.out		\
	       -inuse-at-exit			\
	       -chain-length=200		\
	       -free-queue-length=1000		\
	    $(CC) $(OBJS) -o $(PROGRAM).p

tc: $(OBJS)
	proof $(CC) $(OBJS) -o $(PROGRAM).tc

debug:
	$(MAKE) DEBUG_YFLAGS=-t DEBUG_LFLAGS=-d		\
		DEBUG_SRCS=dump.c DEBUG_OBJS=dump.o	\
		DEBUG_CPPFLAGS="-DDEBUG" $(PROGRAM)

debug_p:
	$(MAKE) DEBUG_YFLAGS=-t DEBUG_LFLAGS=-d		\
		DEBUG_SRCS=dump.c DEBUG_OBJS=dump.o	\
		DEBUG_CPPFLAGS="-DDEBUG" purify

# rhgram.c rhgram.h: rhgram.y
# 	$(YACC) $(DEBUG_YFLAGS) -d -p rh_ rhgram.y
# 	mv y.tab.c rhgram.c
# 	mv y.tab.h rhgram.h
# 	# $(YACC) $(DEBUG_YFLAGS) -d -B -p rh_ rhgram.y
# 
# getdate.c: getdate.y
# 	$(YACC) $(DEBUG_YFLAGS) -p gd_ getdate.y
# 	mv y.tab.c getdate.c
# 	# $(YACC) $(DEBUG_YFLAGS) B -p gd_ getdate.y

cc_src: $(SRCS)
	#load $(CPPFLAGS) $(SRCS)
	#link

clean:
	$(RM) *.o core *~ *.output
	$(RM) purify.out .purifyversion lex.backtrack *.pure_* .pure
	$(RM) *.bak *.BAK rhgram.tab.[ch] getdate.tab.[ch]
	$(RM) -r TC.Cache rh.tc*
	$(RM) tca.map tca.log *.out *.ins.c

clobber: clean
	$(RM) rhgram.[ch] rhlex.c getdate.c
	$(RM) $(PROGRAM) $(PROGRAM).p $(PROGRAM).tc

depend: $(SRCS) dump.c
	./makedep -r -e /usr/include/ -e /usr/local/gnu/	\
		-m $(DEPENDS) -o '$(CPPFLAGS)' $(SRCS) dump.c

include $(DEPENDS)
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
|
>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>
|
<
<
<
<
|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
















1
2
3
4











































5
6
7




8
9










































































CDEFS=-DBSD -D_FILE_OFFSET_BITS=64 -DSUNOS_4 -DDEBUG
CC=gcc
CFLAGS=$(CDEFS) -O












































OBJS=alloc.o errmsg.o getdate.o resname.o rh.o rhcmds.o rhdata.o \
    rhdir.o rhgram.o rhlex.o strtol.o strtoul.o sysinfo.o \
    wildmat.o dump.o




rh: $(OBJS)
	$(CC) $(CFLAGS) -o rh $(OBJS)