Why that "Perfect" Makefile Doesn't Work.

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ค. 2020
  • Patreon ➤ / jacobsorber
    Courses ➤ jacobsorber.thinkific.com
    Website ➤ www.jacobsorber.com
    ---
    Why that "Perfect" Makefile Doesn't Work. \\ Makefiles are notorious for giving students headaches, when they look right, but don't act right. The problem is often whitespace. This video explains this issue and shows you how to find and fix these errors quickly so you can get back to developing software.
    Related Video:
    Simulator example: • How to write your own ...
    ***
    Welcome! I post videos that help you learn to program and become a more confident software developer. I cover beginner-to-advanced systems topics ranging from network programming, threads, processes, operating systems, embedded systems and others. My goal is to help you get under-the-hood and better understand how computers work and how you can use them to become stronger students and more capable professional developers.
    About me: I'm a computer scientist, electrical engineer, researcher, and teacher. I specialize in embedded systems, mobile computing, sensor networks, and the Internet of Things. I teach systems and networking courses at Clemson University, where I also lead the PERSIST research lab.
    More about me and what I do:
    www.jacobsorber.com
    people.cs.clemson.edu/~jsorber/
    persist.cs.clemson.edu/
    To Support the Channel:
    + like, subscribe, spread the word
    + contribute via Patreon --- [ / jacobsorber ]
    + rep the channel with nerdy merch --- [teespring.com/stores/jacob-so...]
    Source code is also available to Patreon supporters. --- [jsorber-youtube-source.heroku...]

ความคิดเห็น • 146

  • @eladi99
    @eladi99 3 ปีที่แล้ว +57

    You're actually touching the tip of a bigger iceberg -- unattended trailing whitespaces in source code. This is something that can raise conflicts in source controls. The best advice would be to configure your editor to remove them on save, because they should *never* stay around toward your commit.

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +10

      Very true. Thanks for mentioning that.

    • @Trezker
      @Trezker 3 ปีที่แล้ว +2

      Ah, good tip. I wonder what other annoyances we live with that editors have a setting for but we never think to look for it.

    • @smrtfasizmu6161
      @smrtfasizmu6161 2 ปีที่แล้ว +2

      That doesn't matter for source code of programming languages. C, Java don't care about white space.

    • @meiowalot7570
      @meiowalot7570 2 ปีที่แล้ว +3

      I fanatically use git diff before committing as it highlights trailing white space.

    • @tildessmoo
      @tildessmoo ปีที่แล้ว +3

      @@smrtfasizmu6161 Yes, I know, two years late, but... While whitespace doesn't matter for most source files, Elad Galili was talking about source control, things like git, mercurial, and subversion. They don't check how your files compile, just if they're different, and having a single stray whitespace from, say, accidentally hitting the spacebar while reading through a section of code to make sure what you're writing in a different file or even compilation unit won't cause problems, can cause unnecessary merge conflicts and automatic version changes that you then have to go back and fix manually. It's not a huge deal to fix most of the time anyway; most text editors it's a pretty easy bit of scripting to automatically strip trailing whitespace.

  • @axalius572
    @axalius572 3 ปีที่แล้ว +27

    I think I saw it! Tabs vs spaces. This gave me a headache in the past.

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +1

      Me too.

    • @benjaminshinar9509
      @benjaminshinar9509 3 ปีที่แล้ว +1

      same.
      it's like restarting the computer, before you try anything with a makefile, check the tabs.

  • @bas7650
    @bas7650 8 หลายเดือนก่อน +3

    2:09 "If it's still giving you errors, think about whitespaces" this helped me fix an issue!

  • @jenselstner5527
    @jenselstner5527 3 ปีที่แล้ว +33

    You could enable the trimming of trailing white-spaces when saving the file in the preferences of VS Code.

  • @anupkodlekere8604
    @anupkodlekere8604 3 ปีที่แล้ว +65

    "You spend hours pulling your hair out if you have hair" lol

    • @khoavo5758
      @khoavo5758 3 ปีที่แล้ว

      @Loraine Longworth Google for what? You being a terrible boyfriend?

  • @mrcrackerist
    @mrcrackerist 3 ปีที่แล้ว +19

    I have actually never encountered this, but interesting thank you.

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +4

      You're welcome. Sometimes people encounter this, but don't realize it because they manage to fix it without realizing what they did. I know my first few run-ins with it back in ---a long time ago--- I ended up just retyping part of my makefile and it worked, and I just moved on, not realizing what I did wrong in the first place.

  • @supernovaw39
    @supernovaw39 ปีที่แล้ว +4

    Oh, some of my most memorable experiences programming were when I almost went crazy trying to solve a silly problem :) Like when I split a file with CRLF endings with "
    " and my strings ended with
    . It absolutely messed up my output and I didn't even know that carriage return is a thing.

  • @BottleOfCoke
    @BottleOfCoke 2 ปีที่แล้ว +3

    This is a really high production-value to a students question!! I wish all of my professors would answer my emails like this!

  • @matiascoarasa7503
    @matiascoarasa7503 3 ปีที่แล้ว +3

    Great work man! Love your channel topics and vibes!

  • @meiowalot7570
    @meiowalot7570 2 ปีที่แล้ว

    Thanks for another really good video. When you showed the make files I immediately guessed “I bet the indents aren’t tabbed in, but spaces were used”. I was wrong but it looks like another way whitespace can cause trouble. :)

  • @rishithaminol15
    @rishithaminol15 3 ปีที่แล้ว +3

    Hi Jacob. I really like your videos. It guides me to lots of sections of computer science. This is really helpful please never give up, keep it up.

  • @enderger5308
    @enderger5308 2 ปีที่แล้ว +1

    Tip: highlight the whole file in your editor and look line-by-line for that one bit of whitespace.

  • @lsatenstein
    @lsatenstein 2 ปีที่แล้ว +1

    Thank you Dr J. for this topic.
    Makefile whitespace has transferred to my scalp. I am a Makefile user who has struggled for hours to get one specific one working well and I failed.
    I will review my irritant Makefile. The fault: By changing one source file, of a dozen, the Makefile causes all sources to be recompiled. Fortunately, the code is stable.
    It is not your problem. But you incentivize me to revisit it again. Hopefully, my buglet will be discovered in a short time-span.

  • @prakhargupta2960
    @prakhargupta2960 3 ปีที่แล้ว +2

    Jacob you're the CS teacher I never had! Thanks for being yourself!

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว

      You're welcome. Glad I can help.

  • @marshalstewart7776
    @marshalstewart7776 3 ปีที่แล้ว

    Had a problem with a make file yesterday that I copied online to learn about Linux kernel modules. This was the issue. Thank you!

  • @ravishankarnolastname1917
    @ravishankarnolastname1917 ปีที่แล้ว

    This really saved me money from a visit to the therapist! Thanks Jacob!

  • @yash1152
    @yash1152 2 ปีที่แล้ว

    Tip: also, many editors have this option of remove trailing whitespaces on saving file or exiting or smth like that. Be sure to look into that too (:

  • @adamtuft
    @adamtuft 3 ปีที่แล้ว +4

    Thank you for your videos Jacob, they are really informative! Would you consider making a brief video on the "inline" keyword in C - what it's for, how it works, and how it should be used? Or can you recommend a source for a clear explanation? I've been reading up on it but I can't get a clear understanding myself 😕😕😕

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +3

      I've added *inline* to my list. Can't promise when it will come out. Hopefully, in time to be useful to you.

    • @adamtuft
      @adamtuft 3 ปีที่แล้ว +1

      ​@@JacobSorber Thank you so much!

  • @papasmurf9146
    @papasmurf9146 2 ปีที่แล้ว +1

    I would use a utility to build the Makefile versus hand coding it. That way you also get the appropriate .h dependencies into the Makefile. I wrote a utility to create the Makefile back in the 90s and have been dragging it around with me since then.

  • @artemiocabrillosjr.244
    @artemiocabrillosjr.244 3 ปีที่แล้ว

    Hi Jacob,
    You really did gave a lot of people gold (coz u save them a lot of time 😂).
    I also encountered this in my project which had a makefile untouched for almost 3 years and suddenly becoming erroneous. I spent many hours debugging and the solution is, white spaces.
    One thing to take note also is when update packages, make utility might also behave different. In my case GNU make 3.81 is OK and for some reason i performed a yum update which updated GNU make to 3.82 which causes the error.
    Anyway, more power in making these videos.
    Best Regards!

  • @OpenGL4ever
    @OpenGL4ever 2 ปีที่แล้ว +1

    A better way to avoid a problem like this is to simply configure your editor in a way so that it removes all white spaces at the line ending automatically when saving the file.
    Theoretically this reduces also the file size. You usually won't notice the latter on a typical file system that is using whole blocks to store data, but when packaging the file with tools like tar or zip and transfering to another machine via network this can save some bytes.

  • @RMG0785
    @RMG0785 3 ปีที่แล้ว

    Unrelated - What is your camera and lighting setup Jacob? Looks really good. Sharp + well-lit

  • @samplesandtests
    @samplesandtests ปีที่แล้ว

    three things, first thanks for the video, this may have been a issue i had with make and decided to just make bash build scripts instead. second while on the topic of bash i just came across a whitespace issue with bash ( not putting spaces around brackets in conditions). third i believe newer versions of nano will highlight trailing spaces on a line by default (at least most of mine do).

  • @kathiravankathir3089
    @kathiravankathir3089 3 ปีที่แล้ว

    Experienced a similar issue ,when setting tab = 4 spaces in the vim editor. we can differentiate the whitespaces and tabs by executing "set list" command in the vim.

  • @sghsghdk
    @sghsghdk 3 ปีที่แล้ว +1

    Many editors have and option to remove tailing whitespace from files when saving.

  • @kaushikjames5623
    @kaushikjames5623 ปีที่แล้ว

    advanced information thanks again

  • @Saturate0806
    @Saturate0806 3 ปีที่แล้ว +1

    Before staging you can run git diff and the whitespaces are shown with red background

  • @abarocio80
    @abarocio80 2 ปีที่แล้ว

    You could also use Emacs, which by default trims all white spaces in Makefiles on save.

  • @chair547
    @chair547 ปีที่แล้ว

    every time i have to drop back down into c i become exponentially more thankful for cargo

  • @victorocampo5263
    @victorocampo5263 3 ปีที่แล้ว +6

    What do you think about make alternatives, like premake or CMake?

    • @lordadamson
      @lordadamson 3 ปีที่แล้ว

      CMake is a joke that went too far. Sort of like JS. You will probably have to learn it one day if you do C/C++ professionally. It's a defacto. I sad defacto.
      My experience with premake is good. As long as you don't do crazy things with lua.

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +2

      I'll have to try out premake. I'm also not in love with cmake. I use Rake sometimes. Build systems are like friends. Most have both lovable things and annoying quirks. I guess who you invite to the party, depends on the kind of party you want to have. 🤔

    • @Orionus83
      @Orionus83 3 ปีที่แล้ว +5

      I don't like make but really like CMake. It looks a little messy the first time, but in the end it's pretty cool.

    • @TranscendentBen
      @TranscendentBen 2 ปีที่แล้ว

      I can only wonder if these other make utilities have the same "features" as the original make in order to 'maintain compatibility'.

    • @fededevi1985
      @fededevi1985 ปีที่แล้ว +1

      I don't understand the hate on cmake especially considering people still use make instead. It might not have the best syntax ever but it works well and it is super easy to learn. It is so much better than make (even without taking into account that it is the de-facto standard) that it doesn't make any sense not to use it over make even for the simplest single file projects.

  • @dannyhunn6025
    @dannyhunn6025 3 ปีที่แล้ว

    Just a note on Vim you can use :syntax on :set syntax=whitespace

  • @victornoagbodji
    @victornoagbodji 3 ปีที่แล้ว

    😊 🙏 😊
    thanks for explaining the issue. make should have a built-in linter...

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +1

      Agreed. It definitely seems like there are some easy things that make could check for us automatically.

  • @JonitoFischer
    @JonitoFischer 2 ปีที่แล้ว

    I've used python Invoke for task automation and build scripts, and recently I'm giving a try to xmake (Lua)... I always felt like writing makefiles was harder than trying to write in Klingon... And any python programmer knows to set it's ide or text editor to show whitespace all the time.

  • @shawnmichaels5484
    @shawnmichaels5484 2 ปีที่แล้ว

    Hey jacob, can you share your shell theme? Thanks in advance :)

  • @jon-sw5yw
    @jon-sw5yw 3 ปีที่แล้ว

    This happened to me as well. The "same" makefile didn't work on my friends PC and I had to email him my file and only then it worked

  • @glowiever
    @glowiever 3 ปีที่แล้ว

    I've never been able to follow some of those bigger project's makefiles. theirs seem to try to cover all edge cases.

  • @MECHANISMUS
    @MECHANISMUS 2 ปีที่แล้ว

    In Geany there is 'Strip Trailing Spaces' command.

  • @ghalebevaldo4416
    @ghalebevaldo4416 11 หลายเดือนก่อน

    Great!

  • @michaelclift6849
    @michaelclift6849 ปีที่แล้ว

    I learned makefiles from what I consider to be a great sample. The makefile written by Eric Weddington for WinAVR2010. Actually, instead of learned, maybe I should say I hacked it do do what I want...

  • @arnaudparan1419
    @arnaudparan1419 2 ปีที่แล้ว

    that's why my Vim is always configured to rendre whitespace characters

  • @wjrasmussen666
    @wjrasmussen666 5 หลายเดือนก่อน

    Used to show all whitespace characters in vi or emacs

  • @kashinathchillal9867
    @kashinathchillal9867 3 หลายเดือนก่อน

    I use vimdiff to see the difference between 2 files. Will that help?

  • @hemanshu877
    @hemanshu877 3 ปีที่แล้ว +4

    That's why I use CMake

  • @nosheenarif1920
    @nosheenarif1920 หลายเดือนก่อน

    Hello there,
    Kindly tell me what does makefile. Win has changed mean?
    And how to fix it?

  • @kushagrakumar9576
    @kushagrakumar9576 3 ปีที่แล้ว

    :set list , in case you are using vim editor. Encountered it multiple times. Trivial yet good to know for anyone working with make files.

  • @AnimeGIFfy
    @AnimeGIFfy 2 ปีที่แล้ว

    Vscode has a setting that clears trailing whitespaces on save

  • @AtomToast
    @AtomToast 3 ปีที่แล้ว

    I just have my editor (neovim) set up to both display whitspaces aswell as auto trim trailing spaces in any file I edit. I didn't know about this issue with make but that might be because I never had to encounter it

    • @humm535
      @humm535 3 ปีที่แล้ว +1

      It’s not easy to encounter imho. How would one come into a situation where one doesn’t know what whitespace is used? o_O

  • @Golden_builds
    @Golden_builds ปีที่แล้ว

    how can i open a makefile to see the codes!

  • @kermitdafrog8
    @kermitdafrog8 3 ปีที่แล้ว

    Does this happen with CMake?

  •  3 ปีที่แล้ว

    Good practice is to pass your 'configuration' variables (variables which are changed more often, or for each project) through $(strip) function. You will never have similar problem anymore.

  • @metalpunk
    @metalpunk 3 ปีที่แล้ว

    Man, I was so sure it was that the broken version used spaces instead of tabs. :(

  • @samsawesomeminecraft
    @samsawesomeminecraft 3 ปีที่แล้ว +1

    what if I downloaded some source code from the internet and try to use the Makefile there and it produces an error?

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +1

      Well, that depends on the error (and the Makefile).

    • @samsawesomeminecraft
      @samsawesomeminecraft 3 ปีที่แล้ว

      @@JacobSorber so there's no easy fix?

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +1

      @@samsawesomeminecraft Sadly, there isn't. There are a lot of different ways that a Makefile can be broken. If you point me to the online resource, I might be able to address it in a future video, though.

    • @samsawesomeminecraft
      @samsawesomeminecraft 3 ปีที่แล้ว +1

      @@JacobSorber I had trouble compiling this from source github.com/nigels-com/glew

  • @TranscendentBen
    @TranscendentBen 2 ปีที่แล้ว

    This sort of thing gets me riled up. I SWEAR i thought this was going to be the spaces-instead-of-a-tab thing that Make looks for in indented lines. (RANT incoming)
    The ASCII TAB character should be outlawed. As far as I know, MAKE is the only thing that requires it.
    TAB has an awful history. TAB originally meant "go to the next TAB position which is every 8 character positions from the start" which is 1, 9, 17, 25, 34, ... Every ASCII device (well, maybe not the ASR-33, I don't remember what it did) followed this standard, so any series of characters, spaces and tabs showed as the same thing on every CRT terminal and the DECwriter followed that convention.
    But then the microcompter came along, and then the word processors probably Wordstar, which took TAB to mean whatever the programmer(s) wanted it to mean, some odd predefined tabstop or four spaces or whatever This was in the word processor's own proprietary file format, which was almost forgivable, but it was surely not properly converted when the file was saved as ASCII. Nowadays even "straight text" programming editors let you tell it how far to move with the tab character. At least most can be configured to insert the appropriate number of spaces into the file instead of the tab, so it's possible to ... write Python with good formatting. No one uses tab to mean 8 spaces anymore anyway. Modern indenting is four, or maybe 3 or 2 spaces.
    So really the thing has lost all usefulness, and causes more problems than it solves. I can see where it originally saved extra space characters, but source code size in memory or on a hard disk is no longer a problem, and version control systems do data compression anyway.
    So I have Notepad++ set to insert spaces to get to the next four-space "tab stop" and I'm happy that my code will look the same in any text editor. But then in recent years I have this growing program I was splitting up into several source files, and I go back and look at the Make documentation for the first time in a few decades, and it REQUIRES a tab character ...
    If I had a dollar for every "you can fix ThisEditor to strip trailing spaces" comment I could invent a time machine and pay whoever first wrote Make to have it accept "one or more tabs or spaces" for an indented line, and always ignore trailing spaces.

  • @catorials444
    @catorials444 3 ปีที่แล้ว

    damn, somebody has to rework the makefile parser

  • @humanontheinternet6510
    @humanontheinternet6510 3 ปีที่แล้ว

    yah i face the same in docker-compose file

  • @mgcmsn
    @mgcmsn 9 หลายเดือนก่อน

    This is why I try to use Taskfile instead of a Makefile if possible.

  • @carlh8256
    @carlh8256 3 ปีที่แล้ว +1

    Is it necessary for Make to work in this way? If not why dont they change Make for such an agonizing problem?

    • @TranscendentBen
      @TranscendentBen 2 ปีที่แล้ว

      Likely because it's a "legacy" thing and they're afraid to change it out of fear of somehow breaking something. There's no reason not to make Make more reasonable, it's not like it's part of any language spec, or part of Posix or anything, at least I don't think so.

  • @funhuninjastudio
    @funhuninjastudio 3 ปีที่แล้ว

    Can you make a video for fasm?
    Nice vid tho ;)

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +1

      I'll add it to the list and see what I can do.

  • @AndreasWilfer
    @AndreasWilfer 3 ปีที่แล้ว

    Ah, that explains a lot..

  • @FernandoBasso
    @FernandoBasso 10 หลายเดือนก่อน

    I have seen problems with whitespaces after \ escape, which was supposed to be escaping a the newline, but there it was actually escaping a whitespace.
    It is a good practice to configure editors to display and optionally clean whitespace, potentially making use of plugins like editorconfig.
    It is not uncommon for me to open a file and get mad of the carelessness with trailing whitespace, to which I usually respond with a :%s/\s\+$::g 😅

  • @aidenpearce5701
    @aidenpearce5701 3 ปีที่แล้ว

    I dont understand where src and obj value came from that assign into SRC and OBJ

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +1

      Those are just the names of the subdirectories that I'm using to build my project. SRC and OBJ are the variable names, the lowercase "src" and "obj" are just string literals.

    • @aidenpearce5701
      @aidenpearce5701 3 ปีที่แล้ว

      @@JacobSorber i see, i thought src and obj are special string 😅

  • @nandanvasudevan
    @nandanvasudevan 2 ปีที่แล้ว

    Teach us CMake!

  • @the_allucinator
    @the_allucinator 3 ปีที่แล้ว

    This reminds me of the aircraft disasters that resulted from loose screws.

  • @tosemusername
    @tosemusername 3 ปีที่แล้ว

    Editors nowadays also have the option to remove pointless whitespace characters when you save the file.

  • @ronwellman
    @ronwellman 3 ปีที่แล้ว

    See whitespace characters in vim. :set list

  • @MegaJehanzaib
    @MegaJehanzaib 3 ปีที่แล้ว +1

    Notepad++ -> view -> Show Symbol -> Show all symbols

  • @skaruts
    @skaruts 2 ปีที่แล้ว

    The only reason I don't code in C is because compiling it always feels like a can of worms, and at this point I have no patience to try to solve the issues... :(
    EDIT: lol I just revisited a broken python script for compiling C that I made a while ago, and made it work. I am now able to compile C. To paraphrase a portuguese saying: when you don't have a dog, you hunt with a python. :D

  • @venkybabu8140
    @venkybabu8140 ปีที่แล้ว

    Invisible control character.

  • @harshwardhanshetty4683
    @harshwardhanshetty4683 6 หลายเดือนก่อน

    "if you have hair" 😥😥

  • @activelivingchallenger4298
    @activelivingchallenger4298 3 ปีที่แล้ว

    Reminds me of bashrc file. Alias and path issues and figured out it was just a white space issue. Frustrating

  • @perfectionbox
    @perfectionbox 3 ปีที่แล้ว

    surely someone has written a program or script to "lint" makefiles for things like this?

  • @UseQPixinDune
    @UseQPixinDune 3 ปีที่แล้ว

    You should really start a subreddit or a discord server

  • @lmlizwpfhsjmcyt7545
    @lmlizwpfhsjmcyt7545 2 ปีที่แล้ว

    I don't understand. How long has Make existed for? Why does Make still have a whitespace issue.

  • @sajjadjawadkadhim303
    @sajjadjawadkadhim303 2 ปีที่แล้ว

    I just make vim remove whitespace at the end of every line if it exists when i save the file automatically

  • @sababugs1125
    @sababugs1125 2 ปีที่แล้ว

    I had this bug once then promptly wen full on monke

  • @hameedyousfi2779
    @hameedyousfi2779 3 ปีที่แล้ว +1

    Sir plz start embbeded programming on c language create own header files create own function on c plz sir start that tutorial i am waiting for this tutorial quite while

  • @ivankryvosheia446
    @ivankryvosheia446 2 ปีที่แล้ว

    Love american humour.
    And..good tips!
    I should have known it earlier

  • @TheMoazin
    @TheMoazin 3 ปีที่แล้ว +2

    First Viewer!

  • @freitas-renato
    @freitas-renato 3 ปีที่แล้ว +1

    You can toggle "render whitespace" on VSCode to see all spaces/tabs on the file, it is really useful to trace bugs like this.
    Great video btw

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว

      Yes, you can. Thanks.

  • @aladinsafi2967
    @aladinsafi2967 3 ปีที่แล้ว

    use vpath it better or -I in gcc

  • @afiqzx
    @afiqzx 3 ปีที่แล้ว

    got it right on first try lol because i had this problem

  • @XenoTravis
    @XenoTravis 3 ปีที่แล้ว

    I would be very happy to never hear the word 'makefile' again.

  • @retroenergy
    @retroenergy 2 ปีที่แล้ว

    The perfect Makefiles are the ones you make along the way

  • @leonardocaetano9771
    @leonardocaetano9771 3 ปีที่แล้ว

    The truth is that for the most of time, build tools aren't even needed. You can compile just fine using shell scripts. I don't know why people love complicating things.

  • @danmerillat
    @danmerillat 3 ปีที่แล้ว +1

    make -r
    turn off builtin rules then your debug isn't full of 1970s era version control rules.

  • @nutelhere
    @nutelhere 5 หลายเดือนก่อน

    I just hope one day make stops existing

  • @max_ishere
    @max_ishere 3 ปีที่แล้ว +1

    WHAT?

  • @humm535
    @humm535 3 ปีที่แล้ว

    not POSIX compliant Makefile, REEEEEE

  • @abanoubsameh6608
    @abanoubsameh6608 3 ปีที่แล้ว

    Just vim or grep.

  • @edwardmacnab354
    @edwardmacnab354 2 ปีที่แล้ว

    Why couldn't you just diff the two versions ? because the two files obviously mismatch !

  • @jenselstner5527
    @jenselstner5527 3 ปีที่แล้ว

    make and python, (almost) same shit with white-spaces

  • @juri4729
    @juri4729 2 ปีที่แล้ว

    "... i know years of experience"
    ***proceeds to make rocket science out of white space***
    isn't one of the first things you learn about make that it's white space sensitive

  • @JohnHollowell
    @JohnHollowell 3 ปีที่แล้ว

    I feel like you are probably not a yaml kinda guy... whitespace dependence even more picky than Python

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว

      Yeah, I know. I do use YAML when it makes sense (just like I use python and make). But, their whitespace-based issues feel like unnecessary self-inflicted wounds.

  • @tobiaskarl4939
    @tobiaskarl4939 3 ปีที่แล้ว

    I hate these tabs and these LFCR from microsofts textfiles .... grrrrrr
    dos2unix is my friend and cat file.txt | tr -d "\t"

  • @yash1152
    @yash1152 2 ปีที่แล้ว

    5:24 wow, how come you dont mention 'cat --vet' 😂😂
    oh wait, it doesnt shows whitespaces, rather just the tabs and newlines

  • @nathanflett6427
    @nathanflett6427 3 ปีที่แล้ว

    Personally I see this as a newbie issue. You shouldn't be leaving whitespace at the end of the line unless you mean to anyway.

    • @JacobSorber
      @JacobSorber  3 ปีที่แล้ว +1

      Sure, but to be fair, I could say the same thing about seg faults, memory corruption, memory leaks, and just about any kind of programming mistake out there. Most everything is easy once you understand it.

    • @nathanflett6427
      @nathanflett6427 3 ปีที่แล้ว

      @@JacobSorber True. Keep making the videos. I wish I had had videos like this back in the day.

  • @wah704
    @wah704 7 หลายเดือนก่อน

    Would cat -e Makefile work?