author | Lynn Lin <Lin_Lynn@emc.com> | 2010-07-15 06:38:06 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2010-07-22 21:32:06 (UTC) |
commit | ab610292014c938a8f4e4004e9365bfc6cf9cbd6 (patch) (unidiff) | |
tree | 90fdeda7abec710e7516612828415bfbca444ffa | |
parent | 6821d8ea4a64d15b8f284d1af01ab184ef1e76c3 (diff) | |
download | cgit-ab610292014c938a8f4e4004e9365bfc6cf9cbd6.zip cgit-ab610292014c938a8f4e4004e9365bfc6cf9cbd6.tar.gz cgit-ab610292014c938a8f4e4004e9365bfc6cf9cbd6.tar.bz2 |
Makefile: do not include dependency-file on `make clean`
When envoking clean target, make should not perform the dependency file
generation triggered by include.
-rw-r--r-- | Makefile | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -94,88 +94,90 @@ OBJECTS += ui-repolist.o | |||
94 | OBJECTS += ui-shared.o | 94 | OBJECTS += ui-shared.o |
95 | OBJECTS += ui-snapshot.o | 95 | OBJECTS += ui-snapshot.o |
96 | OBJECTS += ui-ssdiff.o | 96 | OBJECTS += ui-ssdiff.o |
97 | OBJECTS += ui-stats.o | 97 | OBJECTS += ui-stats.o |
98 | OBJECTS += ui-summary.o | 98 | OBJECTS += ui-summary.o |
99 | OBJECTS += ui-tag.o | 99 | OBJECTS += ui-tag.o |
100 | OBJECTS += ui-tree.o | 100 | OBJECTS += ui-tree.o |
101 | 101 | ||
102 | ifdef NEEDS_LIBICONV | 102 | ifdef NEEDS_LIBICONV |
103 | EXTLIBS += -liconv | 103 | EXTLIBS += -liconv |
104 | endif | 104 | endif |
105 | 105 | ||
106 | 106 | ||
107 | .PHONY: all libgit test install uninstall clean force-version get-git \ | 107 | .PHONY: all libgit test install uninstall clean force-version get-git \ |
108 | doc man-doc html-doc clean-doc | 108 | doc man-doc html-doc clean-doc |
109 | 109 | ||
110 | all: cgit | 110 | all: cgit |
111 | 111 | ||
112 | VERSION: force-version | 112 | VERSION: force-version |
113 | @./gen-version.sh "$(CGIT_VERSION)" | 113 | @./gen-version.sh "$(CGIT_VERSION)" |
114 | -include VERSION | 114 | -include VERSION |
115 | 115 | ||
116 | 116 | ||
117 | CFLAGS += -g -Wall -Igit | 117 | CFLAGS += -g -Wall -Igit |
118 | CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' | 118 | CFLAGS += -DSHA1_HEADER='$(SHA1_HEADER)' |
119 | CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' | 119 | CFLAGS += -DCGIT_VERSION='"$(CGIT_VERSION)"' |
120 | CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' | 120 | CFLAGS += -DCGIT_CONFIG='"$(CGIT_CONFIG)"' |
121 | CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' | 121 | CFLAGS += -DCGIT_SCRIPT_NAME='"$(CGIT_SCRIPT_NAME)"' |
122 | CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"' | 122 | CFLAGS += -DCGIT_CACHE_ROOT='"$(CACHE_ROOT)"' |
123 | 123 | ||
124 | ifdef NO_ICONV | 124 | ifdef NO_ICONV |
125 | CFLAGS += -DNO_ICONV | 125 | CFLAGS += -DNO_ICONV |
126 | endif | 126 | endif |
127 | ifdef NO_STRCASESTR | 127 | ifdef NO_STRCASESTR |
128 | CFLAGS += -DNO_STRCASESTR | 128 | CFLAGS += -DNO_STRCASESTR |
129 | endif | 129 | endif |
130 | ifdef NO_OPENSSL | 130 | ifdef NO_OPENSSL |
131 | CFLAGS += -DNO_OPENSSL | 131 | CFLAGS += -DNO_OPENSSL |
132 | GIT_OPTIONS += NO_OPENSSL=1 | 132 | GIT_OPTIONS += NO_OPENSSL=1 |
133 | else | 133 | else |
134 | EXTLIBS += -lcrypto | 134 | EXTLIBS += -lcrypto |
135 | endif | 135 | endif |
136 | 136 | ||
137 | cgit: $(OBJECTS) libgit | 137 | cgit: $(OBJECTS) libgit |
138 | $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) | 138 | $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o cgit $(OBJECTS) $(EXTLIBS) |
139 | 139 | ||
140 | cgit.o: VERSION | 140 | cgit.o: VERSION |
141 | 141 | ||
142 | -include $(OBJECTS:.o=.d) | 142 | ifneq "$(MAKECMDGOALS)" "clean" |
143 | -include $(OBJECTS:.o=.d) | ||
144 | endif | ||
143 | 145 | ||
144 | libgit: | 146 | libgit: |
145 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a | 147 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) libgit.a |
146 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) xdiff/lib.a | 148 | $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) NO_CURL=1 $(GIT_OPTIONS) xdiff/lib.a |
147 | 149 | ||
148 | test: all | 150 | test: all |
149 | $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all | 151 | $(QUIET_SUBDIR0)tests $(QUIET_SUBDIR1) all |
150 | 152 | ||
151 | install: all | 153 | install: all |
152 | $(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_SCRIPT_PATH) | 154 | $(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_SCRIPT_PATH) |
153 | $(INSTALL) -m 0755 cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) | 155 | $(INSTALL) -m 0755 cgit $(DESTDIR)$(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) |
154 | $(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_DATA_PATH) | 156 | $(INSTALL) -m 0755 -d $(DESTDIR)$(CGIT_DATA_PATH) |
155 | $(INSTALL) -m 0644 cgit.css $(DESTDIR)$(CGIT_DATA_PATH)/cgit.css | 157 | $(INSTALL) -m 0644 cgit.css $(DESTDIR)$(CGIT_DATA_PATH)/cgit.css |
156 | $(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png | 158 | $(INSTALL) -m 0644 cgit.png $(DESTDIR)$(CGIT_DATA_PATH)/cgit.png |
157 | 159 | ||
158 | uninstall: | 160 | uninstall: |
159 | rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) | 161 | rm -f $(CGIT_SCRIPT_PATH)/$(CGIT_SCRIPT_NAME) |
160 | rm -f $(CGIT_DATA_PATH)/cgit.css | 162 | rm -f $(CGIT_DATA_PATH)/cgit.css |
161 | rm -f $(CGIT_DATA_PATH)/cgit.png | 163 | rm -f $(CGIT_DATA_PATH)/cgit.png |
162 | 164 | ||
163 | doc: man-doc html-doc pdf-doc | 165 | doc: man-doc html-doc pdf-doc |
164 | 166 | ||
165 | man-doc: cgitrc.5.txt | 167 | man-doc: cgitrc.5.txt |
166 | a2x -f manpage cgitrc.5.txt | 168 | a2x -f manpage cgitrc.5.txt |
167 | 169 | ||
168 | html-doc: cgitrc.5.txt | 170 | html-doc: cgitrc.5.txt |
169 | a2x -f xhtml --stylesheet=cgit-doc.css cgitrc.5.txt | 171 | a2x -f xhtml --stylesheet=cgit-doc.css cgitrc.5.txt |
170 | 172 | ||
171 | pdf-doc: cgitrc.5.txt | 173 | pdf-doc: cgitrc.5.txt |
172 | a2x -f pdf cgitrc.5.txt | 174 | a2x -f pdf cgitrc.5.txt |
173 | 175 | ||
174 | clean: clean-doc | 176 | clean: clean-doc |
175 | rm -f cgit VERSION *.o *.d | 177 | rm -f cgit VERSION *.o *.d |
176 | 178 | ||
177 | clean-doc: | 179 | clean-doc: |
178 | rm -f cgitrc.5 cgitrc.5.html cgitrc.5.pdf cgitrc.5.xml cgitrc.5.fo | 180 | rm -f cgitrc.5 cgitrc.5.html cgitrc.5.pdf cgitrc.5.xml cgitrc.5.fo |
179 | 181 | ||
180 | get-git: | 182 | get-git: |
181 | curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git | 183 | curl $(GIT_URL) | tar -xj && rm -rf git && mv git-$(GIT_VER) git |