Fix C++ warnings, better cleaning in makefiles
authorKevin Rosenberg <kevin@rosenberg.net>
Mon, 17 Sep 2007 19:59:58 +0000 (13:59 -0600)
committerKevin Rosenberg <kevin@rosenberg.net>
Mon, 17 Sep 2007 19:59:58 +0000 (13:59 -0600)
Sep 17, 2007  Version 4.5.5
* better cleaning in makefiles
* use "const char" variables for string literals

16 files changed:
ChangeLog
Makefile.am
Makefile.in
debian/changelog
debian/rules
helical/Makefile.am
helical/Makefile.in
include/ezplot.h
include/pol.h
libctgraphics/ezset.cpp
libctgraphics/pol.cpp
libctsim/phantom.cpp
src/ctsim.xpm
src/splash.xpm
tools/Makefile.am
tools/Makefile.in

index cbdd961e1188cb121c053ac320ced6500656c94c..50587b8e2ac04b75b617f6896bc6795000a20de3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sep 17, 2007  Version 4.5.5
+       * better cleaning in makefiles
+       * use "const char" variables for string literals
+
 Sep 10, 2007  Version 4.5.4
        * configure.ac: Fix builds with multiple versions of wx-config
        -- thanks to Steve White
index bf03d3da635968b8d00446b5eb714f2498cc448f..5be74c297a5e7eb9bc251eb7719b7b9ead2e0397 100644 (file)
@@ -20,6 +20,10 @@ SUBDIRS=man libctsupport libctsim  html cgi-bin include $(EXTRA_DIRS1) $(EXTRA_D
 
 EXTRA_DIST=acsite.m4 make.bat msvc/ctsim.dsw msvc/ctsimtext/ctsimtext.dsp msvc/libctsim/libctsim.dsp msvc/ctsim/ctsim.dsp
 
+CLEANFILES=docs/html/\* config.status configure.in
+clean-local:
+       rm -rf docs/html
+
 #install-data-hook: 
 #      test -d $(datadir) || mkdir -p $(datadir) && chmod 0755 $(datadir)
 #      install -g root -o root -m 0644 docs/ctsim.htb $(datadir)
index c2edfa84c74fcf3c7af61cda58c231400762d2b3..b10273c09107c95793f6574b2999672977b1066b 100644 (file)
@@ -178,6 +178,8 @@ wxlibs = @wxlibs@
 SUBDIRS = man libctsupport libctsim  html cgi-bin include $(EXTRA_DIRS1) $(EXTRA_DIRS2) $(EXTRA_DIRS3) tools helical
 
 EXTRA_DIST = acsite.m4 make.bat msvc/ctsim.dsw msvc/ctsimtext/ctsimtext.dsp msvc/libctsim/libctsim.dsp msvc/ctsim/ctsim.dsp
+
+CLEANFILES = docs/html/\* config.status configure.in
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -507,6 +509,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
        -rm -f $(CONFIG_CLEAN_FILES)
@@ -516,7 +519,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-recursive
 
-clean-am: clean-generic mostlyclean-am
+clean-am: clean-generic clean-local mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -564,8 +567,8 @@ uninstall-am: uninstall-info-am
 uninstall-info: uninstall-info-recursive
 
 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
-       clean-generic clean-recursive ctags ctags-recursive dist \
-       dist-all dist-gzip distcheck distclean distclean-generic \
+       clean-generic clean-local clean-recursive ctags ctags-recursive \
+       dist dist-all dist-gzip distcheck distclean distclean-generic \
        distclean-hdr distclean-recursive distclean-tags distcleancheck \
        distdir distuninstallcheck dvi dvi-am dvi-recursive info \
        info-am info-recursive install install-am install-data \
@@ -580,6 +583,8 @@ uninstall-info: uninstall-info-recursive
        ps-recursive tags tags-recursive uninstall uninstall-am \
        uninstall-info-am uninstall-info-recursive uninstall-recursive
 
+clean-local:
+       rm -rf docs/html
 
 #install-data-hook: 
 #      test -d $(datadir) || mkdir -p $(datadir) && chmod 0755 $(datadir)
index dda10e3a41820c42ef8023337ebcf87353a7da2e..f5552bd2fd9856cae985a133fb7de4b988615b25 100644 (file)
@@ -1,6 +1,12 @@
+ctsim (4.5.5-1) unstable; urgency=low
+
+  * Better cleaning in makefiles to fix double building (closes:442534)
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Mon, 17 Sep 2007 13:11:14 -0600
+
 ctsim (4.5.4-1) unstable; urgency=low
 
-  * New upstrea
+  * New upstream
 
  -- Kevin M. Rosenberg <kmr@debian.org>  Mon, 10 Sep 2007 02:18:54 -0600
 
index 164c1ebdec88e9d71df06f3c3be776b9dd5db6a8..7be880dd44b2be7fa067a0b741cfabcab7943123 100755 (executable)
@@ -63,6 +63,7 @@ clean:
        # Ensure up-to-date versions of config.sub and config.guess
        -test -r /usr/share/misc/config.sub && cp -f /usr/share/misc/config.sub config.sub
        -test -r /usr/share/misc/config.guess && cp -f /usr/share/misc/config.guess config.guess
+       -test -r Makefile && $(MAKE) clean
        dh_clean
 
 install: DH_OPTIONS=
index 955d29c0eea0ffab41a3283d937d98cf0bd8bdf3..608170c64438c0425cc619ed3cbb0575be0c7f58 100644 (file)
@@ -1,3 +1 @@
-CLEANFILES=\*.pgm \*.if \*~ \*.pj \.*~ \#\*\# \#\*~
-
-
+CLEANFILES=sample-helical.sh \*.pgm \*.if \*~ \*.pj \.*~ \#\*\# \#\*~
index d7d848dbc132db7ebbfce1b48e7a56c851a23154..7a351ec476ef434786cf8e15cbe88d74697821f9 100644 (file)
@@ -166,7 +166,7 @@ webenabled = @webenabled@
 wxcflags = @wxcflags@
 wxconfig = @wxconfig@
 wxlibs = @wxlibs@
-CLEANFILES = \*.pgm \*.if \*~ \*.pj \.*~ \#\*\# \#\*~
+CLEANFILES = sample-helical.sh \*.pgm \*.if \*~ \*.pj \.*~ \#\*\# \#\*~
 subdir = helical
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
index af9d5852be6bdba8b761828b19fb556059aabbb5..bb29dd2f0433f453a8104d1bf3be01923a9df7b8 100644 (file)
@@ -96,7 +96,7 @@ enum {
 
 
 struct KeywordCodeTable {
-  char* keyword;
+  const char* keyword;
   int code;
 };
 
@@ -327,7 +327,7 @@ private:
 
   bool ezcmd (const char* const comm);
   bool do_cmd(int lx);
-  void bad_option(char *opt);
+  void bad_option(const char *opt);
   void initPlotSettings();
 
   void initKeywords ();
index 7b75fda8d03caca0f10000753b9074b022bca4b7..e492e755659277c29e1802a65d3fec858b0bd049 100644 (file)
@@ -46,7 +46,7 @@ class POL {
     void addSkipWord (const char* const w);
     void addSkipChar (int c);
     void addKeyword (const char* const str, int code);
-    bool readWord (char *search, int nlet);
+    bool readWord (const char *search, int nlet);
     bool readUserToken (char *str, int *code);
     bool readString (char *str);
     bool readInteger (int *n, int typecode, bool boundcode, int bb1, int bb2);
@@ -54,7 +54,7 @@ class POL {
     bool skipTokens ();
     void reader ();
     bool readText (char *str, int lim);
-    void usefile (int source, char *fn);
+    void usefile (int source, const char *fn);
     void closefile ();
     int lookchar ();
     int inchar ();
@@ -146,7 +146,7 @@ private:
   bool m_bNewlineIsEOC;
 
   struct KeywordCodeList {
-    char *keyword;
+    const char *keyword;
     int  code;
   };
 
index 872d4e95cc5be57eb292baec38208ce807cdc11b..efef8c162d9c8e98a8c7475ee24e35ed9d0f29db 100644 (file)
@@ -384,7 +384,7 @@ EZPlot::do_cmd (int lx)
 
 
 void
-EZPlot::bad_option (char *opt)
+EZPlot::bad_option (const char *opt)
 {
   sys_error (ERR_WARNING, "INVALID option: %s", opt);
 }
index f433e5fd10b6ddcefc8c787dea46cd2a634bd5e8..78202f5714cf05f41fb1998b8910a922e443562a 100644 (file)
@@ -135,7 +135,7 @@ POL::addKeyword (const char* const str, int code)
 */
 
 bool
-POL::readWord (char *search, int nlet)
+POL::readWord (const char *search, int nlet)
 {
   tok (&token);
   if (m_bTrace)
@@ -821,7 +821,7 @@ POL::type (int c)
 */
 
 void
-POL::usefile (int source, char *fn)
+POL::usefile (int source, const char *fn)
 {
   FILE *fp;
 
index 48123fabb0ce2b2b21e212c7e337358105a5f80f..f9bb1dbf38db3f4172c658ac99c99809f5bfddb7 100644 (file)
@@ -611,7 +611,7 @@ PhantomElement::convertNameToType (const char* const typeName)
 const char* const
 PhantomElement::convertTypeToName (PhmElemType iType)
 {
-  static char* pszType = "Unknown";
+  static const char* pszType = "Unknown";
 
   if (iType == PELEM_RECTANGLE)
     pszType = "rectangle";
index 34f5e90e5a9b727639b6f8e4bb1dc56d12478246..7175102e6cfc5682a7c744c3e3d3951fb2c76585 100644 (file)
@@ -1,4 +1,4 @@
-static char *ctsim16_xpm[] = {
+static const char *ctsim16_xpm[] = {
 /* width height ncolors chars_per_pixel */
 "16 16 130 2",
 /* colors */
index 0759cc12e69dc096437d92895d7cf74d979f1194..596c174d630e8f9b34c5a4bff47a7956e2f65221 100644 (file)
@@ -1,5 +1,5 @@
 /* XPM */
-static char *splash[] = {
+static const char *splash[] = {
 /* width height ncolors chars_per_pixel */
 "500 500 38 1",
 /* colors */
index 510bc551148626f86c861f1d963f56c4f8dd8fc0..49b82a99eefb450faf729e291be28718f9850ff5 100644 (file)
@@ -26,8 +26,7 @@ ctsimtext_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if
 ctsimtext_LDADD=@ctlibs@
 ctsimtext_DEPENDENCIES=$(SOURCE_DEPEND)
 
-realclean:
-       rm -f *.pgm *.if *~ *.pj
+CLEANFILES=\*.pgm \*.if \*~ \*.pj sample-ctsim.sh
 
 ctsimtext_lam_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp nographics.cpp mpiworld.cpp phm2helix.cpp pjHinterp.cpp linogram.cpp
 ctsimtext_lam_LDADD=@ctlamlibs@
index d503edd8a802f855f315be830888a96251e220d3..99e3f4f98cce695923dbb144914e0c24fd87ed9f 100644 (file)
@@ -177,6 +177,8 @@ ctsimtext_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if
 ctsimtext_LDADD = @ctlibs@
 ctsimtext_DEPENDENCIES = $(SOURCE_DEPEND)
 
+CLEANFILES = \*.pgm \*.if \*~ \*.pj sample-ctsim.sh
+
 ctsimtext_lam_SOURCES = ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp nographics.cpp mpiworld.cpp phm2helix.cpp pjHinterp.cpp linogram.cpp
 ctsimtext_lam_LDADD = @ctlamlibs@
 
@@ -424,6 +426,7 @@ install-strip:
 mostlyclean-generic:
 
 clean-generic:
+       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
        -rm -f $(CONFIG_CLEAN_FILES)
@@ -506,9 +509,6 @@ install-exec-hook:
        ln -sf ctsimtext $(bindir)/pjHinterp
        ln -sf ctsimtext $(bindir)/linogram
 
-realclean:
-       rm -f *.pgm *.if *~ *.pj
-
 @USE_LAM_TRUE@ctsimtext-lam$(EXEEXT): ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp mpiworld.cpp linogram.cpp ../include/ct.h ../libctsim/libctsim.a ../libctsupport/libctsupport.a
 @USE_LAM_TRUE@ $(CC_LAM) @DEFS@ @lamdefs@ $(CFLAGS) $(INCLUDES) -DHAVE_MPI -DNO_MAIN ctsimtext.cpp if1.cpp if2.cpp ifinfo.cpp ifexport.cpp phm2if.cpp phm2pj.cpp pj2if.cpp pjinfo.cpp pjrec.cpp -o ctsimtext-lam $(LDFLAGS) $(LAM_EXTRA_SRC) @ctlibs@
 # Tell versions [3.59,3.63) of GNU make to not export all variables.