Commit Graph

17 Commits

Author SHA1 Message Date
Nathan Scott 9e57b5c3f4 Generate an appropriate shebang line for MakeHeader script
Use configure.ac to handle platform differences where some
build hosts have only a python3, or only python, binary.

Related to https://github.com/htop-dev/htop/pull/6
2020-08-23 11:24:52 +10:00
Nathan Scott b3aef4ea3a Revert "MakeHeader.py: use python3 shebang"
This reverts commit 40ac7a88af.
as it causes build failure on non-python3 platforms.
2020-08-23 09:42:11 +10:00
Christian Göttsche 40ac7a88af MakeHeader.py: use python3 shebang
Also drop unused import
2020-08-21 10:37:27 +02:00
Nathan Scott dfd9279f87 Resolve complation issues with -fno-common (default from gcc-10)
Extends the MakeHeader script to auto-generate correct "extern"
function declarations in some cases that it currently does not.

Related to https://github.com/hishamhm/htop/pull/981
2020-07-10 10:35:32 +10:00
Hisham Muhammad 402e46bb82 Linting changes
as reported by lgtm.com
2019-02-10 14:16:46 +01:00
volkov-am 7cfaa9dede MakeHeader.py: Fix for non-utf8 environments (#770)
Header creation fails with non-utf8 locale and python3.
Simply set LC_ALL="C" and use python3 to reproduce the issue.

env LC_ALL="C" ./scripts/MakeHeader.py MetersPanel.c
Traceback (most recent call last):
  File "./scripts/MakeHeader.py", line 32, in <module>
    for line in file.readlines():
  File "/usr/lib64/python3.5/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 956: ordinal not in range(128)

This changes is python2 and python3 compatible

cStringIO.StringIO module is removed because it is not able to accept unicode strings
https://docs.python.org/2/library/stringio.html#cStringIO.StringIO
2018-04-05 19:55:51 -03:00
guoci 60acda0bce make script version agnostic 2017-07-27 17:02:01 -04:00
Diederik de Groot 50f03f5950 Enh: scripts/MakeHeader script
Only write a new .h file if something changed for the header file being created.
This prevents a lot of recompilation during development
2017-04-21 16:39:03 +02:00
Hisham Muhammad 3383d8e556 Sorry about the mega-patch.
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
2015-01-21 23:27:31 -02:00
Hisham Muhammad 1eda099d06 Another portability tweak. 2014-11-19 23:27:21 -02:00
Robert Rosengren 5aac1733a6 Possible to regenerate headers outside of srcdir 2014-01-17 09:33:52 +01:00
Hisham Muhammad 84281bdc44 major header cleanup 2011-12-26 21:35:57 +00:00
Hisham Muhammad e685bdeea0 Fix GCC 4.3 issues: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=416852 2007-08-10 05:59:36 +00:00
Hisham Muhammad 9710a43001 Fixes for /proc location, submitted by Florent Thoumie 2007-05-17 18:29:30 +00:00
Hisham Muhammad 35afc13ebf New version of MakeHeader. Does not use 'private' comment annotation,
using the 'static' storage class instead. Automatically generates
'extern' declarations in headers for non-static data.
2006-06-06 20:28:09 +00:00
Hisham Muhammad 8c643f5f89 Use long long types to avoid overflow 2006-06-05 21:28:54 +00:00
Hisham Muhammad 425d48dc9e Add header generator script. 2006-03-23 18:45:14 +00:00