Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 157 lines (123 sloc) 3.405 kb
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
1 # rpg makefile
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
2 .POSIX:
3
b7b3db5 @rtomayko get a Makefile going
authored
4 # Default make target
5 all::
6
8e72220 @rtomayko configure and `make install' basically work but need love
authored
7 include config.mk
8
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
9 NAME = rpg
b7b3db5 @rtomayko get a Makefile going
authored
10 TARNAME = $(NAME)
11 SHELL = /bin/sh
12
472b1e5 @rtomayko first crack at fast version solver in C
authored
13 CFLAGS = -Wall -pedantic
b7b3db5 @rtomayko get a Makefile going
authored
14
15 # ---- END OF CONFIGURATION ----
16
17 all:: build
18
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
19 DOCHTML = \
041fb86 @rtomayko remove defunct rpg-version-test
authored
20 rpg-sh-setup.html rpg.html rpg-fetch.html \
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
21 rpg-sync.html rpg-upgrade.html rpg-outdated.html \
22 rpg-package-install.html rpg-package-spec.html rpg-parse-index.html \
23 rpg-list.html
8e72220 @rtomayko configure and `make install' basically work but need love
authored
24
25 PROGRAMPROGRAMS = \
041fb86 @rtomayko remove defunct rpg-version-test
authored
26 rpg-config rpg-fetch rpg-install rpg-uninstall rpg-build \
7f09cda @rtomayko rpg-status is no more
authored
27 rpg-env rpg-sync rpg-resolve rpg-upgrade rpg-steal rpg-fsck rpg-list \
8bb4a4c @rtomayko rpg-parse-package-list now known as rpg-package-list
authored
28 rpg-outdated rpg-package-list rpg-package-register rpg-package-install \
5e038e5 @rtomayko rpg-solve-fast is now rpg-solve; rpg-solve.sh goes away
authored
29 rpg-unpack rpg-package-spec rpg-parse-index rpg-shit-list \
dec24f2 @rtomayko rpg-leaves shows installed packages no other package depends on
authored
30 rpg-prepare rpg-complete rpg-help rpg-package-index rpg-dependencies \
ec9536e @rtomayko rpg-diff shows diff between two package versions (WIP)
authored
31 rpg-leaves rpg-manifest rpg-solve rpg-diff
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
32
041fb86 @rtomayko remove defunct rpg-version-test
authored
33 DEADPROGRAMS = \
34 rpg-update rpg-status rpg-parse-package-list rpg-version-test
35
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
36 OBJECTS = \
5e038e5 @rtomayko rpg-solve-fast is now rpg-solve; rpg-solve.sh goes away
authored
37 strnatcmp.o rpg-solve.o
4b1ed8b @rtomayko s/pgem/rpg/g on entire project
authored
38
b94a9ef @rtomayko rpg-status is now known as rpg-list
authored
39 USERPROGRAMS = rpg rpg-sh-setup
b5854bd @rtomayko get manpage build stuff going
authored
40 PROGRAMS = $(USERPROGRAMS) $(PROGRAMPROGRAMS)
b7b3db5 @rtomayko get a Makefile going
authored
41
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
42 .SUFFIXES: .sh .rb .html .c .o
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
43
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
44 .sh:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
45 printf "%13s %-30s" "[SH]" "$@"
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
46 $(SHELL) -n $<
a140d97 @rtomayko make built programs read only
authored
47 rm -f $@
8e72220 @rtomayko configure and `make install' basically work but need love
authored
48 $(RUBY) ./munge.rb __RPGCONFIG__ config.sh <$< >$@+
49 chmod a-w+x $@+
50 mv $@+ $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
51 printf " OK\n"
b7b3db5 @rtomayko get a Makefile going
authored
52
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
53 .sh.html:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
54 printf "%13s %-30s" "[SHOCCO]" "$@"
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
55 shocco $< > $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
56 printf " OK\n"
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
57
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
58 .rb:
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
59 printf "%13s %-30s" "[RUBY]" "$@"
60 ruby -c $< >/dev/null
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
61 rm -f $@
62 cp $< $@
63 chmod a-w+x $@
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
64 printf " OK\n"
65
66 .rb.html:
67 printf "%13s %-30s" "[ROCCO]" "$@"
0e5e935 @rtomayko docco cleanup, remove undocumented stuff from doc target
authored
68 rocco $< >/dev/null
78b3983 @rtomayko rpg-parse-index converts modern gemspec index to parseable format
authored
69 printf " OK\n"
eb3ac03 @rtomayko rpg-package-spec does everything gemspec related
authored
70
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
71 .c.o:
472b1e5 @rtomayko first crack at fast version solver in C
authored
72 printf "%13s %-30s" "[CC]" "$@"
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
73 $(CC) -c $(CFLAGS) $<
472b1e5 @rtomayko first crack at fast version solver in C
authored
74 printf " OK\n"
75
9a72f47 @richmeyers Fix build on FreeBSD.
richmeyers authored
76 rpg-sh-setup: config.sh munge.rb rpg-sh-setup.sh
77 rpg: config.sh munge.rb rpg.sh
8e72220 @rtomayko configure and `make install' basically work but need love
authored
78
5e038e5 @rtomayko rpg-solve-fast is now rpg-solve; rpg-solve.sh goes away
authored
79 rpg-solve: rpg-solve.o strnatcmp.o
3a5b791 @rtomayko write unsolved packages as: <package> -
authored
80 printf "%13s %-30s" "[LINK]" "$@"
5e038e5 @rtomayko rpg-solve-fast is now rpg-solve; rpg-solve.sh goes away
authored
81 $(CC) $(CFLAGS) $(LDFLAGS) rpg-solve.o strnatcmp.o -o $@
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
82 printf " OK\n"
83
5e038e5 @rtomayko rpg-solve-fast is now rpg-solve; rpg-solve.sh goes away
authored
84 rpg-solve-fast.o: rpg-solve.c strnatcmp.h
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
85 strnatcmp.o: strnatcmp.c strnatcmp.h
86
a140d97 @rtomayko make built programs read only
authored
87 build: $(PROGRAMS)
963426b @rtomayko make auto
authored
88
89 auto:
90 while true; do $(MAKE) ; sleep 1; done
b7b3db5 @rtomayko get a Makefile going
authored
91
b5854bd @rtomayko get manpage build stuff going
authored
92 man:
93 $(MAKE) -C doc man
94
3fda91e @rtomayko makefile uses implicit rules for .sh and .html shocco docs
authored
95 doc: $(DOCHTML)
96
b490166 @rtomayko simple TAP-like test framework and smoke tests
authored
97 test: build
98 cd test && $(SHELL) test-rpg.sh
99
8e72220 @rtomayko configure and `make install' basically work but need love
authored
100 install:
101 mkdir -p "$(bindir)" || true
102 for f in $(USERPROGRAMS); do \
103 echo "$(INSTALL_PROGRAM) $$f $(bindir)"; \
104 $(INSTALL_PROGRAM) $$f "$(bindir)"; \
105 done
106 mkdir -p "$(libexecdir)" || true
107 for f in $(PROGRAMPROGRAMS); do \
108 echo "$(INSTALL_PROGRAM) $$f $(libexecdir)"; \
109 $(INSTALL_PROGRAM) $$f "$(libexecdir)"; \
b7b3db5 @rtomayko get a Makefile going
authored
110 done
111
112 uninstall:
8e72220 @rtomayko configure and `make install' basically work but need love
authored
113 for f in $(USERPROGRAMS); do \
3ca0906 @rtomayko fix up install and uninstall make targets
authored
114 test -e "$(bindir)/$$f" || continue; \
8e72220 @rtomayko configure and `make install' basically work but need love
authored
115 echo "rm -f $(bindir)/$$f"; \
116 rm "$(bindir)/$$f"; \
117 done
041fb86 @rtomayko remove defunct rpg-version-test
authored
118 for f in $(PROGRAMPROGRAMS) $(DEADPROGRAMS); do \
8e72220 @rtomayko configure and `make install' basically work but need love
authored
119 test -e "$(libexecdir)/$$f" || continue; \
120 echo "rm -f $(libexecdir)/$$f"; \
121 rm "$(libexecdir)/$$f"; \
b7b3db5 @rtomayko get a Makefile going
authored
122 done
123
578b0d4 @rtomayko make install-local installs to /usr/local and switches to dev environmen...
authored
124 install-local:
125 ./configure --prefix=/usr/local
126 sleep 1
127 make
128 make install
129 ./configure --development
130
b7b3db5 @rtomayko get a Makefile going
authored
131 clean:
1a0d57d @rtomayko bring in strnatcmp lib for comparing versions
authored
132 rm -vf $(PROGRAMS) $(DOCHTML) $(OBJECTS)
b5854bd @rtomayko get manpage build stuff going
authored
133 $(MAKE) -C doc clean
b7b3db5 @rtomayko get a Makefile going
authored
134
e757852 @rtomayko `make tags' builds tags file
authored
135 tags:
136 ctags --extra=+f \
137 --totals=yes \
138 --fields=+iaS \
139 --exclude=@.gitignore \
140 --exclude=/usr/X11 \
141 -R -f tags . /usr/include
142
6fd96ba @rtomayko make dist
authored
143 dist:
144 tarname=$(TARNAME)-$$(git describe --tags); \
145 mkdir -p dist; \
146 if test -f dist/$$tarname.tar.gz; \
147 then echo "$$tarname.tar.gz already exists. not overwriting." 1>&2; \
148 false; \
149 else git archive --format=tar --prefix=$${tarname}/ HEAD | \
150 gzip >dist/$$tarname.tar.gz && \
151 echo "dist/$$tarname.tar.gz"; \
152 fi
153
2cce0fd @rtomayko use .sh extension and more idiomatic use of make
authored
154 .SILENT:
8e72220 @rtomayko configure and `make install' basically work but need love
authored
155
6fd96ba @rtomayko make dist
authored
156 .PHONY: install uninstall clean tags dist
Something went wrong with that request. Please try again.