Makefile 1.12 KB
Newer Older
1
2
# Code to see if ~/.gdbinit already exists

3
4
project=cobcd.py

5
prefix ?=/usr/local
6

7
8
AUTO_LOAD_FOUND := $(shell grep -s -e "^[ \t]*set auto-load safe-path /" ~/.gdbinit | wc -l)
AUTO_SCRIPTS_FOUND := $(shell grep -s -e "^[ \t]*set auto-load python-scripts on" ~/.gdbinit | wc -l)
9
10

.PHONY: all
11
12
13
all : cobcd.py

cobcd.py : ../include/version.h
14
## Make sure the VERSION text in cobcd.py is up-to-date
15
	../bin/version-replace.sh $@ $^
16
17
18

.PHONY: pregit
pregit:
19
	dos2unix cobcd.py
20
21
22
	dos2unix Makefile
	dos2unix .gitignore

23
#
24
# As of this writing, cobcd.py is being embedded into the COBOL executables.
25
26
27
# By default, gdb doesn't put the current working directory onto the list 
# of safe auto-load directories.  There is a default safe directory, but that
# directory isn't on the search path.  So, one way or the other, the user's 
28
# .gdbinit file has to be modified.	 I personally have chosen to defeat the default 
29
30
# security setting to allow auto-load from anywhere.
#
31
32
.PHONY : install
install :
33
34
	mkdir -p $(DESTDIR)$(prefix)/bin/
	install $(project) $(DESTDIR)$(prefix)/bin/
35

36
37
.PHONY : uninstall
uninstall :
38
	rm -f $(DESTDIR)$(prefix)/bin/$(project)