[Freeciv-Dev] Re: (PR#8640) Target "*.ruleset" at data/nation/Makefile
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] Re: (PR#8640) Target "*.ruleset" at data/nation/Makefile |
From: |
"Marko Lindqvist" <marko.lindqvist@xxxxxxxxxxx> |
Date: |
Sun, 2 May 2004 12:05:17 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8640 >
Marko Lindqvist wrote:
> Well, this individual problem might is not worth fixing now, since it
I take this back. Since problem is in Makefile dependency (not in
direct dependency), even 'make -k' does not get compilation past this
point. While I'm doing changes to configure.ac, Makefile.ams etc. all
the time, not enabling maintainer mode is not really an option.
Attached patch at least allows me to work. I'm not tested at all if it
makes what it should. I'm currently happy as it stops fatal make errors
for me.
There is also possibility that I have used parameters that are illegal
in some platforms, for some command.
It should fix both compiling from separate builddirs and make
Makefile.am to be really regenerated whenever list of rulesets changes,
not when some individual ruleset changes.
Btw: Can we develop further changes in current file Makefile.am.sh,
moving actual logic from script into generated Makefile.am. When
Makefile.am.sh is simply "cat <<EOF ... EOF" we can remove "cat <<EOF"
and "EOF" parts and have Makefile.am. Then rename file in repository.
- Caz
diff -Nurd freeciv/data/nation/Makefile.am.sh freeciv/data/nation/Makefile.am.sh
--- freeciv/data/nation/Makefile.am.sh 2003-02-14 11:30:29.000000000 +0200
+++ freeciv/data/nation/Makefile.am.sh 2004-05-02 21:40:30.140625000 +0300
@@ -3,6 +3,10 @@
# Regenerate Makefile.am based on actual contents of directory.
# This is all so 'make distcheck' will work.
#
+
+# We need to know where rulesets really are even if called from builddir.
+RSDIR=`dirname $0`
+
cat <<EOF
## Process this file with automake to produce Makefile.in
# Note: After adding a new nation file, 'make Makefile.am'
@@ -11,11 +15,18 @@
pkgdatadir = \$(datadir)/@PACKAGE@/nation
pkgdata_DATA = \\
-`find * -name "*.ruleset" -print | sed -e 's/.*ruleset$/ & \\\/'
-e '$s/.$//'`
+`find $RSDIR/ -name "*.ruleset" -print | sed -e "s,$RSDIR/,," -e
's/.*ruleset$/ & \\\/' -e '$s/.$//'`
-EXTRA_DIST = \$(pkgdata_DATA) Makefile.am.sh
+EXTRA_DIST = \$(pkgdata_DATA) Makefile.am.sh ruleset_list.txt
-Makefile.am: Makefile.am.sh \$(shell echo *.ruleset)
- sh Makefile.am.sh >Makefile.am
+\$(srcdir)/ruleset_list.txt :
+ @echo "## Autogenerated list of nation ruleset files." >
ruleset_list.tmp
+ @echo "## Do not edit, but run 'make ruleset_list.txt' to regenerate"
>> ruleset_list.tmp
+ @echo "##" >> ruleset_list.tmp
+ ls -1 \$(srcdir)/*.ruleset | sed "s,\$(srcdir)/,," >> ruleset_list.tmp
+ if ! [ -e \$(srcdir)/ruleset_list.txt ] || [ ! cmp -s
\$(srcdir)/ruleset_list.txt ruleset_list.tmp ] ; then mv -f ruleset_list.tmp
\$(srcdir)/ruleset_list.txt ; else rm ruleset_list.tmp ; fi
+
+\$(srcdir)/Makefile.am: \$(srcdir)/Makefile.am.sh \$(srcdir)/ruleset_list.txt
+ sh \$(srcdir)/Makefile.am.sh > \$(srcdir)/Makefile.am
EOF
|
|