4 ifeq (,$(findstring clean,$(MAKECMDGOALS
)))
5 ifneq (config
,$(MAKECMDGOALS
))
11 GHCFLAGS
+= +RTS
$(RTSFLAGS
) -RTS
14 GHCFLAGS
+= -Wall
-Werror
-I.
-I.
/src
-i.
/src
15 GHCFLAGS_src__Darcs__Commands__Record.o
= $(filter-out -auto-all
,$(GHCFLAGS
))
16 GHCFLAGS_src__Darcs__SelectChanges.o
= $(filter-out -auto-all
,$(GHCFLAGS
))
17 GHCFLAGS_src__SHA1.o
= $(GHCFLAGS
) -no-auto-all
-funfolding-use-threshold20
18 ifeq ($(HAVE_CURSES
),True
)
19 GHCFLAGS_src__Darcs__External.o
= $(GHCFLAGS
)
20 ifeq ($(HAVE_TERMIO_H
),True
)
21 # This termio bit is a grim hack for Solaris 10 (at least).
22 # Without it, SGTTY isn't declared. Something in the ghc C headers
23 # which get included before term.h in the generated C is clobbering
24 # it. (If you edit that C and put the curses.h and term.h first, the
26 GHCFLAGS_src__Darcs__External.o
+= '-\#include <termio.h>'
28 GHCFLAGS_src__Darcs__External.o
+= '-\#include <curses.h>' '-\#include <term.h>'
31 SRC_DIRS
:=. .
/src .
/src
/Crypt\
34 .
/src
/Darcs
/Repository\
38 .
/src
/win32
/System
/Posix\
48 URL.hs HTTP.hs DateMatcher.lhs \
50 FastPackedString.hs FileName.lhs FileSystem.hs IsoDate.lhs \
51 Lcs.lhs OldDate.lhs OldFastPackedString.hs \
54 SHA1.lhs Ssh.hs UTF8.lhs \
56 MODULES_CRYPT
:= SHA256.hs
59 ArgumentDefaults.lhs \
60 Arguments.lhs Bug.lhs \
63 Commands.lhs CommandsAux.lhs Compat.hs \
64 Diff.lhs Email.hs FilePathUtils.hs \
67 Flags.lhs Global.lhs \
68 Hopefully.lhs HopefullyPrivate.lhs \
69 IO.lhs Lock.lhs Patch.lhs \
71 Population.lhs PopulationData.lhs \
72 PrintPatch.lhs Progress.lhs \
73 RemoteApply.lhs RepoPath.hs \
74 Repository.lhs Resolution.lhs SignalHandler.lhs Test.lhs URL.hs \
77 SelectChanges.lhs TheCommands.lhs \
81 Apply.lhs Bundle.lhs \
82 Commute.lhs Core.lhs \
84 Depends.lhs Info.lhs Match.lhs MatchData.lhs \
87 Patchy.lhs Permutations.lhs \
89 Read.lhs ReadMonads.hs Real.lhs Set.lhs Show.lhs \
90 TouchesFiles.lhs Viewing.lhs \
95 HashedIO.lhs HashedRepo.lhs \
96 Format.lhs Internal.lhs \
103 Add.lhs AmendRecord.lhs Annotate.lhs Apply.lhs \
104 Changes.lhs Check.lhs Convert.lhs Diff.lhs Dist.lhs \
105 Get.lhs Help.lhs Init.lhs MarkConflicts.lhs Mv.lhs Optimize.lhs \
106 Pull.lhs Push.lhs Put.lhs \
107 Record.lhs Remove.lhs Repair.lhs Replace.lhs \
108 Revert.lhs Rollback.lhs \
109 Send.lhs SetPref.lhs \
110 Show.lhs ShowAuthors.lhs ShowBug.lhs \
111 ShowContents.lhs ShowFiles.lhs ShowTags.lhs ShowRepo.lhs \
112 Tag.lhs TrackDown.lhs TransferMode.lhs \
113 Unrecord.lhs Unrevert.lhs WhatsNew.lhs \
115 witnesses
: src
/Darcs
/Patch
/Real.hi src
/Darcs
/Patch
/Properties.hi src
/Darcs
/Patch.hi \
116 src
/Darcs
/Repository
/ApplyPatches.hi src
/Darcs
/Patch
/Bundle.hi \
117 src
/Darcs
/Patch
/Match.hi src
/Darcs
/Repository
/HashedRepo.hi \
118 src
/Darcs
/Resolution.hi src
/Darcs
/Patch
/Check.hi \
119 src
/Darcs
/Repository
/Pristine.hi src
/Darcs
/Repository
/DarcsRepo.hi
121 DARCS_FILES
:= $(DARCS_FILES_DEPS
)\
122 $(patsubst %,src
/%,$(MODULES_AUTOCONF
))\
123 $(patsubst %,src
/%,$(MODULES_GENERAL
))\
124 $(patsubst %,src
/Crypt
/%,$(MODULES_CRYPT
))\
125 $(patsubst %,src
/Darcs
/%,$(MODULES_DARCS
))\
126 $(patsubst %,src
/Darcs
/Patch
/%,$(MODULES_PATCH
))\
127 $(patsubst %,src
/Darcs
/Repository
/%,$(MODULES_REPOSITORY
))\
128 $(patsubst %,src
/Darcs
/Commands
/%,$(MODULES_COMMANDS
))
130 UNIT_FILES
:= $(DARCS_FILES
) src
/Darcs
/Patch
/Test.lhs src
/Darcs
/Patch
/QuickCheck.lhs \
131 src
/Darcs
/Patch
/Unit.lhs src
/Darcs
/Patch
/Properties.lhs src
/Darcs
/Patch
/Check.lhs
133 C_OBJS
:= $(patsubst %,src
/%,c_compat.o maybe_relink.o atomic_create.o fpstring.o umask.o
) \
134 src
/Crypt
/sha2.o src
/hscurl.o src
/hslibwww.o
136 ifeq ($(SYS
), windows
)
137 GHCFLAGS
+= -isrc
/win32
-Isrc
/win32
-DWIN32
138 DARCS_FILES
+= src
/win32
/System
/Posix.hs src
/win32
/System
/Posix
/Files.hs \
139 src
/win32
/System
/Posix
/IO.hs src
/win32
/CtrlC.hs
140 C_OBJS
+= src
/win32
/CtrlC_stub.o src
/win32
/CtrlC.o
141 UNIT_FILES
+= src
/win32
/System
/Posix.hs src
/win32
/System
/Posix
/Files.hs \
142 src
/win32
/System
/Posix
/IO.hs
145 ifeq ($(HAVE_MAPI
),True
)
146 C_OBJS
+= src
/win32
/send_email.o
147 CPPFLAGS
+= -Isrc
/win32
148 GHCFLAGS
+= -DHAVE_MAPI
151 DARCS_OBJS
:= $(patsubst %.hs
,%.o
,$(patsubst %.lhs
,%.o
,$(DARCS_FILES
)))
152 UNIT_OBJS
:= $(patsubst %.hs
,%.o
,$(patsubst %.lhs
,%.o
,$(UNIT_FILES
)))
155 .PHONY
: all clean distclean maintainer-clean
dist deb
test check install \
156 test_shell test_shell_hashed test_shell_format2 \
157 test_perl test_perl_hashed test_perl_format2 \
158 bugs bugs_shell bugs_shell_hashed bugs_shell_format2 \
159 bugs_perl bugs_perl_hashed bugs_perl_format2 \
160 installserver installdocs installbin windowsinstaller \
161 website slowtest witnesses\
164 config
: configure autoconf.mk
167 $(MAKE
) install prefix=$(destdir
)/$(prefix) \
168 bindir=$(destdir
)/$(bindir) \
169 libdir=$(destdir
)/$(libdir) \
170 datadir=$(destdir
)/$(datadir) \
171 libexecdir
=$(destdir
)/$(libexecdir
)
174 test -d
$(DESTDIR
)$(bindir) ||
$(INSTALL
) -d
$(DESTDIR
)$(bindir)
175 $(INSTALL
) darcs
$(DESTDIR
)$(bindir)
177 test -d
$(DESTDIR
)$(sysconfdir
)/bash_completion.d || \
178 $(INSTALL
) -d
$(DESTDIR
)$(sysconfdir
)/bash_completion.d
179 $(INSTALL_DATA
) tools
/darcs_completion
$(DESTDIR
)$(sysconfdir
)/bash_completion.d
/darcs
181 test -d
$(DESTDIR
)$(mandir)/man1 || \
182 $(INSTALL
) -d
$(DESTDIR
)$(mandir)/man1
183 $(INSTALL_DATA
) doc
/darcs
.1 $(DESTDIR
)$(mandir)/man1
/
185 installdocs
: doc
/manual
/darcs.ps doc
/manual
/patch-theory.pdf doc
/manual
/index.html
186 test -d
$(DESTDIR
)$(docdir
)/manual || \
187 $(INSTALL
) -d
$(DESTDIR
)$(docdir
)/manual
188 $(INSTALL_DATA
) doc
/manual
/* $(DESTDIR
)$(docdir
)/manual
190 test -d
$(DESTDIR
)$(docdir
)/examples || \
191 $(INSTALL
) -d
$(DESTDIR
)$(docdir
)/examples
192 $(INSTALL_DATA
) tools
/zsh_completion_new
$(DESTDIR
)$(docdir
)/examples
/
193 $(INSTALL_DATA
) tools
/zsh_completion_old
$(DESTDIR
)$(docdir
)/examples
/
195 installserver
: tools
/cgi
/darcs.cgi
196 test -d
$(DESTDIR
)$(libexecdir
)/cgi-bin || \
197 $(INSTALL
) -d
$(DESTDIR
)$(libexecdir
)/cgi-bin
199 test -d
$(DESTDIR
)$(sysconfdir
)/darcs || \
200 $(INSTALL
) -d
$(DESTDIR
)$(sysconfdir
)/darcs
201 test -e
$(DESTDIR
)$(sysconfdir
)/darcs
/cgi.conf || \
202 $(INSTALL_DATA
) tools
/cgi
/cgi.conf
$(DESTDIR
)$(sysconfdir
)/darcs
/cgi.conf
203 $(INSTALL
) tools
/cgi
/darcs.cgi
$(DESTDIR
)$(libexecdir
)/cgi-bin
/darcs.cgi
204 test -d
$(DESTDIR
)$(datadir)/darcs || \
205 $(INSTALL
) -d
$(DESTDIR
)$(datadir)/darcs
206 test -d
$(DESTDIR
)$(datadir)/darcs
/xslt || \
207 $(INSTALL
) -d
$(DESTDIR
)$(datadir)/darcs
/xslt
208 $(INSTALL_DATA
) tools
/cgi
/xslt
/*.xslt
$(DESTDIR
)$(datadir)/darcs
/xslt
/
209 $(INSTALL_DATA
) tools
/cgi
/xslt
/errors.xml
$(DESTDIR
)$(datadir)/darcs
/xslt
/
210 $(INSTALL_DATA
) tools
/cgi
/xslt
/styles.css
$(DESTDIR
)$(datadir)/darcs
/xslt
/styles.css
212 # Debian policy doesn't allow symlinks as configuration files.
213 # test -e $(DESTDIR)$(sysconfdir)/darcs/styles.css || \
214 # ln -s $(datadir)/darcs/xslt/styles.css \
215 # $(DESTDIR)$(sysconfdir)/darcs/styles.css
216 $(INSTALL
) -m
644 tools
/cgi
/xslt
/styles.css
$(DESTDIR
)$(sysconfdir
)/darcs
/styles.css
218 PREDIST_COPY_FILES
:= \
224 dist: darcs
$(PREDIST_COPY_FILES
)
225 REPO_PATH
="$$PWD" .
/darcs
dist --dist-name darcs-
$(DARCS_VERSION
)
226 ln
-sf darcs-
$(DARCS_VERSION
).
tar.gz darcs-latest.
tar.gz
229 for F in
$(PREDIST_COPY_FILES
); do \
230 cp
-v
"$$REPO_PATH/$$F" .
; \
233 predist
: predist_copy doc
/manual
/darcs.ps doc
/darcs
.1 doc
/manual
/index.html
distclean
234 rm -fr release
/debian
237 rm -rf
/tmp
/darcs-deb_temp
&& \
238 .
/darcs
dist --dist-name darcs-deb_temp
&& \
239 mv darcs-deb_temp.
tar.gz
/tmp
&& \
240 cd
/tmp
&& tar zxf darcs-deb_temp.
tar.gz
&& \
241 cd darcs-deb_temp
&& debuild
&& \
242 rm -rf
/tmp
/darcs-deb_temp
244 #ensure the directory exists for api documentation
246 @echo
"Creating api-doc directory"
249 #generate the api documentation
250 api-doc
: api-doc-dir
$(DARCS_FILES
)
251 @if
test $(HADDOCK_VERSION
) -lt
2 ; then \
252 echo
"You need haddock 2.0.0 or later to build the API documentation" ; \
255 echo
"Generating html" ; \
256 haddock
--ignore-all-exports
--optghc
=-I.
--optghc
=-I.
/src
--optghc
=-i.
/src
--optghc
=-D__HADDOCK__
-B
`$(GHC) --print-libdir` -o api-doc
-h
$(filter-out %api-doc-dir
,$^
) ; \
259 windowsinstaller
: darcs doc
/manual
/index.html release
/darcs.nsi
260 echo
"!define VERSION $(DARCS_VERSION)" > version.nsi
261 "$(MAKENSIS)" version.nsi release
/darcs.nsi
264 darcs
: $(DARCS_OBJS
) src
/darcs.lhs
$(C_OBJS
)
266 @
rm -f Main.o Main.hi
268 $(GHC
) $(GHCFLAGS
) $(OPTLLDFLAGS
) -o
$@
$^
$(OPTLLIBS
)
270 @
$(GHC
) $(GHCFLAGS
) $(OPTLLDFLAGS
) -o
$@
$^
$(OPTLLIBS
)
273 ghci
: $(DARCS_FILES
) $(C_OBJS
)
274 ghci
$(filter-out -Wall
,$(GHCFLAGS
)) $(OPTLLDFLAGS
) src
/darcs.lhs
$(C_OBJS
) $(OPTLLIBS
)
277 darcsman
: src
/darcsman.hs
$(C_OBJS
) $(DARCS_OBJS
)
278 list_authors
: src
/list_authors.hs
$(C_OBJS
) $(DARCS_OBJS
)
279 microbench
: src
/microbench.hs
$(C_OBJS
) $(DARCS_OBJS
)
280 make_changelog
: src
/make_changelog.hs
$(C_OBJS
) $(DARCS_OBJS
)
281 unit
: src
/unit.lhs
$(UNIT_OBJS
) $(C_OBJS
)
282 preproc
: src
/preproc.hs
$(C_OBJS
) $(DARCS_OBJS
)
284 TEXSOURCES
:= preproc src
/darcs.lhs src
/features.
tex \
285 src
/switching.
tex src
/configuring_darcs.
tex src
/gpl.
tex \
286 $(DARCS_FILES
) src
/building_darcs.
tex \
287 src
/best_practices.
tex
288 src
/darcs.
tex: $(TEXSOURCES
)
289 .
/preproc darcs.lhs
$(PREPROCHTML
) > src
/darcs.
tex
290 # The following is to prevent both being generated simultaneously, which
292 src
/darcs_print.pdf
: src
/darcs_print.ps
293 src
/darcs_print.
tex: $(TEXSOURCES
)
294 .
/preproc darcs.lhs
> src
/darcs_print.
tex
295 src
/patch-theory.
tex: $(TEXSOURCES
) $(UNIT_FILES
)
296 .
/preproc Darcs
/Patch
/Properties.lhs
> src
/patch-theory.
tex
298 website
: doc
/manual
/darcs.ps doc
/manual
/patch-theory.pdf doc
/manual
/index.html doc
/manual
/bigpage.html \
301 doc
/manual
/index.html
: src
/darcs.
tex src
/gpl.
tex doc
/darcs.css
303 cp
-f doc
/darcs.css doc
/manual
/darcs.css
305 doc
/manual
/bigpage.html
: src
/darcs.
tex src
/gpl.
tex doc
/darcs.css
306 ln
-sf darcs.
tex src
/bigpage.
tex
307 latex2html
-split
0 -external_file darcs
-prefix big \
308 -no_auto_link
-dir doc
/manual src
/bigpage.
tex
310 cp
-f doc
/darcs.css doc
/manual
/bigpage.css
312 doc
/manual
/darcs.ps
: src
/darcs_print.ps
313 cp src
/darcs_print.ps doc
/manual
/darcs.ps
314 doc
/manual
/darcs.pdf
: src
/darcs_print.pdf
315 cp src
/darcs_print.pdf doc
/manual
/darcs.pdf
316 doc
/manual
/patch-theory.pdf
: src
/patch-theory.pdf
317 cp src
/patch-theory.pdf doc
/manual
/
319 doc
/darcs
.1: darcsman
322 AUTHORS
: list_authors
323 .
/list_authors
> AUTHORS
325 ChangeLog
: make_changelog changelog.in
/ChangeLog.old
$(wildcard changelog.in
/entries
/*)
329 rm -f changelog.in
/entries
/*~
; \
330 .
/make_changelog
$(wildcard changelog.in
/entries
/*); \
332 sed
-n
'/^darcs (1\.0\.2)$$/,$$p' changelog.in
/ChangeLog.old
; \
337 test_shell_hashed test_shell test_shell_format2 \
338 test_perl test_perl_hashed test_perl_format2 \
341 bugs
: bugs_shell_hashed bugs_shell bugs_shell_format2 \
342 bugs_perl bugs_perl_hashed bugs_perl_format2
344 TEST_FILTER_FILE
:= tests_to_run
345 PERL_HARNESS
:= perl ..
/tests
/bin
/prove
--nocolor
346 SHELL_HARNESS
:= perl ..
/tests
/shell_harness
355 @echo Running
$4 tests on
$1 repositories...
356 @chmod
-R u
+rwx tests-
$4-$1.
dir || true
357 @
rm -rf tests-
$4-$1.
dir && cp
-R tests tests-
$4-$1.
dir
358 @cd tests-
$4-$1.
dir && rm -rf .darcs
; mkdir .darcs
;\
360 if
[ -r
$(TEST_FILTER_FILE
) ];\
361 then grep
"\.$5" $(TEST_FILTER_FILE
) | grep
-v
'^#' |
$3 | xargs
$6; \
362 else ls
*.
$5 |
sort -r |
$3 | xargs
$6; fi
363 @echo Done running tests on
$1 repositories...
367 @echo Demonstrating
$4 bugs on
$1 repositories...
368 @
rm -rf bugs-
$4-$1.
dir && cp
-R bugs bugs-
$4-$1.
dir
369 @cd bugs-
$4-$1.
dir && rm -rf .darcs
; mkdir .darcs
;\
371 if
[ -r
$(TEST_FILTER_FILE
) ];\
372 then bugs
=1 grep
"\.$5" $(TEST_FILTER_FILE
) | grep
-v
'^#' |
$3 | xargs
$6 || true
; \
373 else bugs
=1 ls
*.
$5 |
sort -r |
$3 | xargs
$6 || true
; fi
374 @echo Done demonstrating bugs on
$1 repositories...
380 shell_harness
=$(call harness
,$1,$2,$3,shell,sh
,$(SHELL_HARNESS
))
381 perl_harness
=$(call harness
,$1,$2,$3,perl
,pl
,$(PERL_HARNESS
))
382 shell_bugs
=$(call bug_harness
,$1,$2,$3,shell,sh
,$(SHELL_HARNESS
))
383 perl_bugs
=$(call bug_harness
,$1,$2,$3,perl
,pl
,$(PERL_HARNESS
))
386 @echo Running network tests ...
387 @
rm -rf tests-network.
dir && cp
-R tests
/network tests-network.
dir
388 @cd tests-network.
dir && rm -rf .darcs
; mkdir .darcs
;\
389 if
[ -r
$(TEST_FILTER_FILE
) ];\
390 then bugs
=1 grep
"\.sh" $(TEST_FILTER_FILE
) | grep
-v
'^#' | xargs
$(SHELL_HARNESS
); \
391 else bugs
=1 ls
*.sh |
sort -r | xargs
$(SHELL_HARNESS
); fi
392 @echo Passed network tests.
395 $(call shell_harness
,old-fashioned
,:,cat
)
397 # for the format2 tests, we skip the hashed_inventory.sh test, since explicitly
398 # creates the old-fashioned format that's incompatible with darcs-2.
399 test_shell_format2
: darcs
400 $(call shell_harness
,darcs-2
,\
401 echo ALL
--darcs-2
>> .darcs
/defaults
,\
402 grep
-v hashed_inventory.sh
)
404 test_shell_hashed
: darcs
405 $(call shell_harness
,hashed
,\
406 echo ALL
--hashed
>> .darcs
/defaults
,cat
)
408 # skip test known to fail on this repo format
410 $(call perl_harness
,old-fashioned
,:,cat
)
412 test_perl_format2
: darcs
413 $(call perl_harness
,darcs-2
,\
414 echo ALL
--darcs-2
>> .darcs
/defaults
,cat
)
416 test_perl_hashed
: darcs
417 $(call perl_harness
,hashed
,\
418 echo ALL
--hashed
>> .darcs
/defaults
,grep
-v conflict-doppleganger.pl
)
421 $(call shell_bugs
,old-fashioned
,:,cat
)
423 bugs_shell_format2
: darcs
424 $(call shell_bugs
,format-2
,\
425 echo ALL
--darcs-2
>> .darcs
/defaults
,\
426 grep
-v hashed_inventory.sh
)
428 bugs_shell_hashed
: darcs
429 $(call shell_bugs
,hashed
,\
430 echo ALL
--hashed
>> .darcs
/defaults
,cat
)
433 $(call perl_bugs
,old-fashioned
,:,cat
)
435 bugs_perl_format2
: darcs
436 $(call perl_bugs
,darcs-2
,\
437 echo ALL
--darcs-2
>> .darcs
/defaults
,cat
)
439 bugs_perl_hashed
: darcs
440 $(call perl_bugs
,hashed
,\
441 echo ALL
--hashed
>> .darcs
/defaults
,cat
)
443 test_unit
: darcs unit
449 rm -f
$(foreach dir,$(SRC_DIRS
),$(dir)/*.o
$(dir)/*.hi
)
450 rm -f unit diff darcs darcs_cgi
452 rm -f src
/darcs.
tex src
/darcs.
dvi src
/darcs.aux
453 rm -f src
/patch-theory.
tex src
/patch-theory.aux src
/patch-theory.log
454 rm -f src
/patch-theory.aux src
/patch-theory.toc
455 rm -f src
/darcs_print.
tex src
/darcs_print.log src
/darcs_print.aux src
/darcs_print.toc
456 rm -f preproc darcsman
457 rm -rf tests
/temp
* darcs.log darcs.toc
458 rm -f conftest
* .depend.bak
459 rm -f src
/win32
/System
/Posix
/IO.hs src
/win32
/System
/Posix
/Files.hs
461 rm -f list_authors make_changelog
463 #only remove src/Context.hs if we have a darcs inventory to rebuild it from
464 if
test -f _darcs
/inventory
; then
rm -f src
/Context.hs
; fi
468 rm -rf config.status config.log autoconf.mk config.cache autom4te.cache
469 rm -f doc
/manual
/darcs.ps doc
/manual
/darcs.pdf doc
/manual
/patch-theory.pdf src
/Autoconf.lhs Workaround.hs darcs.idv
470 rm -f src
/ThisVersion.lhs tools
/cgi
/README tools
/cgi
/darcs.cgi tools
/cgi
/cgi.conf
473 maintainer-clean
: distclean
474 @echo
'This command is intended for maintainers to use; it'
475 @echo
'deletes files that may need special tools to rebuild.'
476 rm -f configure doc
/darcs
.1 .depend AUTHORS ChangeLog
478 rm -f doc
/manual
/*.html doc
/manual
/darcs
*.??? doc
/manual
/darcs.lg
479 rm -f doc
/manual
/darcs.xref c_context.c doc
/darcs_print.ps
480 rm -rf tests
/test_output
482 configure
: configure.ac aclocal.m4
485 autoconf.mk src
/Autoconf.lhs tools
/cgi
/darcs.cgi
: \
486 config.status autoconf.mk.in src
/Autoconf.lhs.in tools
/cgi
/darcs.cgi.in
489 config.status
: configure
490 @if
test -x config.status
; then \
491 .
/config.status
--recheck
; \
493 echo
>&2 "Please run ./configure to setup the build system."; \
497 .depend
: $(DARCS_FILES
) $(UNIT_FILES
)
498 @echo Rebuild dependencies ...
499 @
$(GHC
) $(GHCFLAGS
) -M
-optdep-f
-optdep.depend
$^
503 ifeq (,$(findstring clean,$(MAKECMDGOALS
)))
504 ifneq (config
,$(MAKECMDGOALS
))
511 # This follows what autoconf does.
512 # Fixme: Generate correct list of .c files and depend on that.
513 .PHONY
: CTAGS ctags
tags
516 $(ETAGS
) $(DARCS_FILES
) && etags
-a src
/*.c
518 CTAGS
: $(DARCS_FILES
)
519 $(CTAGS
) $(DARCS_FILES
) && ctags
-a src
/*.c
520 mv
tags tags.unsorted
521 sort tags.unsorted
> tags