Sort makedepend files for better comparability

The intention is to improve (and minimize) diffs when dependencies
are changed and `make depend' is executed.

(1) use `makedepend ... -w 20'
(2) `sort -u' the resultant file with some more "magic".

(1) makes sure that there is only one dependent file per line,
(2) makes lines unique since `makedepend' can output one file
    many times which is redundant and makes diffs hard to read.

This uses 'mv', 'grep', and 'sort' in all FLTK library Makefiles.
Image libraries are intentionally left for a later update.
This commit is contained in:
Albrecht Schlosser 2019-01-18 15:44:24 +01:00
parent 64cd95d6d5
commit 80ad88555f
4 changed files with 20 additions and 4 deletions

View File

@ -165,7 +165,11 @@ uninstall:
$(CAIROOBJECTS): ../makeinclude
depend: $(CAIROCPPFILES)
makedepend -Y -I.. -f makedepend $(CAIROCPPFILES)
makedepend -Y -I.. -f makedepend -w 20 $(CAIROCPPFILES)
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
echo "" >> makedepend.tmp
grep '^[a-zA-Z]' makedepend | sort -u >> makedepend.tmp
mv makedepend.tmp makedepend
include makedepend

View File

@ -71,7 +71,11 @@ clean:
-$(RM) fluid.app/Contents/MacOS/fluid$(EXEEXT)
depend: $(CPPFILES)
makedepend -Y -I.. -f makedepend $(CPPFILES)
makedepend -Y -I.. -f makedepend -w 20 $(CPPFILES)
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
echo "" >> makedepend.tmp
grep '^[a-zA-Z]' makedepend | sort -u >> makedepend.tmp
mv makedepend.tmp makedepend
# Automatically generated dependencies...
include makedepend

View File

@ -605,8 +605,12 @@ clean:
cmap core
depend: $(CPPFILES) $(MMFILES) $(FLCPPFILES) $(GLCPPFILES) $(IMGCPPFILES) $(CFILES) $(UTF8CFILES) $(XLIBCFILES)
makedepend -Y -I.. -f makedepend $(CPPFILES) $(MMFILES) $(FLCPPFILES) \
makedepend -Y -I.. -f makedepend -w 20 $(CPPFILES) $(MMFILES) $(FLCPPFILES) \
$(GLCPPFILES) $(IMGCPPFILES) $(CFILES) $(UTF8CFILES) $(XLIBCFILES)
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
echo "" >> makedepend.tmp
grep '^[a-zA-Z]' makedepend | sort -u >> makedepend.tmp
mv makedepend.tmp makedepend
# Automatically generated dependencies... generated on a Linux/Unix host !
include makedepend

View File

@ -187,7 +187,11 @@ all: $(ALL) $(GLDEMOS)
gldemos: $(GLALL)
depend: $(CPPFILES)
makedepend -Y -I.. -f makedepend $(CPPFILES)
makedepend -Y -I.. -f makedepend -w 20 $(CPPFILES)
echo "# DO NOT DELETE THIS LINE -- make depend depends on it." > makedepend.tmp
echo "" >> makedepend.tmp
grep '^[a-zA-Z]' makedepend | sort -u >> makedepend.tmp
mv makedepend.tmp makedepend
# Automatically generated dependencies...
include makedepend